Main.cpp: In function 'Node* join(Node*, Node*, bool)':
Main.cpp:36:13: error: 'nil' was not declared in this scope
36 | if(st==&nil[care])
| ^~~
Main.cpp:40:13: error: 'nil' was not declared in this scope
40 | if(dr==&nil[care])
| ^~~
Main.cpp: In function 'std::pair<Node*, Node*> split(Node*, int, bool)':
Main.cpp:56:14: error: 'nil' was not declared in this scope
56 | if(nod==&nil[care])
| ^~~
Main.cpp:58:38: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::pair<Node*, Node*>'
58 | return {&nil[care],&nil[care]};
| ^
| |
| <brace-enclosed initializer list>
Main.cpp: In function 'int get_cnt_first(Node*, bool)':
Main.cpp:74:20: error: 'nil' was not declared in this scope
74 | if(nod->st == &nil[care])
| ^~~
Main.cpp: In function 'int query(int)':
Main.cpp:83:20: error: 'T' was not declared in this scope
83 | auto t = split(T,poz-1,0);
| ^
Main.cpp: In function 'bool next_perm()':
Main.cpp:92:20: error: 'I' was not declared in this scope
92 | auto t = split(I,n/2,1);
| ^
Main.cpp:92:22: error: 'n' was not declared in this scope
92 | auto t = split(I,n/2,1);
| ^
Main.cpp:98:1: warning: no return statement in function returning non-void [-Wreturn-type]
98 | }
| ^
Main.cpp: In function 'int main()':
Main.cpp:104:10: error: 'n' was not declared in this scope; did you mean 'yn'?
104 | cin>>n>>m;
| ^
| yn
Main.cpp:104:13: error: 'm' was not declared in this scope; did you mean 'tm'?
104 | cin>>n>>m;
| ^
| tm
Main.cpp:107:14: error: 'v' was not declared in this scope
107 | cin>>v[i];
| ^
Main.cpp:111:14: error: 'q' was not declared in this scope
111 | cin>>q[i].t>>q[i].poz;
| ^
Main.cpp:118:10: error: 'q' was not declared in this scope
118 | sort(q+1,q+m+1,cmp);
| ^
Main.cpp:119:17: error: 'v' was not declared in this scope
119 | int first = v[1];
| ^
Main.cpp:127:17: error: 'I' was not declared in this scope
127 | I = join(I,new Node{&nil[1],&nil[1],my_rand(),nr,first,0},1);
| ^
Main.cpp:127:38: error: 'nil' was not declared in this scope
127 | I = join(I,new Node{&nil[1],&nil[1],my_rand(),nr,first,0},1);
| ^~~
Main.cpp:127:53: error: 'my_rand' was not declared in this scope; did you mean 'srand'?
127 | I = join(I,new Node{&nil[1],&nil[1],my_rand(),nr,first,0},1);
| ^~~~~~~
| srand
Main.cpp:127:73: error: could not convert '{<expression error>, <expression error>, <expression error>, nr, first, 0}' from '<brace-enclosed initializer list>' to 'Node'
127 | I = join(I,new Node{&nil[1],&nil[1],my_rand(),nr,first,0},1);
| ^
| |
| <brace-enclosed initializer list>
Main.cpp:133:9: error: 'T' was not declared in this scope
133 | T = join(T,new Node{&nil[0],&nil[0],my_rand(),1,v[i],v[i]},0);
| ^
Main.cpp:133:30: error: 'nil' was not declared in this scope
133 | T = join(T,new Node{&nil[0],&nil[0],my_rand(),1,v[i],v[i]},0);
| ^~~
Main.cpp:133:45: error: 'my_rand' was not declared in this scope; did you mean 'srand'?
133 | T = join(T,new Node{&nil[0],&nil[0],my_rand(),1,v[i],v[i]},0);
| ^~~~~~~
| srand
Main.cpp:133:66: error: could not convert '{<expression error>, <expression error>, <expression error>, 1, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'Node'
133 | T = join(T,new Node{&nil[0],&nil[0],my_rand(),1,v[i],v[i]},0);
| ^
| |
| <brace-enclosed initializer list>
Main.cpp:138:9: error: 'rez' was not declared in this scope
138 | rez[q[poz].cnt] = query(q[poz].poz);
| ^~~
Main.cpp:150:13: error: 'rez' was not declared in this scope
150 | rez[q[poz].cnt] = query(q[poz].poz);
| ^~~
Main.cpp:155:9: error: 'rez' was not declared in this scope
155 | rez[q[i].cnt] = query(q[i].poz);
| ^~~
Main.cpp:159:15: error: 'rez' was not declared in this scope
159 | cout<<rez[i]<<'\n';
| ^~~