제출 #365128

#제출 시각아이디문제언어결과실행 시간메모리
365128MilosMilutinovicHotter Colder (IOI10_hottercolder)C++14
0 / 100
10087 ms8172 KiB
#include "grader.h" #include <bits/stdc++.h> using namespace std; int HC(int n){ int bot = 1, top = n; while (bot <= top) { int mid = bot + top >> 1; int x = Guess(bot), y = Guess(top); if (y == 0) { return mid; } if (y < 0) { top = mid - 1; } else { bot = mid + 1; } } }

컴파일 시 표준 에러 (stderr) 메시지

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:9:19: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
    9 |     int mid = bot + top >> 1;
      |               ~~~~^~~~~
hottercolder.cpp:10:9: warning: unused variable 'x' [-Wunused-variable]
   10 |     int x = Guess(bot), y = Guess(top);
      |         ^
hottercolder.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type]
   20 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...