답안 #101850

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
101850 2019-03-20T14:16:12 Z hugo_pm Broken Device (JOI17_broken_device) C++17
0 / 100
6 ms 1028 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;
	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 Incorrect 5 ms 904 KB Wrong Answer [1]
2 Incorrect 5 ms 868 KB Wrong Answer [1]
3 Incorrect 5 ms 852 KB Wrong Answer [1]
4 Incorrect 6 ms 880 KB Wrong Answer [1]
5 Incorrect 2 ms 648 KB Wrong Answer [1]
6 Incorrect 4 ms 776 KB Wrong Answer [1]
7 Incorrect 4 ms 640 KB Wrong Answer [1]
8 Incorrect 6 ms 836 KB Wrong Answer [1]
9 Incorrect 5 ms 844 KB Wrong Answer [1]
10 Incorrect 4 ms 640 KB Wrong Answer [1]
11 Incorrect 4 ms 860 KB Wrong Answer [1]
12 Incorrect 5 ms 548 KB Wrong Answer [1]
13 Incorrect 5 ms 776 KB Wrong Answer [1]
14 Incorrect 4 ms 884 KB Wrong Answer [1]
15 Incorrect 3 ms 776 KB Wrong Answer [1]
16 Incorrect 5 ms 904 KB Wrong Answer [1]
17 Incorrect 2 ms 776 KB Wrong Answer [1]
18 Incorrect 2 ms 776 KB Wrong Answer [1]
19 Incorrect 4 ms 904 KB Wrong Answer [1]
20 Incorrect 4 ms 648 KB Wrong Answer [1]
21 Incorrect 5 ms 776 KB Wrong Answer [1]
22 Incorrect 5 ms 776 KB Wrong Answer [1]
23 Incorrect 4 ms 880 KB Wrong Answer [1]
24 Incorrect 4 ms 884 KB Wrong Answer [1]
25 Incorrect 5 ms 804 KB Wrong Answer [1]
26 Incorrect 5 ms 784 KB Wrong Answer [1]
27 Incorrect 4 ms 640 KB Wrong Answer [1]
28 Incorrect 4 ms 640 KB Wrong Answer [1]
29 Incorrect 4 ms 776 KB Wrong Answer [1]
30 Incorrect 4 ms 904 KB Wrong Answer [1]
31 Incorrect 4 ms 868 KB Wrong Answer [1]
32 Incorrect 4 ms 860 KB Wrong Answer [1]
33 Incorrect 5 ms 864 KB Wrong Answer [1]
34 Incorrect 5 ms 904 KB Wrong Answer [1]
35 Incorrect 5 ms 852 KB Wrong Answer [1]
36 Incorrect 5 ms 660 KB Wrong Answer [1]
37 Incorrect 4 ms 1028 KB Wrong Answer [1]
38 Incorrect 5 ms 768 KB Wrong Answer [1]
39 Incorrect 4 ms 892 KB Wrong Answer [1]
40 Incorrect 5 ms 860 KB Wrong Answer [1]