Submission #313378

# Submission time Handle Problem Language Result Execution time Memory
313378 2020-10-15T22:46:23 Z peuch Broken Device (JOI17_broken_device) C++17
41 / 100
46 ms 3584 KB
#include "Annalib.h"
#include<bits/stdc++.h>
using namespace std;

const int MAXN = 200;

void Anna(int N, long long X, int K, int P[]){
	
	int marc[MAXN];
	int on[MAXN];
	memset(marc, 0, sizeof(marc));
	memset(on, 0, sizeof(on));

	for(int i = 0; i < K; i++)
		marc[P[i]] = 1;

	long long it = 0;
	for(int i = 0; i < N; i += 2){
		if(it > 60) continue;
		if((1LL << it) & X){
			if(marc[i]) continue;
			it++;
			on[i] = 1;
		}
		else{
			if(marc[i + 1]) continue;
			it++;
			on[i + 1] = 1;
		}
	}
	
	for(int i = 0; i < N; i++)
		Set(i, on[i]);

	return;
}
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;

long long Bruno(int N, int A[]){
	
	long long it = 0;
	long long ret = 0;

	for(int i = 0; i < N; i += 2){
		if(A[i] == 0 && A[i + 1] == 0) continue;
		ret |= (long long) A[i] << it;
		it++;
	}

	return ret;
}
# Verdict Execution time Memory Grader output
1 Partially correct 43 ms 3328 KB Output is partially correct - L* = 17
2 Partially correct 44 ms 3328 KB Output is partially correct - L* = 16
3 Partially correct 43 ms 3328 KB Output is partially correct - L* = 18
4 Partially correct 43 ms 3312 KB Output is partially correct - L* = 17
5 Partially correct 43 ms 3312 KB Output is partially correct - L* = 17
6 Partially correct 44 ms 3328 KB Output is partially correct - L* = 20
7 Partially correct 43 ms 3312 KB Output is partially correct - L* = 18
8 Partially correct 44 ms 3328 KB Output is partially correct - L* = 18
9 Partially correct 43 ms 3312 KB Output is partially correct - L* = 18
10 Partially correct 43 ms 3312 KB Output is partially correct - L* = 16
11 Partially correct 43 ms 3312 KB Output is partially correct - L* = 17
12 Partially correct 43 ms 3584 KB Output is partially correct - L* = 22
13 Partially correct 44 ms 3288 KB Output is partially correct - L* = 18
14 Partially correct 43 ms 3328 KB Output is partially correct - L* = 18
15 Partially correct 44 ms 3328 KB Output is partially correct - L* = 16
16 Partially correct 43 ms 3312 KB Output is partially correct - L* = 17
17 Partially correct 43 ms 3312 KB Output is partially correct - L* = 22
18 Partially correct 44 ms 3312 KB Output is partially correct - L* = 16
19 Partially correct 43 ms 3312 KB Output is partially correct - L* = 18
20 Partially correct 44 ms 3392 KB Output is partially correct - L* = 18
21 Partially correct 44 ms 3328 KB Output is partially correct - L* = 15
22 Partially correct 43 ms 3328 KB Output is partially correct - L* = 16
23 Partially correct 44 ms 3328 KB Output is partially correct - L* = 18
24 Partially correct 43 ms 3328 KB Output is partially correct - L* = 17
25 Partially correct 44 ms 3328 KB Output is partially correct - L* = 21
26 Partially correct 43 ms 3312 KB Output is partially correct - L* = 16
27 Partially correct 43 ms 3312 KB Output is partially correct - L* = 15
28 Partially correct 45 ms 3136 KB Output is partially correct - L* = 16
29 Partially correct 43 ms 3328 KB Output is partially correct - L* = 16
30 Partially correct 43 ms 3312 KB Output is partially correct - L* = 21
31 Partially correct 43 ms 3312 KB Output is partially correct - L* = 16
32 Partially correct 43 ms 3136 KB Output is partially correct - L* = 18
33 Partially correct 43 ms 3328 KB Output is partially correct - L* = 17
34 Partially correct 43 ms 3312 KB Output is partially correct - L* = 18
35 Partially correct 44 ms 3312 KB Output is partially correct - L* = 15
36 Partially correct 45 ms 3328 KB Output is partially correct - L* = 20
37 Partially correct 44 ms 3328 KB Output is partially correct - L* = 16
38 Partially correct 46 ms 3328 KB Output is partially correct - L* = 18
39 Partially correct 46 ms 3312 KB Output is partially correct - L* = 17
40 Partially correct 45 ms 3320 KB Output is partially correct - L* = 15