Problem airplane2
User personjs
Submission Time 2026-02-27 10:46:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

airplane2.cpp:8:11: error: two or more data types in declaration of ‘maxn’
8 | const int maxn = 2e5;
| ^~~~
airplane2.cpp:9:7: error: ‘maxn’ was not declared in this scope
9 | int a[maxn], h, w, k;
| ^~~~
airplane2.cpp: In function ‘bool check(int)’:
airplane2.cpp:14:31: error: ‘a’ was not declared in this scope
14 | if (x - abs(prev.fi - a[i]) + prev.se > h) return false;
| ^
airplane2.cpp:15:17: error: ‘a’ was not declared in this scope
15 | prev = {a[i], max(0, x - abs(prev.fi - a[i])) + prev.se};
| ^
airplane2.cpp:15:64: error: no match for ‘operator=’ (operand types are ‘std::pair<int, int>’ and ‘<brace-enclosed initializer list>’)
15 | prev = {a[i], max(0, x - abs(prev.fi - a[i])) + prev.se};
| ^
In file included from /usr/in