elephants.cpp: In function 'void fix(int)':
elephants.cpp:13:25: error: 'struct std::pair<int, int>' has no member named 'size'
13 | for (int i = arr[b].size()-1; i >= 0; --i) {
| ^~~~
elephants.cpp:14:25: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int')
14 | int val = arr[b][i].first + l;
| ^
elephants.cpp:16:27: error: 'struct std::pair<int, int>' has no member named 'back'
16 | if (val >= arr[b].back()) {
| ^~~~
elephants.cpp:17:22: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int')
17 | to[arr[b][i].second] = val;
| ^
elephants.cpp:18:23: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int')
18 | cnt[arr[b][i].second] = 1;
| ^
elephants.cpp:21:42: error: 'struct std::pair<int, int>' has no member named 'begin'
21 | auto it = upper_bound(arr[b].begin(), arr[b].end(),
| ^~~~~
elephants.cpp:21:58: error: 'struct std::pair<int, int>' has no member named 'end'
21 | auto it = upper_bound(arr[b].begin(), arr[b].end(),
| ^~~
elephants.cpp:24:22: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int')
24 | to[arr[b][i].second] = to[(*it).second];
| ^
elephants.cpp:25:23: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int')
25 | cnt[arr[b][i].second] = cnt[(*it).second] + 1;
| ^
elephants.cpp: In function 'void construct()':
elephants.cpp:32:16: error: 'struct std::pair<int, int>' has no member named 'clear'
32 | arr[i].clear();
| ^~~~~
elephants.cpp:38:19: error: 'struct std::pair<int, int>' has no member named 'push_back'
38 | arr[i/SZ].push_back(*it);
| ^~~~~~~~~
elephants.cpp: In function 'int update(int, int)':
elephants.cpp:60:37: error: 'struct std::pair<int, int>' has no member named 'size'
60 | for (int j = 0; j < arr[bkt[i]].size(); ++j) {
| ^~~~
elephants.cpp:61:24: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int')
61 | if (arr[bkt[i]][j].second == i) {
| ^
elephants.cpp:62:25: error: 'struct std::pair<int, int>' has no member named 'erase'
62 | arr[bkt[i]].erase(arr[bkt[i]].begin() + j);
| ^~~~~
elephants.cpp:62:43: error: 'struct std::pair<int, int>' has no member named 'begin'
62 | arr[bkt[i]].erase(arr[bkt[i]].begin() + j);
| ^~~~~
elephants.cpp:70:34: error: 'struct std::pair<int, int>' has no member named 'size'
70 | if (b == SZ-1 || (arr[b].size() && arr[b].back().first > y)) {
| ^~~~
elephants.cpp:70:51: error: 'struct std::pair<int, int>' has no member named 'back'
70 | if (b == SZ-1 || (arr[b].size() && arr[b].back().first > y)) {
| ^~~~
elephants.cpp:72:20: error: 'struct std::pair<int, int>' has no member named 'push_back'
72 | arr[b].push_back({pos[i] = y, i});
| ^~~~~~~~~
elephants.cpp:73:25: error: 'struct std::pair<int, int>' has no member named 'begin'
73 | sort(arr[b].begin(), arr[b].end());
| ^~~~~
elephants.cpp:73:41: error: 'struct std::pair<int, int>' has no member named 'end'
73 | sort(arr[b].begin(), arr[b].end());
| ^~~
elephants.cpp:83:20: error: 'struct std::pair<int, int>' has no member named 'size'
83 | if (arr[b].size() && arr[b].back().first > cur) {
| ^~~~
elephants.cpp:83:37: error: 'struct std::pair<int, int>' has no member named 'back'
83 | if (arr[b].size() && arr[b].back().first > cur) {
| ^~~~
elephants.cpp:84:42: error: 'struct std::pair<int, int>' has no member named 'begin'
84 | auto it = upper_bound(arr[b].begin(), arr[b].end(),
| ^~~~~
elephants.cpp:84:58: error: 'struct std::pair<int, int>' has no member named 'end'
84 | auto it = upper_bound(arr[b].begin(), arr[b].end(),
| ^~~