Submission #125905

#TimeUsernameProblemLanguageResultExecution timeMemory
125905chubyxdxdThe Big Prize (IOI17_prize)C++11
0 / 100
2 ms376 KiB
#include "prize.h" #include <bits/stdc++.h> using namespace std; int find_best(int n) { int a,b,c,d,f; int low=0;int hi=n-1,mid; while(low-hi>1){ mid=(low+hi)/2; vector<int> v=ask(mid); if(v[0]==0 and v[1]==0){ return mid; break; } if(v[0]<v[1]){ low=mid; } else{ hi=mid; } } return ((low+hi)/2); }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:6:6: warning: unused variable 'a' [-Wunused-variable]
  int a,b,c,d,f;
      ^
prize.cpp:6:8: warning: unused variable 'b' [-Wunused-variable]
  int a,b,c,d,f;
        ^
prize.cpp:6:10: warning: unused variable 'c' [-Wunused-variable]
  int a,b,c,d,f;
          ^
prize.cpp:6:12: warning: unused variable 'd' [-Wunused-variable]
  int a,b,c,d,f;
            ^
prize.cpp:6:14: warning: unused variable 'f' [-Wunused-variable]
  int a,b,c,d,f;
              ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...