-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo2_client_move.cpp
More file actions
81 lines (47 loc) · 2.2 KB
/
demo2_client_move.cpp
File metadata and controls
81 lines (47 loc) · 2.2 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include "demo_final_2.cpp"
#include <iostream>
#include <string>
using namespace std;
int main()
{
srand(9);
Treap_t<int> t_1;
t_1.insert(19);
t_1.insert(23);
t_1.insert(5);
t_1.insert(1);
t_1.insert(90);
t_1.insert(28);
t_1.insert(55);
cout<<"Tree T_1:\n\n"<<t_1<<"\n";
cout<<"\n--------------------------------------------------------------------------------------------------------------------------------\n\n";
Treap_t<int> t_2(move(t_1));
cout<<"Tree T_1:\n\n"<<t_1<<"\n";
cout<<"\n--------------------------------------------------------------------------------------------------------------------------------\n\n";
cout<<"Tree T_2:\n\n"<<t_2<<"\n";
cout<<"\n--------------------------------------------------------------------------------------------------------------------------------\n\n";
Treap_t<int> t_3 = move(t_2);
cout<<"Tree T_3:\n\n"<<t_3<<"\n";
cout<<"\n--------------------------------------------------------------------------------------------------------------------------------\n\n";
Treap_t<int> t_4;
t_4 = move(t_3);
cout<<"Tree T_4:\n\n"<<t_4<<"\n";
cout<<"\n--------------------------------------------------------------------------------------------------------------------------------\n\n";
vector<int> v_1 = {9, 82, 158, 1912, 174, 242, 99, 108, 235, 911, 100, 102, 555};
Treap_t<int> t_5(v_1.begin(), v_1.end());
cout<<"Tree T_5:\n\n"<<t_5<<"\n";
cout<<"\n--------------------------------------------------------------------------------------------------------------------------------\n\n";
t_5 = move(t_4);
cout<<"Tree T_5:\n\n"<<t_5<<"\n";
cout<<"\n--------------------------------------------------------------------------------------------------------------------------------\n\n";
// Treap_node_t<int> n_1(62, 78);
// cout<<"n_1\n"<<n_1<<"\n\n";
// Treap_node_t<int> n_2(move(n_1));
// cout<<"n_2\n"<<n_2<<"\n\n";
// Treap_node_t<int> n_3 = move(n_2);
// cout<<"n_3\n"<<n_3<<"\n\n";
// Treap_node_t<int> n_5(4, 5);
// n_5 = move(n_3);
// cout<<"n_5\n"<<n_5<<"\n\n";
// Treap_node_t<int> n_2(move(n_1));
}