assistant.cpp: In function 'void Assist(unsigned char*, int, int, int)':
assistant.cpp:5:7: error: 'vector' was not declared in this scope
5 | vector<int> V(N),cnt(N);
| ^~~~~~
assistant.cpp:5:7: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from assistant.cpp:2:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'std::vector'
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from assistant.cpp:2:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
assistant.cpp:5:14: error: expected primary-expression before 'int'
5 | vector<int> V(N),cnt(N);
| ^~~
assistant.cpp:6:7: error: 'set' was not declared in this scope
6 | set<int> S;
| ^~~
assistant.cpp:6:7: note: suggested alternatives:
In file included from /usr/include/c++/10/set:61,
from assistant.cpp:3:
/usr/include/c++/10/bits/stl_set.h:94:11: note: 'std::set'
94 | class set
| ^~~
In file included from assistant.cpp:3:
/usr/include/c++/10/set:78:13: note: 'std::pmr::set'
78 | using set = std::set<_Key, _Cmp, polymorphic_allocator<_Key>>;
| ^~~
assistant.cpp:6:11: error: expected primary-expression before 'int'
6 | set<int> S;
| ^~~
assistant.cpp:7:11: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
7 | set<pair<int,int>> M;
| ^~~~
| std::pair
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/vector:60,
from assistant.cpp:2:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
assistant.cpp:7:16: error: expected primary-expression before 'int'
7 | set<pair<int,int>> M;
| ^~~
assistant.cpp:8:27: error: 'S' was not declared in this scope
8 | for(int i=0;i<K;i++)S.insert(i);
| ^
assistant.cpp:11:13: error: 'V' was not declared in this scope
11 | V[i/20]*=2;
| ^
assistant.cpp:15:21: error: expected primary-expression before 'int'
15 | vector<vector<int>> needed(N,vector<int>());
| ^~~
assistant.cpp:16:27: error: 'needed' was not declared in this scope
16 | for(int i=0;i<N;i++)needed[i].push_back(N);
| ^~~~~~
assistant.cpp:17:30: error: 'needed' was not declared in this scope
17 | for(int i=N-1;i>=0;i++)needed[V[i]].push_back(i);
| ^~~~~~
assistant.cpp:17:37: error: 'V' was not declared in this scope
17 | for(int i=N-1;i>=0;i++)needed[V[i]].push_back(i);
| ^
assistant.cpp:19:9: error: 'M' was not declared in this scope
19 | M.insert({-needed[i].back(),i});
| ^
assistant.cpp:19:20: error: 'needed' was not declared in this scope
19 | M.insert({-needed[i].back(),i});
| ^~~~~~
assistant.cpp:21:27: error: 'cnt' was not declared in this scope; did you mean 'int'?
21 | for(int i=0;i<N;i++)cnt[i]=needed[i].size()-1;
| ^~~
| int
assistant.cpp:21:34: error: 'needed' was not declared in this scope
21 | for(int i=0;i<N;i++)cnt[i]=needed[i].size()-1;
| ^~~~~~
assistant.cpp:24:13: error: 'S' was not declared in this scope
24 | if (S.find(req)==S.end()){
| ^
assistant.cpp:25:21: error: 'M' was not declared in this scope
25 | auto it=M.begin();
| ^
assistant.cpp:30:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
30 | cnt[req]--;
| ^~~
| int
assistant.cpp:31:24: error: 'needed' was not declared in this scope
31 | M.insert({-needed[req][cnt[req]],req});
| ^~~~~~
assistant.cpp:34:13: error: 'M' was not declared in this scope
34 | M.erase({-needed[req][cnt[req]],req});
| ^
assistant.cpp:34:23: error: 'needed' was not declared in this scope
34 | M.erase({-needed[req][cnt[req]],req});
| ^~~~~~
assistant.cpp:34:35: error: 'cnt' was not declared in this scope; did you mean 'int'?
34 | M.erase({-needed[req][cnt[req]],req});
| ^~~
| int