답안 #123049

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
123049 2019-06-30T06:06:01 Z tjd229 Broken Device (JOI17_broken_device) C++14
0 / 100
43 ms 3064 KB
#include "Annalib.h"
void Anna(int N, long long X, int K, int P[]) {
	int mem[150];
	for (int i = 0; i < N; ++i) mem[i] = -1;
	for (int i = 0; i < K; ++i) mem[P[i]] = 0;
	for (int pos = 0; X && pos + 1 < N; ++pos) {
		if (mem[pos] == 0 && mem[pos + 1] == 0) continue;
		else if (mem[pos] == 0 && mem[pos + 1]==-1) {//01

			if (X & 1) {
				mem[pos + 1] = 1;
				X >>= 1;
			}
		}
		else if (mem[pos] == -1 && mem[pos + 1] == -1) {//00->1X
			mem[pos] = 1;
			mem[++pos] = X & 1;
			X >>= 1;
		}
		else if (mem[pos] == 1 && mem[pos + 1] == -1) {//10->1X
			mem[pos] = 1;
			mem[++pos] = X & 1;
			X >>= 1;
		}
	}
	for (int i = 0; i < N; ++i) Set(i, mem[i] < 0 ? 0 : mem[i]);
	//for (int i = 0; i < 10; ++i) printf("%d ",mem[i]);
}
#include "Brunolib.h"

long long Bruno( int N, int A[] ){
	long long X = 0;
	int recon[60] = { 0 };
	int pos = 0;
	for (int i = 0; i + 1 < N && pos<60; ++i) {
		int b2 = A[i] + A[i] + A[i + 1];
		if (b2&1) recon[pos++] = 1;
		else if (b2 & 2) recon[pos++] = 0;
		if (b2 & 2) ++i;
	}pos = 60;
	while (pos--) {
		X <<= 1;
		X += recon[pos];
	}
	return X;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
2 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
3 Incorrect 43 ms 2800 KB Output isn't correct - L* = 0
4 Incorrect 41 ms 2800 KB Output isn't correct - L* = 0
5 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
6 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
7 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
8 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
9 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
10 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
11 Incorrect 40 ms 2936 KB Output isn't correct - L* = 0
12 Incorrect 41 ms 2800 KB Output isn't correct - L* = 0
13 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
14 Incorrect 40 ms 2848 KB Output isn't correct - L* = 0
15 Incorrect 39 ms 2800 KB Output isn't correct - L* = 0
16 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
17 Incorrect 40 ms 3064 KB Output isn't correct - L* = 0
18 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
19 Incorrect 41 ms 3056 KB Output isn't correct - L* = 0
20 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
21 Incorrect 41 ms 2800 KB Output isn't correct - L* = 0
22 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
23 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
24 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
25 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
26 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
27 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
28 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
29 Incorrect 40 ms 3000 KB Output isn't correct - L* = 0
30 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
31 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
32 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
33 Incorrect 40 ms 2824 KB Output isn't correct - L* = 0
34 Incorrect 39 ms 2808 KB Output isn't correct - L* = 0
35 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
36 Incorrect 39 ms 2800 KB Output isn't correct - L* = 0
37 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
38 Incorrect 40 ms 2800 KB Output isn't correct - L* = 0
39 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
40 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0