이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "minerals.h"
#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
#define REP(i,j,k) for(int i=(j);i<(k);++i)
#define RREP(i,j,k) for(int i=int(j)-1;i>=(k);--i)
#define pb push_back
// #define __debug
#ifdef __debug
#define pr(...) cerr<<__VA_ARGS__
#define ar(a,s,t) {rep(zy,s,t)pr(a[zy]<<' ');pr(endl);}
#else
#define pr(...) (void)0
#define ar(...) (void)0
#endif
//
const int maxn=43009;
bitset<2*maxn>bs;
int ls=0,res[2*maxn];
int qr(int x){
int t=Query(x+1);
swap(t,ls);
return ls==t;
}
void Solve(int n){
REP(i,0,2*n)qr(i);
REP(i,0,16){
bs.reset();
REP(j,0,2){
REP(k,0,2*n){
if((k>>i)%2==j){
if(!qr(k))bs[k]=1;
}
}
REP(k,0,2*n){
if((k>>i)%2==j){
if(!qr(k))bs[k]=1;
}
}
}
REP(j,0,2*n)res[j]|=(!bs[j])<<i;
}
REP(i,0,2*n)if(i<(i^res[i]))Answer(i+1,(i^res[i])+1);
}
# | 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... |