answer.code:3:7: error: expected nested-name-specifier before ‘i64’
3 | using i64 = long long;
| ^~~
answer.code:4:7: error: ‘i64’ does not name a type
4 | const i64 P = 998244353;
| ^~~
answer.code: In function ‘void solve()’:
answer.code:8:12: error: ‘i64’ was not declared in this scope
8 | vector<i64> a(n), b(n), ans(n);
| ^~~
answer.code:8:15: error: template argument 1 is invalid
8 | vector<i64> a(n), b(n), ans(n);
| ^
answer.code:8:15: error: template argument 2 is invalid
answer.code:9:8: error: expected ‘;’ before ‘res’
9 | i64 res = 0, mxb = 0;
| ^~~~
| ;
answer.code:10:22: error: ‘>>’ should be ‘> >’ within a nested template argument list
10 | set<pair<i64, int>> sa, sb;
| ^~
| > >
answer.code:10:22: error: template argument 1 is invalid
answer.code:10:22: error: template argument 2 is invalid
answer.code:10:22: error: template argument 3 is invalid
answer.code:12:17: error: invalid types ‘int[int]’ for array subscript
12 | cin >> a[i] >> b[i];
| ^
answer.code:12:25: error: invalid types ‘int[int]’ for array subscript
12 | cin >> a[i] >> b[i];
| ^
answer.code:13:12: error: request for member ‘insert’ in ‘sa’, which is of non-class type ‘int’
13 | sa.insert({a[i], i});
| ^~~~~~
answer.code:13:19: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
13 | sa.insert({a[i], i});
| ^
answer.code:13:21: error: invalid types ‘int[int]’ for array subscript
13 | sa.insert({a[i], i});
| ^
answer.code:14:12: error: request for member ‘insert’ in ‘sb’, which is of non-class type ‘int’
14 | sb.insert({b[i], i});
| ^~~~~~
answer.code:14:19: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
14 | sb.insert({b[i], i});
| ^
answer.code:14:21: error: invalid types ‘int[int]’ for array subscript
14 | sb.insert({b[i], i});
| ^
answer.code:15:9: error: ‘res’ was not declared in this scope
15 | res += a[i];
| ^~~
answer.code:15:17: error: invalid types ‘int[int]’ for array subscript
15 | res += a[i];
| ^
answer.code:16:9: error: ‘mxb’ was not declared in this scope
16 | mxb = max(mxb, b[i]);
| ^~~
answer.code:16:25: error: invalid types ‘int[int]’ for array subscript
16 | mxb = max(mxb, b[i]);
| ^
answer.code:18:5: error: ‘res’ was not declared in this scope
18 | res += mxb;
| ^~~
answer.code:18:12: error: ‘mxb’ was not declared in this scope
18 | res += mxb;
| ^~~
answer.code:19:8: error: invalid types ‘int[int]’ for array subscript
19 | ans[n - 1] = res;
| ^
answer.code:21:14: error: ‘tmp1’ does not name a type; did you mean ‘tm’?
21 | auto tmp1 = *sa.rbegin();
| ^~~~
| tm
answer.code:22:14: error: ‘tmp2’ does not name a type; did you mean ‘tm’?
22 | auto tmp2 = *sb.rbegin();
| ^~~~
| tm
answer.code:23:14: error: ‘tmp3’ does not name a type; did you mean ‘tm’?
23 | auto tmp3 = *prev(prev(sb.end()));
| ^~~~
| tm
answer.code:24:12: error: expected ‘;’ before ‘res1’
24 | i64 res1 = tmp1.first, res2 = a[tmp2.second] + b[tmp2.second] - b[tmp3.second];
| ^~~~~
| ;
answer.code:25:13: error: ‘res1’ was not declared in this scope
25 | if (res1 > res2) {
| ^~~~
answer.code:25:20: error: ‘res2’ was not declared in this scope
25 | if (res1 > res2) {
| ^~~~
answer.code:26:16: error: invalid types ‘int[int]’ for array subscript
26 | ans[i] = ans[i + 1] - res1;
| ^
answer.code:26:25: error: invalid types ‘int[int]’ for array subscript
26 | ans[i] = ans[i + 1] - res1;
| ^
answer.code:27:16: error: request for member ‘erase’ in ‘sa’, which is of non-class type ‘int’
27 | sa.erase(tmp1);
| ^~~~~
answer.code:27:22: error: ‘tmp1’ was not declared in this scope; did you mean ‘tm’?
27 | sa.erase(tmp1);
| ^~~~
| tm
answer.code:28:16: error: request for member ‘erase’ in ‘sb’, which is of non-class type ‘int’
28 | sb.erase({b[tmp1.second], tmp1.second});
| ^~~~~
answer.code:28:22: warning: extended initializer lists only available with...