# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
593828 | AlperenT | The Big Prize (IOI17_prize) | C++17 | 69 ms | 1124 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 <bits/stdc++.h>
#include "prize.h"
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int int_rand(int a, int b){
return uniform_int_distribution<int>(a, b)(rng);
}
const int TRYMAX = 500, K = 1200;
int maxcnt = 0;
map<int, vector<int>> mp;
vector<int> query(int pos){
if(mp.find(pos) == mp.end()) mp[pos] = ask(pos);
return mp[pos];
}
int find_best(int n){
set<int> st;
while(st.size() < n && st.size() < TRYMAX) st.insert(int_rand(0, n - 1));
for(auto i : st){
vector<int> vec = query(i);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |