Submission #127372

# Submission time Handle Problem Language Result Execution time Memory
127372 2019-07-09T09:32:49 Z Utaha Broken Device (JOI17_broken_device) C++14
85 / 100
44 ms 3312 KB
#include "Annalib.h"

void Anna( int N, long long X, int K, int P[] ){
	bool ret[150]={0};
	bool notused[150]={0};
	for(int i=0;i<K;i++){
		notused[P[i]]=1;
		notused[P[i]^1]=1;
	}
	int pt=38;
	for(int i=0;i<N;i+=2) if(!notused[i]){
		long long type=X%3;
		X/=3;

		if(type==0){
			ret[i]=1;
			ret[i+1]=0;
		}
		else if(type==1){
			ret[i]=0;
			ret[i+1]=1;
		}
		else{
			ret[i]=ret[i+1]=1;
		}
		pt--;
		if(pt==0) break;
	}
	for(int i=0;i<N;i++) Set(i,ret[i]);
}
#include "Brunolib.h"

long long Bruno( int N, int A[] ){
	long long ret=0;
	long long base=1;
	for(int i=0;i<N;i+=2){
		if(A[i]==0&&A[i+1]==0) continue;

		int type=-1;
		if(A[i]==1){
			if(A[i+1]==1) type=2;
			else type=0;
		}
		else type=1;

		ret+=base*type;
		base*=3;
	}
	return ret;
}
# Verdict Execution time Memory Grader output
1 Partially correct 39 ms 3056 KB Output is partially correct - L* = 37
2 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
3 Partially correct 40 ms 3056 KB Output is partially correct - L* = 37
4 Partially correct 44 ms 3312 KB Output is partially correct - L* = 37
5 Partially correct 40 ms 3056 KB Output is partially correct - L* = 37
6 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
7 Partially correct 41 ms 3056 KB Output is partially correct - L* = 37
8 Partially correct 39 ms 3056 KB Output is partially correct - L* = 37
9 Partially correct 40 ms 3064 KB Output is partially correct - L* = 37
10 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
11 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
12 Partially correct 41 ms 3312 KB Output is partially correct - L* = 37
13 Partially correct 41 ms 3312 KB Output is partially correct - L* = 37
14 Partially correct 40 ms 3256 KB Output is partially correct - L* = 37
15 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
16 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
17 Partially correct 40 ms 3056 KB Output is partially correct - L* = 37
18 Partially correct 39 ms 3152 KB Output is partially correct - L* = 37
19 Partially correct 39 ms 3064 KB Output is partially correct - L* = 37
20 Partially correct 39 ms 3312 KB Output is partially correct - L* = 37
21 Partially correct 40 ms 3056 KB Output is partially correct - L* = 37
22 Partially correct 40 ms 3056 KB Output is partially correct - L* = 37
23 Partially correct 40 ms 3056 KB Output is partially correct - L* = 37
24 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
25 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
26 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
27 Partially correct 40 ms 3056 KB Output is partially correct - L* = 37
28 Partially correct 40 ms 3056 KB Output is partially correct - L* = 37
29 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
30 Partially correct 40 ms 3056 KB Output is partially correct - L* = 37
31 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
32 Partially correct 40 ms 3256 KB Output is partially correct - L* = 37
33 Partially correct 40 ms 3152 KB Output is partially correct - L* = 37
34 Partially correct 41 ms 3216 KB Output is partially correct - L* = 37
35 Partially correct 39 ms 3312 KB Output is partially correct - L* = 37
36 Partially correct 39 ms 3312 KB Output is partially correct - L* = 37
37 Partially correct 40 ms 3312 KB Output is partially correct - L* = 37
38 Partially correct 41 ms 3200 KB Output is partially correct - L* = 37
39 Partially correct 40 ms 3056 KB Output is partially correct - L* = 37
40 Partially correct 43 ms 3056 KB Output is partially correct - L* = 37