# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
619835 | Ozy | The Big Prize (IOI17_prize) | C++17 | 76 ms | 292 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "prize.h"
#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define rep(i,a,b) for (int i = (a); i <= (b); i++)
#define repa(i,a,b) for (int i = (a); i >= (b); i--)
#define debug(a) cout << #a << " = " << a << endl
#define debugsl(a) cout << #a << " = " << a << ", "
vector<int> a;
int find_best(int n) {
lli ini = 0;
lli fin = n-1;
lli mitad;
while (ini <= fin) {
mitad = (ini+fin)/2;
a = ask(mitad);
if (a[0] == 0 && a[1] == 0) return mitad;
else if (a[0] == 1) fin = mitad-1;
else ini = mitad+1;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |