friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:13:3: error: 'stack' was not declared in this scope; did you mean 'std::stack'?
13 | stack<pair<int,pair<int,int>>> s;
| ^~~~~
| std::stack
In file included from /usr/include/c++/10/stack:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:89,
from friend.cpp:2:
/usr/include/c++/10/bits/stl_stack.h:99:11: note: 'std::stack' declared here
99 | class stack
| ^~~~~
friend.cpp:13:9: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
13 | stack<pair<int,pair<int,int>>> s;
| ^~~~
| std::pair
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from friend.cpp:2:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
friend.cpp:13:14: error: expected primary-expression before 'int'
13 | stack<pair<int,pair<int,int>>> s;
| ^~~
friend.cpp:14:3: error: 'vector' was not declared in this scope
14 | vector<bool> vis(n);
| ^~~~~~
friend.cpp:14:3: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from friend.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 /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from friend.cpp:2:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
friend.cpp:14:10: error: expected primary-expression before 'bool'
14 | vector<bool> vis(n);
| ^~~~
friend.cpp:15:10: error: expected primary-expression before 'int'
15 | vector<int> col(n);
| ^~~
friend.cpp:16:3: error: 's' was not declared in this scope
16 | s.push({0,0,-1});
| ^
friend.cpp:18:9: error: expected primary-expression before 'int'
18 | pair<int,int> a = s.top();
| ^~~
friend.cpp:20:15: error: 'a' was not declared in this scope
20 | int node = a.first;
| ^
friend.cpp:23:4: error: 'col' was not declared in this scope; did you mean 'cosl'?
23 | col[node] = flag;
| ^~~
| cosl
friend.cpp:24:4: error: 'vis' was not declared in this scope
24 | vis[node] = true;
| ^~~
friend.cpp:25:18: error: 'adj' was not declared in this scope
25 | for (auto u : adj[node]){
| ^~~
friend.cpp:33:8: error: 'col' was not declared in this scope; did you mean 'cosl'?
33 | if (col[i] == 0){
| ^~~
| cosl
friend.cpp:40:10: error: 'max' was not declared in this scope; did you mean 'std::max'?
40 | return max(one,zero);
| ^~~
| std::max
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from friend.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
friend.cpp:42:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
42 | return ans;
| ^~~
| abs