답안 #101851

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
101851 2019-03-20T14:17:57 Z hugo_pm Broken Device (JOI17_broken_device) C++17
8 / 100
91 ms 3312 KB
#include "Annalib.h"

void Anna( int N, long long X, int K, int P[] ){
	if (K > 1) {
		for (int i = 0; i < N; ++i) Set(i, 0);
		return;
	}
	int i=0;
	if (K == 1) i = P[0]+1;
	if (i > 65) i = 0;
	for (int h = 0; h < i; ++h) Set(h, 0);
	Set(i, 1);
	for (int b = 62; b >= 0; --b) {
		++i;
		int k = 0;
		if (X & (1LL << (long long)(b))) k = 1;
		Set(i, k);
	}
	while (i+1 != N) { ++i; Set(i, 0); }
}
#include "Brunolib.h"

long long Bruno( int N, int A[] ){
	long long X = 0;
	int i = 0;
	while (A[i] == 0) ++i;
	for (int b = 62; b >= 0; --b) {
		++i;
		if (A[i] == 1) X += 1LL << (long long)(b);
	}
	return X;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 51 ms 3072 KB Output is partially correct - L* = 14
2 Partially correct 61 ms 3056 KB Output is partially correct - L* = 14
3 Partially correct 43 ms 3000 KB Output is partially correct - L* = 14
4 Partially correct 51 ms 3240 KB Output is partially correct - L* = 14
5 Partially correct 40 ms 3072 KB Output is partially correct - L* = 14
6 Partially correct 48 ms 3056 KB Output is partially correct - L* = 14
7 Partially correct 43 ms 3192 KB Output is partially correct - L* = 14
8 Partially correct 48 ms 3072 KB Output is partially correct - L* = 14
9 Partially correct 57 ms 3056 KB Output is partially correct - L* = 14
10 Partially correct 43 ms 3056 KB Output is partially correct - L* = 14
11 Partially correct 60 ms 3312 KB Output is partially correct - L* = 14
12 Partially correct 43 ms 3112 KB Output is partially correct - L* = 14
13 Partially correct 44 ms 3056 KB Output is partially correct - L* = 14
14 Partially correct 39 ms 3112 KB Output is partially correct - L* = 14
15 Partially correct 49 ms 3072 KB Output is partially correct - L* = 14
16 Partially correct 58 ms 3312 KB Output is partially correct - L* = 14
17 Partially correct 55 ms 3056 KB Output is partially correct - L* = 14
18 Partially correct 54 ms 3056 KB Output is partially correct - L* = 14
19 Partially correct 76 ms 3000 KB Output is partially correct - L* = 14
20 Partially correct 55 ms 3072 KB Output is partially correct - L* = 14
21 Partially correct 40 ms 3312 KB Output is partially correct - L* = 14
22 Partially correct 39 ms 3056 KB Output is partially correct - L* = 14
23 Partially correct 60 ms 3072 KB Output is partially correct - L* = 14
24 Partially correct 43 ms 3072 KB Output is partially correct - L* = 14
25 Partially correct 45 ms 3064 KB Output is partially correct - L* = 14
26 Partially correct 91 ms 3000 KB Output is partially correct - L* = 14
27 Partially correct 54 ms 3072 KB Output is partially correct - L* = 14
28 Partially correct 62 ms 3152 KB Output is partially correct - L* = 14
29 Partially correct 40 ms 3056 KB Output is partially correct - L* = 14
30 Partially correct 37 ms 3072 KB Output is partially correct - L* = 14
31 Partially correct 57 ms 3056 KB Output is partially correct - L* = 14
32 Partially correct 39 ms 3176 KB Output is partially correct - L* = 14
33 Partially correct 43 ms 3080 KB Output is partially correct - L* = 14
34 Partially correct 74 ms 3120 KB Output is partially correct - L* = 14
35 Partially correct 43 ms 3072 KB Output is partially correct - L* = 14
36 Partially correct 58 ms 3312 KB Output is partially correct - L* = 14
37 Partially correct 47 ms 3072 KB Output is partially correct - L* = 14
38 Partially correct 43 ms 3072 KB Output is partially correct - L* = 14
39 Partially correct 53 ms 3056 KB Output is partially correct - L* = 14
40 Partially correct 59 ms 3056 KB Output is partially correct - L* = 14