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;
static int adj[1400];
int n;
vector<pair<int,int>> res;
int help(int a,int b) {
return Ask(a,b,adj);
}
void sub1() {
for(int i = 0;i < n;i++) {
for(int j = i + 1;j < n;j++) {
adj[i] = 1;
adj[j] = 1;
if(help(i,j)) {
res.push_back({i,j});
}
adj[i] = 0;
adj[j] = 0;
}
}
for(auto u : res) {
Answer(u.first,u.second);
}
}
void Detect(int T, int N) {
n = N;
if(T == 1) {
sub1();
return;
}
}
# | 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... |