new_home.cpp: In function 'int main()':
new_home.cpp:21:50: error: template argument 2 is invalid
21 | vector<pair<int,pair<int,pair<int,int> > events;
| ^~~~~~
new_home.cpp:21:16: error: template argument 1 is invalid
21 | vector<pair<int,pair<int,pair<int,int> > events;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
new_home.cpp:21:16: error: template argument 2 is invalid
new_home.cpp:31:17: error: 'events' was not declared in this scope
31 | events.push_back({a[i], {-1, {x[i], t[i]}}});
| ^~~~~~
new_home.cpp:40:17: error: 'events' was not declared in this scope
40 | events.push_back({y, { 0, {l, i}}});
| ^~~~~~
new_home.cpp:44:14: error: 'events' was not declared in this scope
44 | sort(events.begin(), events.end());
| ^~~~~~
new_home.cpp:44:9: error: 'sort' was not declared in this scope; did you mean 'short'?
44 | sort(events.begin(), events.end());
| ^~~~
| short
new_home.cpp:45:32: error: conflicting declaration 'std::vector<std::multiset<int> > store'
45 | vector<multiset<int> > store(k);
| ^~~~~
new_home.cpp:19:23: note: previous declaration as 'std::multiset<int> store'
19 | multiset<int> store;
| ^~~~~
new_home.cpp:52:30: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
52 | store[store_type].insert(l);
| ^
new_home.cpp:58:40: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
58 | auto it = store[store_type].find(l);
| ^
new_home.cpp:59:30: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
59 | store[store_type].erase(it);
| ^
new_home.cpp:70:48: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
70 | auto it = store[j].upper_bound(l);
| ^
new_home.cpp:71:48: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
71 | if (it != store[j].end()) nearest = abs(*it - l);
| ^
new_home.cpp:72:43: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
72 | it = store[j].lower_bound(l);
| ^
new_home.cpp:73:48: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
73 | if (it != store[j].begin()){
| ^