Submission #524770

#TimeUsernameProblemLanguageResultExecution timeMemory
524770obokamanThe Big Prize (IOI17_prize)C++17
Compilation error
0 ms0 KiB
#include <iostream>

using namespace std;

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: In function 'int find_best(int)':
prize.cpp:7:16: error: 'ask' was not declared in this scope
    7 |     auto ans = ask(i);
      |                ^~~