Submission #283847

#TimeUsernameProblemLanguageResultExecution timeMemory
283847balbitThe Big Prize (IOI17_prize)C++14
20 / 100
1 ms384 KiB
#include <bits/stdc++.h> #ifndef BALBIT #include "prize.h" #endif using namespace std; #define ll long long #define pii pair<int, int> #define f first #define s second #define ALL(x) (x).begin(), (x).end() #define SZ(x) (int)((x).size()) #define pb push_back #ifdef BALBIT #define bug(...) cerr<<"#"<<__LINE__<<" "<<#__VA_ARGS__<<": ", _do(__VA_ARGS__) template <typename T> void _do(T && x) {cerr<<x<<endl;} template <typename T, typename ...S> void _do(T && x, S&&...y) {cerr<<x<<", "; _do(y...);} #define IOS() #else #define bug(...) #define IOS() ios::sync_with_stdio(0), cin.tie(0) #define endl '\n' #endif int find_best(int n) { int l = 0, r = n-1; while (l!=r) { int mid = (l+r)/2; vector<int> x = ask(mid); if (x[0] == 0 && x[1] == 0) return mid; if (x[1]) l = mid+1; else r = mid-1; } return l; } #ifdef BALBIT signed main(){ IOS(); bug(1,2); } #endif
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...