Submission #232005

#TimeUsernameProblemLanguageResultExecution timeMemory
232005Coroian_DavidHotter Colder (IOI10_hottercolder)C++11
Compilation error
0 ms0 KiB
#include "grader.h" int cautBin() { ///VARIANTA CEA MAI PENALA DOAMNE ///Guess(st) and Guess(dr) fail because when we have 1 500 and 250 or 1 6 and 3 /// it will not give the right number, it makes no use of the same answer int st = 1; int dr = DR; while(st < dr) { if(st == 1 && dr == 2) { Guess(1); int x = Guess(2); return (x == 1 ? 2 : 1); } int mid = (st + dr) >> 1; Guess(mid - 1); int x = Guess(mid + 1); if(x == 0) return mid; if(x == 1) st = mid + 1; else dr = mid - 1; } return st; }

Compilation message (stderr)

hottercolder.cpp: In function 'int cautBin()':
hottercolder.cpp:9:14: error: 'DR' was not declared in this scope
     int dr = DR;
              ^~