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 "park.h"
#include "bits/stdc++.h"
using namespace std;
#ifndef EVAL
#include "grader.cpp"
#endif
static int used[1400];
void Detect(int t, int n){
auto ask = [&](int a, int b, vector<int> t){
for(auto x : t) used[x] = 1;
if(a > b) swap(a, b);
int ans = Ask(a, b, used);
for(auto x : t) used[x] = 0;
return ans;
};
auto Ans = [&](int i, int j){
if(i > j) swap(i, j);
Answer(i, j);
};
for(int i=0;i<n;i++){
for(int j=0;j<i;j++){
if(ask(i, j, {i, j})){
Ans(i, j);
}
}
}
}
/*
1
6
7
0 1
0 3
1 2
1 4
2 4
2 5
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... |