제출 #524770

#제출 시각아이디문제언어결과실행 시간메모리
524770obokaman커다란 상품 (IOI17_prize)C++17
컴파일 에러
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;
}

컴파일 시 표준 에러 (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);
      |                ^~~