Submission #119573

#TimeUsernameProblemLanguageResultExecution timeMemory
119573win11905Hotter Colder (IOI10_hottercolder)C++11
25 / 100
10086 ms8072 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; int HC(int N){ int l = 1, r = N; if(N == 1) return N; if(N == 2) { Guess(1); int val = Guess(2); if(val == 1) return 2; else return 1; } if(N == 3) { Guess(1); int val = Guess(3); if(val == 1) return 3; if(val == 0) return 2; if(val == -1) return 1; } Guess(1); for(int i = 2; i <= N; ++i) { if(Guess(i) == -1) return i-1; } return N; }

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:6:8: warning: unused variable 'l' [-Wunused-variable]
    int l = 1, r = N;
        ^
hottercolder.cpp:6:15: warning: unused variable 'r' [-Wunused-variable]
    int l = 1, r = N;
               ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...