Submission #298464

#TimeUsernameProblemLanguageResultExecution timeMemory
298464medkThe Big Prize (IOI17_prize)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "prize.h" #define ll long long #define pb push_back #define x first #define y second #define sz(u) (int)(u.size()) #define all(u) u.begin(),u.end() using namespace std; vector<int> tmp; int find_best(int N){ int ptr=0; int curL=1, curR=1; while(1){ tmp=ask(ptr); if(tmp[0]+tmp[1]==0) break; curL=tmp[0] curR=tmp[1]; int l=0,r=N-1; while(l<r){ int md=(l+r+1)/2; tmp=ask(md); if(tmp[0]!=curL || tmp[1]!=curR) r=md-1; else l=md; } ptr=l+1; } return ptr; }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:21:20: error: expected ';' before 'curR'
   21 |         curL=tmp[0]
      |                    ^
      |                    ;
   22 |         curR=tmp[1];
      |         ~~~~