| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1352055 | KALARRY | The Big Prize (IOI17_prize) | C++20 | 17 ms | 412 KiB |
//chockolateman
#include<bits/stdc++.h>
#include "prize.h"
using namespace std;
int search(int start,int end)
{
vector<int> temp;
for(int i = 0 ; i <= end ; i++)
{
temp = ask(i);
if(temp[0]==0 && temp[1]==0)
return i;
}
if(start > end)
return -1;
int mid = (start + end)/2;
temp = ask(mid);
// vector<int> temp = ask(mid);
if(temp[0]==0 && temp[1]==0)
return mid;
return max(search(start,mid-1),search(mid+1,end));
}
int find_best(int n) {
return search(0,n-1);
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
