답안 #136365

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
136365 2019-07-25T07:53:03 Z Boxworld 자동 인형 (IOI18_doll) C++14
47 / 100
119 ms 20188 KB
#include "doll.h"
#include <bits/stdc++.h>
using namespace std;
const int maxN=400010;
typedef vector<int> vec;
vec G[maxN];
int lv[maxN],no[maxN],tmp=-1;
int ln(int x){
	int cnt=1,s=0;
	while(x>cnt){cnt*=2;s++;}
	return s;
}
void create_circuit(int M, std::vector<int> A){
	int N=A.size(),K=ln(N),SW=(1<<K)-1;
	for(int i=N;i<(1<<K);i++)A.push_back(-1);
	A.push_back(0);
	if (SW<1)SW=1;
	vec C(M+1),X(SW),Y(SW);
	C[0]=A[0];X[0]=-1;Y[0]=0;
	for (int i=1;i<=M;i++)C[i]=-1;
	if (N>1){
		no[1]=1;lv[1]=0;
		for (int i=1;i<(1<<(K-1));i++){
			X[i-1]=-i*2;no[i*2]=no[i];lv[i*2]=lv[i]+1;
			Y[i-1]=-i*2-1;no[i*2+1]=no[i]+(1<<lv[i]);lv[i*2+1]=lv[i]+1;
		}
		for (int i=1<<(K-1);i<=SW;i++){
			X[i-1]=A[no[i]];
			Y[i-1]=A[no[i]+(1<<lv[i])];
		}
	}
	answer(C,X,Y);
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 7 ms 9676 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 7 ms 9676 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 7 ms 9676 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 8 ms 9676 KB Output is correct
2 Correct 9 ms 9640 KB Output is correct
3 Correct 10 ms 9676 KB Output is correct
4 Correct 10 ms 9700 KB Output is correct
5 Correct 7 ms 9676 KB Output is correct
6 Correct 8 ms 9676 KB Output is correct
7 Correct 7 ms 9608 KB Output is correct
8 Correct 7 ms 9596 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 7 ms 9676 KB Output is partially correct
2 Correct 55 ms 15560 KB Output is correct
3 Partially correct 76 ms 19400 KB Output is partially correct
4 Partially correct 91 ms 19696 KB Output is partially correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 7 ms 9676 KB Output is partially correct
2 Correct 55 ms 15560 KB Output is correct
3 Partially correct 76 ms 19400 KB Output is partially correct
4 Partially correct 91 ms 19696 KB Output is partially correct
5 Partially correct 119 ms 20188 KB Output is partially correct
6 Partially correct 117 ms 19940 KB Output is partially correct
7 Partially correct 113 ms 19936 KB Output is partially correct
8 Partially correct 106 ms 19764 KB Output is partially correct
9 Partially correct 84 ms 19432 KB Output is partially correct
10 Partially correct 92 ms 19796 KB Output is partially correct
11 Partially correct 90 ms 19724 KB Output is partially correct
12 Partially correct 88 ms 19380 KB Output is partially correct
13 Correct 56 ms 16072 KB Output is correct
14 Partially correct 82 ms 19656 KB Output is partially correct
15 Partially correct 86 ms 19688 KB Output is partially correct
16 Partially correct 14 ms 10060 KB Output is partially correct
17 Correct 53 ms 15772 KB Output is correct
18 Correct 53 ms 15708 KB Output is correct
19 Partially correct 78 ms 19400 KB Output is partially correct
20 Partially correct 93 ms 19752 KB Output is partially correct
21 Partially correct 96 ms 19680 KB Output is partially correct
22 Partially correct 93 ms 19688 KB Output is partially correct