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 "island.h"
#include<bits/stdc++.h>
using namespace std;
void solve(int n, int l) {
vector<int> haha(n);
for(int i = 1; i < n; i++) {
haha[i] = query(1,i);
}
vector<bool> bruh(n+1);
bruh[1] = true;
for(int i = 1; i < n; i++) {
int x = haha[i];
if(!bruh[x]) {
for(int j = 1; j <= n-1; j++) {
int c = query(x,j);
answer(x,c);
if(bruh[c]) {
break;
}
bruh[c] = true;
}
bruh[x] = true;
}
}
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |