Submission #271590

#TimeUsernameProblemLanguageResultExecution timeMemory
271590ggoorooThe Big Prize (IOI17_prize)C++14
20 / 100
1 ms384 KiB
#include "prize.h" #include<iostream> using namespace std; int n, l, r, md; vector<int> t; int find_best(int n) { int i; l = 0; r = n; while(l < r) { md = (l + r) / 2; t = ask(md); if (t[0] == 0 && t[1] == 0) return md; if (t[0] == 1) r = md; else l = md + 1; } return r; }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:8:6: warning: unused variable 'i' [-Wunused-variable]
    8 |  int i;
      |      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...