Submission #207558

# Submission time Handle Problem Language Result Execution time Memory
207558 2020-03-08T03:28:49 Z autumn_eel Broken Device (JOI17_broken_device) C++14
51 / 100
67 ms 3312 KB
#include "Annalib.h"
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;

bool b[160],d[160];

void Anna(int N,ll X,int K,int P[]){
	memset(b,0,sizeof(b));
	memset(d,0,sizeof(d));
	rep(i,K){
		b[P[i]]=1;
	}
	int t=59;
	int i=0;
	while(i<N-2){
		if(!b[i]&&!b[i+1]&&!b[i+2]){
			d[i]=1;d[i+1]=(X>>t&1);t--;d[i+2]=(X>>t&1);
			if(t==0)break;
			t--;
			i+=3;
		}
		else i++;
	}
	rep(i,N)Set(i,d[i]);
}
#include "Brunolib.h"
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;

ll Bruno(int N,int A[]){
	ll ans=0;
	int i=0;
	while(i<N){
		if(A[i]==1){
			ans<<=1;
			ans+=A[i+1];
			ans<<=1;
			ans+=A[i+2];
			i+=3;
		}
		else i++;
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 48 ms 2800 KB Output is partially correct - L* = 20
2 Partially correct 50 ms 3064 KB Output is partially correct - L* = 20
3 Partially correct 49 ms 3056 KB Output is partially correct - L* = 20
4 Partially correct 49 ms 3056 KB Output is partially correct - L* = 20
5 Partially correct 48 ms 3056 KB Output is partially correct - L* = 20
6 Partially correct 50 ms 3056 KB Output is partially correct - L* = 20
7 Partially correct 51 ms 3056 KB Output is partially correct - L* = 20
8 Partially correct 49 ms 3056 KB Output is partially correct - L* = 20
9 Partially correct 50 ms 3056 KB Output is partially correct - L* = 20
10 Partially correct 50 ms 3312 KB Output is partially correct - L* = 20
11 Partially correct 50 ms 3064 KB Output is partially correct - L* = 20
12 Partially correct 50 ms 3056 KB Output is partially correct - L* = 20
13 Partially correct 51 ms 3056 KB Output is partially correct - L* = 20
14 Partially correct 67 ms 3056 KB Output is partially correct - L* = 20
15 Partially correct 52 ms 3056 KB Output is partially correct - L* = 20
16 Partially correct 52 ms 3296 KB Output is partially correct - L* = 21
17 Partially correct 49 ms 3056 KB Output is partially correct - L* = 20
18 Partially correct 50 ms 3056 KB Output is partially correct - L* = 20
19 Partially correct 58 ms 3056 KB Output is partially correct - L* = 20
20 Partially correct 53 ms 3056 KB Output is partially correct - L* = 21
21 Partially correct 49 ms 3064 KB Output is partially correct - L* = 20
22 Partially correct 56 ms 3056 KB Output is partially correct - L* = 20
23 Partially correct 50 ms 3056 KB Output is partially correct - L* = 20
24 Partially correct 50 ms 3056 KB Output is partially correct - L* = 21
25 Partially correct 49 ms 3056 KB Output is partially correct - L* = 20
26 Partially correct 51 ms 3056 KB Output is partially correct - L* = 20
27 Partially correct 49 ms 3056 KB Output is partially correct - L* = 20
28 Partially correct 51 ms 3064 KB Output is partially correct - L* = 21
29 Partially correct 50 ms 3056 KB Output is partially correct - L* = 20
30 Partially correct 50 ms 3056 KB Output is partially correct - L* = 20
31 Partially correct 59 ms 3056 KB Output is partially correct - L* = 20
32 Partially correct 51 ms 3056 KB Output is partially correct - L* = 20
33 Partially correct 50 ms 3056 KB Output is partially correct - L* = 20
34 Partially correct 48 ms 3056 KB Output is partially correct - L* = 20
35 Partially correct 52 ms 3008 KB Output is partially correct - L* = 20
36 Partially correct 49 ms 3056 KB Output is partially correct - L* = 21
37 Partially correct 53 ms 3056 KB Output is partially correct - L* = 20
38 Partially correct 52 ms 3056 KB Output is partially correct - L* = 20
39 Partially correct 49 ms 3056 KB Output is partially correct - L* = 20
40 Partially correct 50 ms 3056 KB Output is partially correct - L* = 20