Submission #524769

#TimeUsernameProblemLanguageResultExecution timeMemory
524769obokamanThe Big Prize (IOI17_prize)C++17
Compilation error
0 ms0 KiB
#include <iostream> using namespace std; int[] ask(int i); int find_best(int n) { for (int i = 0; i < n; ++i) { auto ans = ask(i); if (ans[0]==0 && ans[1]==0) { return i; } } return -1; }

Compilation message (stderr)

prize.cpp:5:4: error: structured binding declaration cannot have type 'int'
    5 | int[] ask(int i);
      |    ^~
prize.cpp:5:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
prize.cpp:5:4: error: empty structured binding declaration
prize.cpp:5:7: error: expected initializer before 'ask'
    5 | int[] ask(int i);
      |       ^~~
prize.cpp: In function 'int find_best(int)':
prize.cpp:9:16: error: 'ask' was not declared in this scope
    9 |     auto ans = ask(i);
      |                ^~~