#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 |
1 |
Incorrect |
0 ms |
596 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
600 KB |
Output is correct |
2 |
Correct |
12 ms |
848 KB |
Output is correct |
3 |
Correct |
24 ms |
916 KB |
Output is correct |
4 |
Correct |
53 ms |
2192 KB |
Output is correct |
5 |
Correct |
56 ms |
2200 KB |
Output is correct |
6 |
Correct |
58 ms |
2664 KB |
Output is correct |
7 |
Correct |
73 ms |
2204 KB |
Output is correct |
8 |
Correct |
56 ms |
2188 KB |
Output is correct |
9 |
Correct |
58 ms |
2192 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output is incorrect: {s, t} is wrong. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
600 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
600 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |