Submission #348479

#TimeUsernameProblemLanguageResultExecution timeMemory
348479juggernautHighway Tolls (IOI18_highway)C++14
6 / 100
94 ms2504 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...