# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
73390 | SmsS | The Big Prize (IOI17_prize) | C++17 | 118 ms | 648 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>
using namespace std;
#define for2(a,b,c) for(int a = b; a < c; a++)
#include "prize.h"
const bool test = 0;
int mn;
int cnt = 0;
set<int> st;
int solve(int l,int r,vector<int> L,vector<int> R){
if(l >= r) return -1;
if(l == r-1) return -1;
if(L[1]-R[1] == 0) return -1;
int mid = (l+r)/2;
vector<int> MIDL,MIDR;
int midl;
int midr;
midl = midr = mid;
midr++;
bool dn = 0;
int cnt = L[1]-R[1];
while(midl != l){
MIDL = ask(midl);
cnt++;
if(MIDL[0]+MIDL[1] == 0) return midl;
if(MIDL[0]+MIDL[1] != mn){
cnt--;
if(cnt <= 0 || !MIDL[0]){
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |