answer.code:5:13: error: ‘pair’ does not name a type
5 | #define pii pair<int, int>
| ^~~~
answer.code:9:1: note: in expansion of macro ‘pii’
9 | pii a[N];
| ^~~
answer.code: In function ‘bool check(long long int)’:
answer.code:12:5: error: ‘vector’ was not declared in this scope
12 | vector<int> p1(n + 1, 0), p2(n + 1, 0);
| ^~~~~~
answer.code:1:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
+++ |+#include <vector>
1 |
answer.code:3:13: error: expected primary-expression before ‘long’
3 | #define int long long
| ^~~~
answer.code:12:12: note: in expansion of macro ‘int’
12 | vector<int> p1(n + 1, 0), p2(n + 1, 0);
| ^~~
answer.code:14:9: error: ‘p1’ was not declared in this scope
14 | p1[i] = p1[i - 1] + (a[i].F >= k);
| ^~
answer.code:14:30: error: ‘a’ was not declared in this scope
14 | p1[i] = p1[i - 1] + (a[i].F >= k);
| ^
answer.code:15:9: error: ‘p2’ was not declared in this scope
15 | p2[i] = p2[i - 1] + (a[i].S >= k);
| ^~
answer.code:19:22: error: ‘p2’ was not declared in this scope
19 | mi = min(mi, p2[r] - p1[r]);
| ^~
answer.code:19:30: error: ‘p1’ was not declared in this scope
19 | mi = min(mi, p2[r] - p1[r]);
| ^~
answer.code:19:14: error: ‘min’ was not declared in this scope; did you mean ‘mi’?
19 | mi = min(mi, p2[r] - p1[r]);
| ^~~
| mi
answer.code:20:15: error: ‘max’ was not declared in this scope
20 | ret = max(ret, p1[n] - p1[r] + p2[r] - mi);
| ^~~
answer.code: In function ‘void solve()’:
answer.code:25:5: error: ‘cin’ was not declared in this scope
25 | cin >> n;
| ^~~
answer.code:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 |
answer.code:27:16: error: ‘a’ was not declared in this scope
27 | cin >> a[i].F >> a[i].S;
| ^
answer.code:33:5: error: ‘cout’ was not declared in this scope
33 | cout << ans << "\n";
| ^~~~
answer.code:33:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
answer.code: In function ‘int main()’:
answer.code:36:5: error: ‘ios_base’ has not been declared
36 | ios_base::sync_with_stdio(0), cin.tie(0);
| ^~~~~~~~
answer.code:36:35: error: ‘cin’ was not declared in this scope
36 | ios_base::sync_with_stdio(0), cin.tie(0);
| ^~~
answer.code:36:35: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?