Submission #597842

#TimeUsernameProblemLanguageResultExecution timeMemory
597842yanndevThe Big Prize (IOI17_prize)C++17
Compilation error
0 ms0 KiB
#include "prize.h" #include <bits/stdc++.h> using namespace std; int find_best(int n) { for (int i = 0; i < n; i++) { vector<int> a = ask(i); if (a[0] == 0 && a[1] == 0) return i; int l = i; int r = n; while (l < r) { int m = (l + r + 1) / 2; vector<int> b = ask(m); if (b[0] == a[0] && b[1] == a[1]) l = m; else r = m - 1; } //cout << "poor range " << i << ' ' << l << '\n'; i = l } }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:23:14: error: expected ';' before '}' token
   23 |         i = l
      |              ^
      |              ;
   24 |     }
      |     ~         
prize.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^