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>
void solve(int N, int L) {
std::vector<int> ccs(N,-1);
for(int i=1;i<N;i++){
ccs[i]=i;
for(int j=0;j<N;j++){
int qu=query(i+1,j+1);
if(ccs[qu-1]==i||qu-1>i)break;
answer(i+1,qu);
int oldcc=ccs[qu-1];
for(int k=0;k<N;k++){
if(ccs[k]==oldcc)ccs[k]=i;
}
}
}
}
# | 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... |