collapse.cpp:99:29: error: 'shared_ptr' was not declared in this scope
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~~~~~~~
collapse.cpp:99:29: note: suggested alternative: 'char16_t'
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~~~~~~~
char16_t
collapse.cpp:99:62: error: template argument 2 is invalid
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~
collapse.cpp:99:29: error: 'shared_ptr' was not declared in this scope
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~~~~~~~
collapse.cpp:99:29: note: suggested alternative: 'char16_t'
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~~~~~~~
char16_t
collapse.cpp:99:62: error: template argument 2 is invalid
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~
collapse.cpp:99:29: error: 'shared_ptr' was not declared in this scope
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~~~~~~~
collapse.cpp:99:29: note: suggested alternative: 'char16_t'
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~~~~~~~
char16_t
collapse.cpp:99:62: error: template argument 2 is invalid
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~
collapse.cpp:99:29: error: 'shared_ptr' was not declared in this scope
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~~~~~~~
collapse.cpp:99:29: note: suggested alternative: 'char16_t'
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~~~~~~~
char16_t
collapse.cpp:99:62: error: template argument 2 is invalid
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~
collapse.cpp:99:19: error: invalid template-id
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~
collapse.cpp:99:29: error: 'shared_ptr' was not declared in this scope
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~~~~~~~
collapse.cpp:99:29: note: suggested alternative: 'char16_t'
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~~~~~~~
char16_t
collapse.cpp:99:19: error: type/value mismatch at argument 2 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~~~
collapse.cpp:99:19: note: expected a type, got 'pair'
collapse.cpp:99:64: error: template argument 1 is invalid
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^~
collapse.cpp:99:64: error: template argument 2 is invalid
collapse.cpp:99:66: error: expected ',' or '...' before '>' token
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>> query
^
collapse.cpp: In function 'std::vector<std::pair<int, int> > solve(int, std::vector<std::pair<int, int> >, int)':
collapse.cpp:102:54: error: 'shared_ptr' was not declared in this scope
auto comp_first_only = [](const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& a, const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& b){ return a.first < b.first; };
^~~~~~~~~~
collapse.cpp:102:54: note: suggested alternative: 'char16_t'
auto comp_first_only = [](const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& a, const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& b){ return a.first < b.first; };
^~~~~~~~~~
char16_t
collapse.cpp:102:87: error: template argument 2 is invalid
auto comp_first_only = [](const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& a, const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& b){ return a.first < b.first; };
^~
collapse.cpp:102:44: error: template argument 2 is invalid
auto comp_first_only = [](const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& a, const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& b){ return a.first < b.first; };
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
collapse.cpp:102:89: error: expected ',' or '...' before '>' token
auto comp_first_only = [](const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& a, const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& b){ return a.first < b.first; };
^~
collapse.cpp: In lambda function:
collapse.cpp:102:172: error: 'a' was not declared in this scope
auto comp_first_only = [](const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& a, const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& b){ return a.first < b.first; };
^
collapse.cpp:102:182: error: 'b' was not declared in this scope
auto comp_first_only = [](const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& a, const pair<int, pair<int, shared_ptr<vector<pair<int, int> >>>>& b){ return a.first < b.first; };
^
collapse.cpp: In function 'std::vector<std::pair<int, int> > solve(int, std::vector<std::pair<int, int> >, int)':
collapse.cpp:104:11: error: 'query' was not declared in this scope
sort(all(query), comp_first_only);
^
collapse.cpp:28:17: note: in definition of macro 'all'
#define all(c) (c).begin(), (c).end()
^
collapse.cpp:109:15: error: unable to deduce 'auto&&' from 'query'
for (auto i: query) {
^~~~~
collapse.cpp: In function 'std::vector<int> simulateCollapse(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
collapse.cpp:167:30: error: 'shared_ptr' was not declared in this scope
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >> > > > query1, query2;
^~~~~~~~~~
collapse.cpp:167:30: note: suggested alternative: 'char16_t'
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >> > > > query1, query2;
^~~~~~~~~~
char16_t
collapse.cpp:167:63: error: template argument 2 is invalid
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >> > > > query1, query2;
^~
collapse.cpp:167:66: error: template argument 2 is invalid
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >> > > > query1, query2;
^
collapse.cpp:167:68: error: template argument 1 is invalid
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >> > > > query1, query2;
^
collapse.cpp:167:68: error: template argument 2 is invalid
collapse.cpp:167:70: error: expected unqualified-id before '>' token
vector<pair<int, pair<int, shared_ptr<vector<pair<int, int> >> > > > query1, query2;
^
collapse.cpp:176:39: error: expected primary-expression before '>' token
shared_ptr<vector<pair<int, int> > > p1(new vector<pair<int, int> >), p2(new vector<pair<int, int> >);
^
collapse.cpp:176:41: error: 'p1' was not declared in this scope
shared_ptr<vector<pair<int, int> > > p1(new vector<pair<int, int> >), p2(new vector<pair<int, int> >);
^~
collapse.cpp:176:41: note: suggested alternative: 'y1'
shared_ptr<vector<pair<int, int> > > p1(new vector<pair<int, int> >), p2(new vector<pair<int, int> >);
^~
y1
collapse.cpp:176:74: error: 'p2' was not declared in this scope
shared_ptr<vector<pair<int, int> > > p1(new vector<pair<int, int> >), p2(new vector<pair<int, int> >);
^~
collapse.cpp:176:74: note: suggested alternative: 'pb'
shared_ptr<vector<pair<int, int> > > p1(new vector<pair<int, int> >), p2(new vector<pair<int, int> >);
^~
pb
collapse.cpp:182:5: error: 'query1' was not declared in this scope
query1.pb(make_pair(q[now].first.second, make_pair(q[now].second, p1)));
^~~~~~
collapse.cpp:183:5: error: 'query2' was not declared in this scope
query2.pb(make_pair(N - 2 - q[now].first.second, make_pair(q[now].second, p2)));
^~~~~~
collapse.cpp:187:33: error: 'query1' was not declared in this scope
for (auto x: solve(N, fixed1, query1)) {
^~~~~~
collapse.cpp:190:33: error: 'query2' was not declared in this scope
for (auto x: solve(N, fixed2, query2)) {
^~~~~~