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 "minerals.h"
#include<bits/stdc++.h>
using namespace std;
void Solve(int N) {
vector<int> v(N*2+1,-1);
for(int i=1;i<=N*2;i++){
Query(i);
for(int j=i+1;j<=N*2;j++){
int p=Query(j);
Query(j);
if(p==1){
v[i]=j;
v[j]=i;
break;
}
}
Query(i);
}
for(int i=1;i<=N;i++){
//cout<<i<<' '<<v[i]<<endl;
if(i<v[i])Answer(i,v[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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |