# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
527397 | andreiomd | The Big Prize (IOI17_prize) | C++11 | 6 ms | 1992 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;
const int NMAX = 2e5 + 10;
typedef pair < int, int > PII;
int mars[NMAX];
const int seed = time (0);
mt19937 gen (seed);
long long getRand(long long a, long long b) {return uniform_int_distribution < long long > (a, b) (gen);}
int find_best (int n)
{
vector < PII > Seg;
int Max = 0;
for(int i = 0; i < 49 && i < n; ++i)
{
int pos = getRand(0, n - 1);
vector < int > _temp = ask(pos);
if(_temp[0] + _temp[1] > Max)
Max = _temp[0] + _temp[1];
if(_temp[0] == 0 && _temp[1] == 0)
return pos;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |