boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:4:12: error: 'pair' was not declared in this scope
4 | vector<pair<int, int>> v;
| ^~~~
boxes.cpp:4:5: error: 'vector' was not declared in this scope
4 | vector<pair<int, int>> v;
| ^~~~~~
boxes.cpp:4:17: error: expected primary-expression before 'int'
4 | vector<pair<int, int>> v;
| ^~~
boxes.cpp:7:13: error: 'v' was not declared in this scope
7 | v.push_back({ L - p[i], 1 });
| ^
boxes.cpp:9:13: error: 'v' was not declared in this scope
9 | v.push_back({ p[i], 0 });
| ^
boxes.cpp:13:10: error: 'v' was not declared in this scope
13 | sort(v.rbegin(), v.rend());
| ^
boxes.cpp:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort(v.rbegin(), v.rend());
| ^~~~
| short
boxes.cpp:15:12: error: expected primary-expression before 'int'
15 | vector<int> l, r;
| ^~~
boxes.cpp:16:48: error: 'r' was not declared in this scope
16 | for (int i = 0; i < N; i++) (v[i].second ? r : l).push_back(v[i].first);
| ^
boxes.cpp:16:52: error: 'l' was not declared in this scope
16 | for (int i = 0; i < N; i++) (v[i].second ? r : l).push_back(v[i].first);
| ^
boxes.cpp:18:12: error: expected primary-expression before 'long'
18 | vector<long long> dpl((int) l.size() + 1, 0), dpr((int) r.size() + 1, 0);
| ^~~~
boxes.cpp:19:24: error: 'l' was not declared in this scope
19 | for (int i = (int) l.size() - 1; i >= 0; i--) {
| ^
boxes.cpp:20:9: error: 'dpl' was not declared in this scope
20 | dpl[i] = l[i] * 2;
| ^~~
boxes.cpp:21:21: error: 'size' was not declared in this scope
21 | if (i + K < size(l)) dpl[i] += dpl[i + K];
| ^~~~
boxes.cpp:24:24: error: 'r' was not declared in this scope
24 | for (int i = (int) r.size() - 1; i >= 0; i--) {
| ^
boxes.cpp:25:9: error: 'dpr' was not declared in this scope
25 | dpr[i] = r[i] * 2;
| ^~~
boxes.cpp:26:21: error: 'size' was not declared in this scope
26 | if (i + K < size(r)) dpr[i] += dpr[i + K];
| ^~~~
boxes.cpp:36:40: error: 'dpl' was not declared in this scope
36 | ans = min(ans, i / K * L + dpl[cl] + dpr[cr]);
| ^~~
boxes.cpp:36:50: error: 'dpr' was not declared in this scope
36 | ans = min(ans, i / K * L + dpl[cl] + dpr[cr]);
| ^~~
boxes.cpp:36:19: error: 'min' was not declared in this scope
36 | ans = min(ans, i / K * L + dpl[cl] + dpr[cr]);
| ^~~