답안 #423950

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
423950 2021-06-11T14:28:04 Z errorgorn 카멜레온의 사랑 (JOI20_chameleon) C++17
0 / 100
1 ms 200 KB
#include "chameleon.h"

#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define ii pair<ll,ll>
#define fi first
#define se second
#define endl '\n'

#define puf push_front
#define pof pop_front
#define pub push_back
#define pob pop_back

#define rep(x,s,e) for (auto x=s-(s>e);x!=e-(s>e);s<e?x++:x--)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int) (x).size()

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int n;

bool solved[1005];

void Solve(int N) {
	n=N;
	
	rep(x,1,2*n+1) if (!solved[x]){
		vector<int> v;
		rep(y,x+1,2*n+1) if (!solved[y]) v.pub(y);
		
		while (sz(v)!=1){
			vector<int> l,r;
			
			rep(x,0,sz(v)/2) l.pub(v[x]);
			rep(x,sz(v)/2,sz(v)) r.pub(v[x]);
			
			l.pub(x);
			if (Query(l)==sz(l)) v=r;
			else{
				l.pob();
				v=l;
			}
		}
		
		solved[x]=true;
		solved[v[0]]=true;
		//cout<<x<<" "<<v[0]<<endl;
		Answer(x,v[0]);
	}
	
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 200 KB Output is correct
2 Correct 1 ms 200 KB Output is correct
3 Incorrect 1 ms 200 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 200 KB Output is correct
2 Incorrect 1 ms 200 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 200 KB Output is correct
2 Incorrect 1 ms 200 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 200 KB Output is correct
2 Incorrect 0 ms 200 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 200 KB Output is correct
2 Correct 1 ms 200 KB Output is correct
3 Incorrect 1 ms 200 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -