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 "chameleon.h"
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define ii pair<int,int>
typedef vector<int> vi;
#define iii tuple<int,int,int>
typedef vector<ii> vii;
typedef vector<iii> viii;
typedef map<int,int> mii;
#ifndef debug
#define cerr if (0) cerr
#endif
void Solve(int N) {
vector<int> V;
for(int i=1; i<=2*N; i++){
V.push_back(i);
}
while(!V.empty()){
int L=0, R=V.size()-1, M, a, b;
while(R>L+1){
M = (L+R)/2;
a = Query(vector(V.begin(),V.begin()+M));
b = Query(vector(V.begin()+1,V.begin()+M));
if (a==b) R = M;
else L = M;
}
a = V[0]; b = V[L];
V.erase(V.begin());V.erase(V.begin()+L);
Answer(a,b);
}
}
# | 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... |