-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.cpp
More file actions
37 lines (30 loc) · 706 Bytes
/
utils.cpp
File metadata and controls
37 lines (30 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// Created by Ivan Pazhitnykh on 25.09.16.
//
#include <cstdio>
#include <ctime>
void print(int *data, int length, bool isEndl) {
printf("[");
for (int i = 0; i < length; i++) {
printf("%d", data[i]);
if (i != length - 1)
printf(" ");
}
printf("]");
if (isEndl)
printf("\n");
}
void print_line(int before, int length, int after) {
for (int i = 0; i < before; i++)
printf("\n");
for (int i = 0; i < length; i++)
printf("-");
for (int i = 0; i < after; i++)
printf("\n");
}
void print_master() {
printf("$\033[1;31m master\033[0m:");
}
double realtime() {
return double(clock()) / CLOCKS_PER_SEC;
}