답안 #112568

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
112568 2019-05-20T15:14:26 Z tincamatei Broken Device (JOI17_broken_device) C++14
41 / 100
83 ms 3072 KB
#include "Annalib.h"
#include <cstdio>

const int MAX_N = 150;

bool broken[MAX_N];

void Anna(int N, long long X, int k, int P[]) {
	int lb = 0;
	
	for(int i = 0; i < N; ++i)
		broken[i] = false;
	for(int i = 0; i < k; ++i)
		broken[P[i]] = true;

	for(int i = 0; i < N; i += 2) {
		if(broken[i] || broken[i + 1] || lb >= 62) {
			Set(i, 0);
			Set(i + 1, 0);
		} else if(lb < 62) {
			Set(i, 1);
			Set(i + 1, ((1LL << lb) & X) > 0);
			++lb;
		}
	}
}
#include "Brunolib.h"
#include <cstdio>

long long Bruno(int N, int A[]) {
	int lb = 0;
	long long rez = 0LL;
	for(int i = 0; i < N; i += 2) {
		if(lb < 62 && A[i] == 1) {
			rez = ((((long long)A[i + 1]) << lb) | rez);
			++lb;
		}
	}
	return rez;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 37 ms 3072 KB Output is partially correct - L* = 15
2 Partially correct 36 ms 2816 KB Output is partially correct - L* = 15
3 Partially correct 36 ms 3072 KB Output is partially correct - L* = 16
4 Partially correct 35 ms 3016 KB Output is partially correct - L* = 15
5 Partially correct 35 ms 3016 KB Output is partially correct - L* = 15
6 Partially correct 36 ms 2816 KB Output is partially correct - L* = 15
7 Partially correct 36 ms 3072 KB Output is partially correct - L* = 15
8 Partially correct 35 ms 3056 KB Output is partially correct - L* = 15
9 Partially correct 35 ms 3072 KB Output is partially correct - L* = 16
10 Partially correct 36 ms 2800 KB Output is partially correct - L* = 16
11 Partially correct 36 ms 2816 KB Output is partially correct - L* = 15
12 Partially correct 36 ms 3072 KB Output is partially correct - L* = 16
13 Partially correct 35 ms 3072 KB Output is partially correct - L* = 15
14 Partially correct 34 ms 2816 KB Output is partially correct - L* = 15
15 Partially correct 35 ms 3056 KB Output is partially correct - L* = 15
16 Partially correct 35 ms 3072 KB Output is partially correct - L* = 15
17 Partially correct 34 ms 2816 KB Output is partially correct - L* = 15
18 Partially correct 35 ms 3072 KB Output is partially correct - L* = 15
19 Partially correct 36 ms 3056 KB Output is partially correct - L* = 16
20 Partially correct 35 ms 2816 KB Output is partially correct - L* = 15
21 Partially correct 35 ms 2816 KB Output is partially correct - L* = 15
22 Partially correct 35 ms 2816 KB Output is partially correct - L* = 15
23 Partially correct 34 ms 3056 KB Output is partially correct - L* = 15
24 Partially correct 35 ms 3072 KB Output is partially correct - L* = 15
25 Partially correct 35 ms 2816 KB Output is partially correct - L* = 15
26 Partially correct 31 ms 3072 KB Output is partially correct - L* = 15
27 Partially correct 83 ms 3056 KB Output is partially correct - L* = 15
28 Partially correct 37 ms 3056 KB Output is partially correct - L* = 15
29 Partially correct 38 ms 2800 KB Output is partially correct - L* = 15
30 Partially correct 34 ms 2800 KB Output is partially correct - L* = 15
31 Partially correct 36 ms 2816 KB Output is partially correct - L* = 15
32 Partially correct 34 ms 3032 KB Output is partially correct - L* = 16
33 Partially correct 34 ms 2800 KB Output is partially correct - L* = 15
34 Partially correct 34 ms 3072 KB Output is partially correct - L* = 15
35 Partially correct 35 ms 2816 KB Output is partially correct - L* = 15
36 Partially correct 35 ms 2816 KB Output is partially correct - L* = 15
37 Partially correct 37 ms 2808 KB Output is partially correct - L* = 16
38 Partially correct 37 ms 3072 KB Output is partially correct - L* = 15
39 Partially correct 37 ms 3056 KB Output is partially correct - L* = 15
40 Partially correct 36 ms 2816 KB Output is partially correct - L* = 15