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"highway.h"
#include<bits/stdc++.h>
#ifndef EVAL
#include"grader.cpp"
#endif
using namespace std;
void find_pair(int n,vector<int>x,vector<int>y,int a,int b){
vector<int>v(n-1,0);
long long pivot=ask(v);
int l=0,r=n-2;
while(l<r){
int mid=(l+r)>>1;
vector<int>v(n-1,0);
for(int i=l;i<=mid;i++)v[i]=1;
if(ask(v)!=pivot)r=mid;
else l=mid+1;
}
int s,t;
s=l;
t=l+pivot/a;
answer(s,t);
}
/*
5 4 1 2 0 2
0 1
1 2
2 3
3 4
*/
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |