답안 #101861

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

typedef long long llg;
const int borne = 155;
int lenSeq, nbCas;
bool bloque[borne];
int ret[borne];
long long nombre;


void solve()
{
	int i = 0;
	for (int b = 59; b >= 0; --b) {
		while (bloque[i] || bloque[i+1]) ++i;
		if (i+1 >= lenSeq) return;
		ret[i] = 1;
		if (nombre & (1LL << (long long)(b))) ret[i+1] = 1;
		i += 2;
	}
}

void Anna( int N, long long X, int K, int P[] ){
	lenSeq = N;
	nombre = X;

	for (int i = 0; i < N; ++i) { bloque[i] = false; ret[i] = 0; }
	for (int i = 0; i < K; ++i) bloque[P[i]] = true;
	solve();
	for (int i = 0; i < N; ++i) Set(i, ret[i]);
	return;
}
#include "Brunolib.h"

long long Bruno( int N, int A[] ){
	long long X = 0;
	int i = 0;
	for (int b = 59; b >= 0; --b) {
		while (A[i] == 0) ++i;
		++i;	
		if (A[i] == 1) X += 1LL << (long long)(b);
		++i;
	}
	return X;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 44 ms 3056 KB Output is partially correct - L* = 15
2 Partially correct 40 ms 3056 KB Output is partially correct - L* = 15
3 Partially correct 37 ms 2816 KB Output is partially correct - L* = 16
4 Partially correct 47 ms 2864 KB Output is partially correct - L* = 15
5 Partially correct 34 ms 2816 KB Output is partially correct - L* = 15
6 Partially correct 46 ms 3056 KB Output is partially correct - L* = 15
7 Partially correct 40 ms 2816 KB Output is partially correct - L* = 15
8 Partially correct 45 ms 2816 KB Output is partially correct - L* = 16
9 Partially correct 46 ms 3056 KB Output is partially correct - L* = 16
10 Partially correct 48 ms 3072 KB Output is partially correct - L* = 15
11 Partially correct 45 ms 2800 KB Output is partially correct - L* = 16
12 Partially correct 56 ms 3072 KB Output is partially correct - L* = 15
13 Partially correct 56 ms 3056 KB Output is partially correct - L* = 15
14 Partially correct 48 ms 2936 KB Output is partially correct - L* = 15
15 Partially correct 55 ms 2800 KB Output is partially correct - L* = 15
16 Partially correct 50 ms 3072 KB Output is partially correct - L* = 15
17 Partially correct 36 ms 3072 KB Output is partially correct - L* = 17
18 Partially correct 38 ms 3072 KB Output is partially correct - L* = 16
19 Partially correct 36 ms 2816 KB Output is partially correct - L* = 18
20 Partially correct 46 ms 3056 KB Output is partially correct - L* = 18
21 Partially correct 62 ms 3112 KB Output is partially correct - L* = 15
22 Partially correct 50 ms 2544 KB Output is partially correct - L* = 16
23 Partially correct 39 ms 3072 KB Output is partially correct - L* = 15
24 Partially correct 37 ms 3128 KB Output is partially correct - L* = 16
25 Partially correct 43 ms 2816 KB Output is partially correct - L* = 15
26 Partially correct 40 ms 3072 KB Output is partially correct - L* = 16
27 Partially correct 39 ms 3064 KB Output is partially correct - L* = 16
28 Partially correct 59 ms 2800 KB Output is partially correct - L* = 16
29 Partially correct 51 ms 3112 KB Output is partially correct - L* = 15
30 Partially correct 40 ms 3072 KB Output is partially correct - L* = 15
31 Partially correct 45 ms 2816 KB Output is partially correct - L* = 15
32 Partially correct 43 ms 2928 KB Output is partially correct - L* = 15
33 Partially correct 40 ms 2816 KB Output is partially correct - L* = 15
34 Partially correct 41 ms 2800 KB Output is partially correct - L* = 16
35 Partially correct 38 ms 2816 KB Output is partially correct - L* = 15
36 Partially correct 46 ms 2800 KB Output is partially correct - L* = 15
37 Partially correct 40 ms 2816 KB Output is partially correct - L* = 16
38 Partially correct 46 ms 3056 KB Output is partially correct - L* = 18
39 Partially correct 59 ms 3056 KB Output is partially correct - L* = 15
40 Partially correct 40 ms 2800 KB Output is partially correct - L* = 15