Submission #313389

# Submission time Handle Problem Language Result Execution time Memory
313389 2020-10-15T23:36:14 Z bigg Broken Device (JOI17_broken_device) C++14
51 / 100
50 ms 3584 KB
#include<bits/stdc++.h>
#include "Annalib.h"
using namespace std;
typedef long long ll;
void Anna( int N, long long X, int K, int P[] ){
	int marc[200], isbit[200];
	memset(marc, 0, sizeof(marc));
	memset(isbit, 0, sizeof(isbit));
	int itlista = 0;
	for(int i = 0; i < K; i++) marc[P[i]] = 1;
	for(ll itreal = 0; itreal < 60; itreal++){
		while((marc[itlista] || marc[itlista + 1] || marc[itlista + 2]) && itlista < N - 3)	itlista++;
		isbit[itlista] = 1;
		itlista++;
		if(itlista > N - 1) break;
		isbit[itlista] = ((1LL<<itreal) & X) ? 1 : 0;
		itreal++;
		itlista++;
		//printf("%d\n", itlista );
		isbit[itlista] = ((1LL<<itreal) & X) ? 1 : 0;
		itlista++;
		if(itlista > N-1) break;
	}
	for(int i = 0; i < N; i++) Set(i, isbit[i]);
}
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
long long Bruno( int N, int A[] ){
	ll itreal = 0;
	ll resp = 0;
	for(int ilista = 0; ilista < N - 2&& itreal <= 60; ilista++ ){
		if(!A[ilista]) continue;
		ilista++;
		resp |= ((long long) A[ilista] << itreal);
		itreal++;
		ilista++;
		resp |= ((long long) A[ilista] << itreal);
		itreal++;
	}
	return resp;
}
# Verdict Execution time Memory Grader output
1 Partially correct 43 ms 3328 KB Output is partially correct - L* = 20
2 Partially correct 43 ms 3328 KB Output is partially correct - L* = 20
3 Partially correct 44 ms 3584 KB Output is partially correct - L* = 21
4 Partially correct 43 ms 3312 KB Output is partially correct - L* = 20
5 Partially correct 43 ms 3328 KB Output is partially correct - L* = 20
6 Partially correct 43 ms 3312 KB Output is partially correct - L* = 20
7 Partially correct 43 ms 3328 KB Output is partially correct - L* = 20
8 Partially correct 43 ms 3328 KB Output is partially correct - L* = 20
9 Partially correct 43 ms 3328 KB Output is partially correct - L* = 20
10 Partially correct 44 ms 3216 KB Output is partially correct - L* = 21
11 Partially correct 45 ms 3328 KB Output is partially correct - L* = 20
12 Partially correct 43 ms 3328 KB Output is partially correct - L* = 21
13 Partially correct 43 ms 3312 KB Output is partially correct - L* = 20
14 Partially correct 43 ms 3312 KB Output is partially correct - L* = 20
15 Partially correct 44 ms 3312 KB Output is partially correct - L* = 20
16 Partially correct 43 ms 3328 KB Output is partially correct - L* = 21
17 Partially correct 43 ms 3344 KB Output is partially correct - L* = 20
18 Partially correct 43 ms 3312 KB Output is partially correct - L* = 20
19 Partially correct 44 ms 3312 KB Output is partially correct - L* = 22
20 Partially correct 43 ms 3328 KB Output is partially correct - L* = 21
21 Partially correct 43 ms 3312 KB Output is partially correct - L* = 20
22 Partially correct 44 ms 3312 KB Output is partially correct - L* = 20
23 Partially correct 48 ms 3312 KB Output is partially correct - L* = 20
24 Partially correct 45 ms 3328 KB Output is partially correct - L* = 21
25 Partially correct 48 ms 3392 KB Output is partially correct - L* = 21
26 Partially correct 50 ms 3328 KB Output is partially correct - L* = 20
27 Partially correct 43 ms 3312 KB Output is partially correct - L* = 20
28 Partially correct 43 ms 3176 KB Output is partially correct - L* = 21
29 Partially correct 45 ms 3328 KB Output is partially correct - L* = 20
30 Partially correct 43 ms 3328 KB Output is partially correct - L* = 20
31 Partially correct 44 ms 3312 KB Output is partially correct - L* = 20
32 Partially correct 43 ms 3328 KB Output is partially correct - L* = 20
33 Partially correct 44 ms 3328 KB Output is partially correct - L* = 20
34 Partially correct 44 ms 3328 KB Output is partially correct - L* = 20
35 Partially correct 45 ms 3568 KB Output is partially correct - L* = 20
36 Partially correct 48 ms 3328 KB Output is partially correct - L* = 21
37 Partially correct 43 ms 3312 KB Output is partially correct - L* = 20
38 Partially correct 43 ms 3328 KB Output is partially correct - L* = 20
39 Partially correct 43 ms 3328 KB Output is partially correct - L* = 21
40 Partially correct 44 ms 3328 KB Output is partially correct - L* = 21