Submission #1018769

#TimeUsernameProblemLanguageResultExecution timeMemory
1018769vjudge1The Big Prize (IOI17_prize)C++17
Compilation error
0 ms0 KiB
#include "prize.h" #include<bits/stdc++.h> using namespace std; #define lli long long int int find_best(int n){ int a[2]; int x=1,y=n,z; while(x!=y){ z=(x+y)/2; a=ask(z); if(a[0]){ y=z-1; } else if(a[1]){ x=z+1; } else{ return z; } } return x; }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:12:10: error: incompatible types in assignment of 'std::vector<int>' to 'int [2]'
   12 |         a=ask(z);
      |         ~^~~~~~~