| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 999296 | Unforgettablepl | Highway Tolls (IOI18_highway) | C++17 | 73 ms | 2664 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 all(x) x.begin(),x.end()
long long ask(const std::vector<int> &w);
void answer(int s, int t);
void find_pair(int N, std::vector<int> U, std::vector<int> V, int A, int B) {
auto base = ask(vector<int>(N-1));
int left = 0;
for(int jump=65536;jump;jump/=2){
if(left+jump>=N)continue;
vector<int> w(N-1);
for(int i=0;i<left+jump;i++)w[i]=1;
if(ask(w)==base)left+=jump;
}
int right = N-1;
for(int jump=65536;jump;jump/=2){
if(right-jump<0)continue;
vector<int> w(N-1);
for(int i=right-jump;i<N-1;i++)w[i]=1;
if(ask(w)==base)right-=jump;
}
answer(left,right);
}| # | 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... | ||||
