답안 #207609

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
207609 2020-03-08T06:04:12 Z autumn_eel Broken Device (JOI17_broken_device) C++14
85 / 100
54 ms 3568 KB
#include "Annalib.h"
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;

bool b[160],d[160];

void Anna(int N,ll X,int K,int P[]){
	memset(b,0,sizeof(b));
	memset(d,0,sizeof(d));
	rep(i,K){
		b[P[i]]=1;
	}
	for(int i=0;i<N;i+=2){
		if(!b[i]&&!b[i+1]){
			int e=X%3;
			if(e==0)d[i]=0,d[i+1]=1;
			if(e==1)d[i]=1,d[i+1]=0;
			if(e==2)d[i]=1,d[i+1]=1;
			X/=3;
		}
	}
	rep(i,N)Set(i,d[i]);
}
#include "Brunolib.h"
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;

ll Bruno(int N,int A[]){
	ll ans=0;
	for(int i=N-2;i>=0;i-=2){
		if(A[i]||A[i+1]){
			ans*=3;
			ans+=A[i]*2+A[i+1]-1;
		}
	}
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 49 ms 3312 KB Output is partially correct - L* = 37
2 Partially correct 51 ms 3312 KB Output is partially correct - L* = 37
3 Partially correct 54 ms 3568 KB Output is partially correct - L* = 37
4 Partially correct 49 ms 3320 KB Output is partially correct - L* = 37
5 Partially correct 50 ms 3320 KB Output is partially correct - L* = 37
6 Partially correct 52 ms 3312 KB Output is partially correct - L* = 37
7 Partially correct 50 ms 3320 KB Output is partially correct - L* = 37
8 Partially correct 51 ms 3312 KB Output is partially correct - L* = 37
9 Partially correct 50 ms 3312 KB Output is partially correct - L* = 37
10 Partially correct 51 ms 3312 KB Output is partially correct - L* = 37
11 Partially correct 52 ms 3312 KB Output is partially correct - L* = 37
12 Partially correct 52 ms 3312 KB Output is partially correct - L* = 37
13 Partially correct 51 ms 3312 KB Output is partially correct - L* = 37
14 Partially correct 53 ms 3152 KB Output is partially correct - L* = 37
15 Partially correct 48 ms 3056 KB Output is partially correct - L* = 37
16 Partially correct 50 ms 3312 KB Output is partially correct - L* = 37
17 Partially correct 49 ms 3312 KB Output is partially correct - L* = 37
18 Partially correct 51 ms 3312 KB Output is partially correct - L* = 37
19 Partially correct 50 ms 3320 KB Output is partially correct - L* = 37
20 Partially correct 50 ms 3160 KB Output is partially correct - L* = 37
21 Partially correct 51 ms 3312 KB Output is partially correct - L* = 37
22 Partially correct 53 ms 3176 KB Output is partially correct - L* = 37
23 Partially correct 50 ms 3320 KB Output is partially correct - L* = 37
24 Partially correct 50 ms 3312 KB Output is partially correct - L* = 37
25 Partially correct 51 ms 3312 KB Output is partially correct - L* = 37
26 Partially correct 49 ms 3312 KB Output is partially correct - L* = 37
27 Partially correct 50 ms 3312 KB Output is partially correct - L* = 37
28 Partially correct 52 ms 3312 KB Output is partially correct - L* = 37
29 Partially correct 49 ms 3312 KB Output is partially correct - L* = 37
30 Partially correct 52 ms 3312 KB Output is partially correct - L* = 37
31 Partially correct 49 ms 3312 KB Output is partially correct - L* = 37
32 Partially correct 50 ms 3312 KB Output is partially correct - L* = 37
33 Partially correct 53 ms 3568 KB Output is partially correct - L* = 37
34 Partially correct 51 ms 3312 KB Output is partially correct - L* = 37
35 Partially correct 51 ms 3312 KB Output is partially correct - L* = 37
36 Partially correct 50 ms 3312 KB Output is partially correct - L* = 37
37 Partially correct 50 ms 3312 KB Output is partially correct - L* = 37
38 Partially correct 51 ms 3312 KB Output is partially correct - L* = 37
39 Partially correct 51 ms 3312 KB Output is partially correct - L* = 37
40 Partially correct 50 ms 3312 KB Output is partially correct - L* = 37