Submission #754533

#TimeUsernameProblemLanguageResultExecution timeMemory
754533ValiAntonieHotter Colder (IOI10_hottercolder)C++14
Compilation error
0 ms0 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); prev = 0; } } else if(a==1){//close to l st = mij + 1; if(st != dr){ if(prev == 0){ x = Guess(st); x = -x; prev = 1; } else{ Guess(st); x = Guess(dr); prev = 0; } } } else return mij; } return st; }

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:26:13: error: 'x' was not declared in this scope
   26 |             x = Guess(st);
      |             ^
hottercolder.cpp:32:13: error: 'x' was not declared in this scope
   32 |             x = Guess(dr);
      |             ^