collapse.cpp:85:37: error: 'vecotr' has not been declared
85 | vector<int> simulateCollapse(int N, vecotr<int> C, vector<int> X, vecotr<int> Y, vector<int> W, vector<int>P)
| ^~~~~~
collapse.cpp:85:43: error: expected ',' or '...' before '<' token
85 | vector<int> simulateCollapse(int N, vecotr<int> C, vector<int> X, vecotr<int> Y, vector<int> W, vector<int>P)
| ^
collapse.cpp: In function 'std::vector<int> simulateCollapse(int, int)':
collapse.cpp:90:20: error: 'C' was not declared in this scope
90 | int n = N, m = C.size(), T = W.size();
| ^
collapse.cpp:94:12: error: 'x' was not declared in this scope
94 | if(x > y) swap(x, y);
| ^
collapse.cpp:94:16: error: 'y' was not declared in this scope
94 | if(x > y) swap(x, y);
| ^
collapse.cpp:98:16: error: 'x' was not declared in this scope
98 | M[{x, y}] = (int)eg.size();
| ^
collapse.cpp:98:19: error: 'y' was not declared in this scope
98 | M[{x, y}] = (int)eg.size();
| ^
collapse.cpp:98:14: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>' and '<brace-enclosed initializer list>')
98 | M[{x, y}] = (int)eg.size();
| ^
In file included from /usr/include/c++/10/map:61,
from collapse.cpp:6:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<int, int>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::pair<int, int>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<int, int>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::pair<int, int>, int>::key_type&&' {aka 'std::pair<int, int>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
collapse.cpp:99:32: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)'
99 | eg.push_back({x, y});
| ^
In file included from /usr/include/c++/10/vector:67,
from collapse.cpp:2:
/usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
1187 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'}
1187 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
1203 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'}
1203 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
collapse.cpp:104:19: error: 'x' was not declared in this scope
104 | lf[M[{x, y}]].ss = i;
| ^
collapse.cpp:104:22: error: 'y' was not declared in this scope
104 | lf[M[{x, y}]].ss = i;
| ^
collapse.cpp:104:17: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>' and '<brace-enclosed initializer list>')
104 | lf[M[{x, y}]].ss = i;
| ^
In file included from /usr/include/c++/10/map:61,
from collapse.cpp:6:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<int, int>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::pair<int, int>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<int, int>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::pair<int, int>, int>::key_type&&' {aka 'std::pair<int, int>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
collapse.cpp:105:27: error: no matching function for call to 'std::map<std::pair<int, int>, int>::erase(<brace-enclosed initializer list>)'
105 | M.erase({x, y});
| ^
In file included from /usr/include/c++/10/map:61,
from collapse.cpp:6:
/usr/include/c++/10/bits/stl_map.h:1031:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::erase(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<const std::pair<int, int>, int> > >::iterator; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<const std::pair<int, int>, int> > >::const_iterator]'
1031 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/10/bits/stl_map.h:1031:28: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::pair<int, int>, int>::const_iterator' {aka 'std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<const std::pair<int, int>, int> > >::const_iterator'}
1031 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/10/bits/stl_map.h:1037:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::erase(std::map<_Key, _Tp, _Compare, _Alloc>::iterator) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<const std::pair<int, int>, int> > >::iterator]'
1037 | erase(iterator __position)
| ^~~~~
/usr/include/c++/10/bits/stl_map.h:1037:22: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::pair<int, int>, int>::iterator' {aka 'std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<const std::pair<int, int>, int> > >::iterator'}
1037 | erase(iterator __position)
| ~~~~~~~~~^~~~~~~~~~
/usr/include/c++/10/bits/stl_map.h:1068:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::size_type std::map<_Key, _Tp, _Compare, _Alloc>::erase(const key_type&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::size_type = long unsigned int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<int, int>]'
1068 | erase(const key_type& __x)
| ^~~~~
/usr/include/c++/10/bits/stl_map.h:1068:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::pair<int, int>&'}
1068 | erase(const key_type& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:1088:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::erase(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<const std::pair<int, int>, int> > >::iterator; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<const std::pair<int, int>, int> > >::const_iterator]'
1088 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/10/bits/stl_map.h:1088:7: note: candidate expects 2 arguments, 1 provided
collapse.cpp:114:24: error: 'T' was not declared in this scope
114 | for(int i = 0; i < T; ++i)
| ^
collapse.cpp:116:17: error: 'W' was not declared in this scope
116 | int x = W[i], y = P[i];
| ^
collapse.cpp:117:12: error: 'y' was not declared in this scope
117 | qr[y].push_back({x, i});
| ^
collapse.cpp:120:21: error: 'T' was not declared in this scope
120 | vector<int> ans(T); for(auto &i : ans) i = n;
| ^