# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
249634 | kostia244 | The Big Prize (IOI17_prize) | C++17 | 94 ms | 5744 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>
#define all(x) x.begin(), x.end()
using namespace std;
using vi = vector<int>;
map<int, vector<int>> memo;
int qry = 0;
vector<int> fffff(int p) {
if(memo.count(p)) return memo[p];
return memo[p] = ask(p);
}
#define ask fffff
int cb = 1<<30, cg;
vector<int> cnt(20, 0);
vi findgood(vi vals, int cl, int cc, int cr, int _Dep = 0) {
if(vals.empty() || !cc) return {};
if(vals.size() == cc) return vals;
int l = vals.size()/2;
int r = l+1, go = -1;
cnt[_Dep]++;
//for(auto i : vals) cout << i << " "; cout << cl << " " << cc << " " << cr << "::" << endl;
vi gg, t;
while(l >= 0 || r < vals.size()) {
if(l >= 0) {
t = ask(vals[l]);
if(t[0] + t[1] == cg) {
go = l;
break;
}
gg.push_back(vals[l--]);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |