Submission #283679

#TimeUsernameProblemLanguageResultExecution timeMemory
283679erd1The Big Prize (IOI17_prize)C++14
Compilation error
0 ms0 KiB
#include "prize.h" #incldue<bits/stdc++.h> using namespace std; #define pb push_back #define ff first #define ss second #define all(x) (x).begin(), (x).end() int find_best(int n) { int l = 0, r = n; while(true){ vector<int> res = ask(l+r>>1); if(res[0] + res[1] == 0) return i; if(res[0])r = (l+r>>1); else l = (l+r>>1)+1; } }

Compilation message (stderr)

prize.cpp:3:2: error: invalid preprocessing directive #incldue; did you mean #include?
    3 | #incldue<bits/stdc++.h>
      |  ^~~~~~~
      |  include
prize.cpp: In function 'int find_best(int)':
prize.cpp:13:26: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   13 |   vector<int> res = ask(l+r>>1);
      |                         ~^~
prize.cpp:15:11: error: 'i' was not declared in this scope
   15 |    return i;
      |           ^
prize.cpp:16:19: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   16 |   if(res[0])r = (l+r>>1);
      |                  ~^~
prize.cpp:17:14: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   17 |   else l = (l+r>>1)+1;
      |             ~^~