# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
527392 | andreiomd | The Big Prize (IOI17_prize) | C++11 | 109 ms | 200 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"
using namespace std;
const int NMAX = 2e5 + 10;
typedef pair < int, int > PII;
int mars[NMAX];
int find_best (int n)
{
vector < PII > Seg;
for(int i = 0; i < n; ++i)
{
int left = i, right = n - 1, pos = -1;
vector < int > now = ask(i);
if(now[0] == 0 && now[1] == 0)
return i;
if(now[0] == i && now[1] == (n - i - 1))
{
while(left <= right)
{
int mid = ((left + right) >> 1);
vector < int > _temp = ask(mid);
if(_temp[0] == now[0])
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |