제출 #833764

#제출 시각아이디문제언어결과실행 시간메모리
833764caganyanmaz커다란 상품 (IOI17_prize)C++17
0 / 100
1 ms304 KiB
#include <bits/stdc++.h> #include "prize.h" using namespace std; //#define DEBUGGING #ifdef DEBUGGING #include "../debug.h" #else #define debug(x...) void(42) #endif int find_best(int n) { int l = -1, r = n+1; while (r - l > 1) { int m = l+r>>1; vector<int> res = ask(m); debug(m, res[0], res[1] ); if ((res[0] + res[1] > 1)) return m; if (res[0] == 1) r = m; else l = m; } return l; }

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

prize.cpp: In function 'int find_best(int)':
prize.cpp:17:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   17 |   int m = l+r>>1;
      |           ~^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...