Problem duckhunt2
User gohchingjayk
Submission Time 2025-12-12 20:43:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckhunt2.cpp: In lambda function:
duckhunt2.cpp:122:27: error: ‘i’ was not declared in this scope
122 | if (node->earliest() < i) {
| ^
duckhunt2.cpp: In function ‘int main()’:
duckhunt2.cpp:132:3: error: expected ‘,’ or ‘;’ before ‘return’
132 | return !node->v;
| ^~~~~~
duckhunt2.cpp: At global scope:
duckhunt2.cpp:137:2: error: expected unqualified-id before ‘while’
137 | while (lo <= hi) {
| ^~~~~
duckhunt2.cpp:147:2: error: ‘cout’ does not name a type
147 | cout << best << '\n';
| ^~~~
duckhunt2.cpp:148:2: error: expected unqualified-id before ‘if’
148 | if (best != -1) {
| ^~
duckhunt2.cpp:153:1: error: expected declaration before ‘}’ token
153 | }
| ^