Submission #207557

# Submission time Handle Problem Language Result Execution time Memory
207557 2020-03-08T03:21:14 Z autumn_eel Broken Device (JOI17_broken_device) C++14
41 / 100
65 ms 3064 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-1){
		if(!b[i]&&!b[i+1]){
			d[i]=1;d[i+1]=(X>>t&1);
			if(t==0)break;
			t--;
			i+=2;
		}
		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];
			i+=2;
		}
		else i++;
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 47 ms 3056 KB Output is partially correct - L* = 15
2 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
3 Partially correct 48 ms 3056 KB Output is partially correct - L* = 16
4 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
5 Partially correct 50 ms 3032 KB Output is partially correct - L* = 15
6 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
7 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
8 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
9 Partially correct 48 ms 3056 KB Output is partially correct - L* = 16
10 Partially correct 52 ms 3056 KB Output is partially correct - L* = 15
11 Partially correct 49 ms 3056 KB Output is partially correct - L* = 16
12 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
13 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
14 Partially correct 54 ms 3056 KB Output is partially correct - L* = 15
15 Partially correct 65 ms 3056 KB Output is partially correct - L* = 15
16 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
17 Partially correct 50 ms 3056 KB Output is partially correct - L* = 17
18 Partially correct 49 ms 3056 KB Output is partially correct - L* = 16
19 Partially correct 48 ms 3056 KB Output is partially correct - L* = 18
20 Partially correct 53 ms 3056 KB Output is partially correct - L* = 15
21 Partially correct 52 ms 3056 KB Output is partially correct - L* = 15
22 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
23 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
24 Partially correct 50 ms 3056 KB Output is partially correct - L* = 16
25 Partially correct 56 ms 3056 KB Output is partially correct - L* = 15
26 Partially correct 52 ms 3056 KB Output is partially correct - L* = 16
27 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
28 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
29 Partially correct 49 ms 2920 KB Output is partially correct - L* = 15
30 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
31 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
32 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
33 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
34 Partially correct 49 ms 3056 KB Output is partially correct - L* = 15
35 Partially correct 49 ms 3064 KB Output is partially correct - L* = 15
36 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15
37 Partially correct 49 ms 3056 KB Output is partially correct - L* = 16
38 Partially correct 50 ms 3056 KB Output is partially correct - L* = 17
39 Partially correct 50 ms 2912 KB Output is partially correct - L* = 15
40 Partially correct 50 ms 3056 KB Output is partially correct - L* = 15