-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (28 loc) · 1017 Bytes
/
main.cpp
File metadata and controls
37 lines (28 loc) · 1017 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
#include<iostream>
#include<vector>
#include<string>
#include<fstream>
#include<chrono>
#include<algorithm>
using namespace std;
using namespace std::chrono;
const int INF = 1e9 + 100;//Максимальное число
#include "Node.cpp"
#include "RootCounterNode.cpp"
#include "FatHeap.cpp"
int main() {
FatHeap heap;
auto start_time_insert = high_resolution_clock::now();
heap.insert(15);
heap.insert(13);
heap.insert(5);
auto end_time_insert = high_resolution_clock::now();
auto execution_time_insert = duration_cast<nanoseconds>(end_time_insert - start_time_insert);
cout << "Time insert:" << execution_time_insert.count() << " nanoseconds";
auto start_time_delete = high_resolution_clock::now();
heap.deleteMin();
auto end_time_delete = high_resolution_clock::now();
auto execution_time_delete = duration_cast<nanoseconds>(end_time_delete - start_time_delete);
cout << "\nTime delete:" << execution_time_delete.count() << " nanoseconds";
return 0;
}