Submission #754532

#TimeUsernameProblemLanguageResultExecution timeMemory
754532ValiAntonieHotter Colder (IOI10_hottercolder)C++14
50 / 100
509 ms8104 KiB
#include "grader.h" #include<bits/stdc++.h> using namespace std; int Guess (int x); int HC(int N){ int st=1,dr=N; Guess(st); int a = Guess(dr); int prev = -1; while(st!=dr){ int mij = (st+ dr) >> 1; if(a==-1){ dr= mij; if(st != dr){ Guess(st); a = Guess(dr); } } else if(a==1){//close to l st = mij + 1; if(st != dr){ Guess(st); a = Guess(dr); } } else return mij; } return st; }

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:11:5: warning: unused variable 'prev' [-Wunused-variable]
   11 | int prev = -1;
      |     ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...