plants.cpp:6:26: error: wrong number of template arguments (1, should be 2)
6 | vector<pair<pair<int, int>> p;
| ^~
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 plants.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
211 | struct pair
| ^~~~
plants.cpp:6:29: error: template argument 1 is invalid
6 | vector<pair<pair<int, int>> p;
| ^
plants.cpp:6:29: error: template argument 2 is invalid
plants.cpp: In function 'void init(int, std::vector<int>)':
plants.cpp:10:5: error: 'p' was not declared in this scope
10 | p.resize(n);
| ^
plants.cpp: In function 'int compare_plants(int, int)':
plants.cpp:29:14: error: 'p' was not declared in this scope
29 | auto a = p[x].first, b = p[y].first;
| ^
plants.cpp:30:19: error: 'b' was not declared in this scope
30 | if(a.first == b.first || a.first == b.second || a.second == b.first || a.second == b.second) {
| ^