Submission #112567

# Submission time Handle Problem Language Result Execution time Memory
112567 2019-05-20T15:09:19 Z tincamatei Broken Device (JOI17_broken_device) C++14
0 / 100
38 ms 3328 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) & i) > 0);
			++lb;
		}
	}
}
#include "Brunolib.h"

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;
}
# Verdict Execution time Memory Grader output
1 Incorrect 37 ms 3056 KB Output isn't correct - L* = 0
2 Incorrect 34 ms 2816 KB Output isn't correct - L* = 0
3 Incorrect 36 ms 2816 KB Output isn't correct - L* = 0
4 Incorrect 37 ms 3072 KB Output isn't correct - L* = 0
5 Incorrect 33 ms 3072 KB Output isn't correct - L* = 0
6 Incorrect 35 ms 2816 KB Output isn't correct - L* = 0
7 Incorrect 35 ms 3056 KB Output isn't correct - L* = 0
8 Incorrect 35 ms 2816 KB Output isn't correct - L* = 0
9 Incorrect 34 ms 2816 KB Output isn't correct - L* = 0
10 Incorrect 38 ms 3056 KB Output isn't correct - L* = 0
11 Incorrect 35 ms 2896 KB Output isn't correct - L* = 0
12 Incorrect 35 ms 3328 KB Output isn't correct - L* = 0
13 Incorrect 35 ms 2800 KB Output isn't correct - L* = 0
14 Incorrect 34 ms 2816 KB Output isn't correct - L* = 0
15 Incorrect 35 ms 2800 KB Output isn't correct - L* = 0
16 Incorrect 35 ms 3056 KB Output isn't correct - L* = 0
17 Incorrect 35 ms 3072 KB Output isn't correct - L* = 0
18 Incorrect 35 ms 2816 KB Output isn't correct - L* = 0
19 Incorrect 35 ms 3072 KB Output isn't correct - L* = 0
20 Incorrect 35 ms 3072 KB Output isn't correct - L* = 0
21 Incorrect 36 ms 2800 KB Output isn't correct - L* = 0
22 Incorrect 35 ms 3056 KB Output isn't correct - L* = 0
23 Incorrect 34 ms 3056 KB Output isn't correct - L* = 0
24 Incorrect 35 ms 2816 KB Output isn't correct - L* = 0
25 Incorrect 35 ms 2816 KB Output isn't correct - L* = 0
26 Incorrect 35 ms 2856 KB Output isn't correct - L* = 0
27 Incorrect 35 ms 3072 KB Output isn't correct - L* = 0
28 Incorrect 36 ms 3056 KB Output isn't correct - L* = 0
29 Incorrect 35 ms 2800 KB Output isn't correct - L* = 0
30 Incorrect 35 ms 3072 KB Output isn't correct - L* = 0
31 Incorrect 36 ms 3072 KB Output isn't correct - L* = 0
32 Incorrect 35 ms 3056 KB Output isn't correct - L* = 0
33 Incorrect 37 ms 3048 KB Output isn't correct - L* = 0
34 Incorrect 37 ms 2816 KB Output isn't correct - L* = 0
35 Incorrect 35 ms 3072 KB Output isn't correct - L* = 0
36 Incorrect 36 ms 3048 KB Output isn't correct - L* = 0
37 Incorrect 35 ms 2816 KB Output isn't correct - L* = 0
38 Incorrect 36 ms 3072 KB Output isn't correct - L* = 0
39 Incorrect 34 ms 2800 KB Output isn't correct - L* = 0
40 Incorrect 35 ms 2816 KB Output isn't correct - L* = 0