Submission #125903

#TimeUsernameProblemLanguageResultExecution timeMemory
125903MasterdanThe Big Prize (IOI17_prize)C++14
0 / 100
74 ms1172 KiB
#include "prize.h" #include <bits/stdc++.h> #define MIN -1 #define MAX 1000000000 #define all(a) a.begin (), a.end () #define mp make_pair #define pb push_back using namespace std; typedef vector <int> vi; typedef long long int ll; typedef pair <int, int> ii; int binary (int a, int b){ vector <int> v; v=ask(b/2); if(v[0]==1){ binary(a, (a+b)/2); }else binary((a+b)/2+1, b); if(v[0]==0 and v[1]==0)return a; } int find_best(int n) { return binary(0, n-1); }

Compilation message (stderr)

prize.cpp: In function 'int binary(int, int)':
prize.cpp:19:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...