제출 #797245

#제출 시각아이디문제언어결과실행 시간메모리
797245firewater커다란 상품 (IOI17_prize)C++14
20 / 100
1 ms296 KiB
#include "prize.h" #include <vector> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #define ll long long using namespace std; int l,r; vector<int>s; int find_best(int n) { l=0;r=n-1; while(l<r){ int mid=l+r+1>>1; s=ask(mid); if(s[0])r=mid-1; else l=mid; } return l; }

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

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