# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
931924 | Lobo | The Big Prize (IOI17_prize) | C++17 | 33 ms | 2004 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 pb push_back
#define mp make_pair
#define fr first
#define sc second
map<int,pair<int,pair<int,int>>> qr;
int cnt = 0;
int cntnonlol;
int n;
pair<int,pair<int,int>> query(int i) {
if(i == n) return mp(cntnonlol,mp(cntnonlol,0));
if(qr.count(i)) return qr[i];
++cnt;
vector<int> perg = ask(i);
return qr[i] = mp(perg[0]+perg[1],mp(perg[0],perg[1]));
}
int find_best(int N) {
n = N;
if(n <= 5000) {
for(int i = 0; i < n; i++) {
if(query(i).fr == 0) return i;
}
}
int S = n/420;
priority_queue<pair<pair<int,int>,pair<int,int>>> q;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |