Submission #797245

#TimeUsernameProblemLanguageResultExecution timeMemory
797245firewaterThe Big Prize (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; }

Compilation message (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...