Submission #131572

# Submission time Handle Problem Language Result Execution time Memory
131572 2019-07-17T09:56:01 Z mahmoudbadawy Broken Device (JOI17_broken_device) C++17
0 / 100
43 ms 3312 KB
#include "Annalib.h"
#include <bits/stdc++.h>

using namespace std;

int br[155];

void Anna( int N, long long X, int K, int P[] ){
	for(int i=0;i<N;i++) br[i]=0;
	for(int i=0;i<K;i++) br[P[i]]=1;
	for(int i=0;i<N;i++)
	{
		if(i+1<N&&br[i]==0&&(br[i+1]==0||(X%2==0&&br[i+1]==1)))
		{
			Set(i,1); Set(i+1,X%2); X/=2;
			i++;
		}
		else
			Set(i,0);
	}
	if(X && K<=15) assert(false);
}
#include "Brunolib.h"
#include <bits/stdc++.h>

using namespace std;

int cur[60];

long long Bruno( int N, int A[] ){
	long long ans=0;
	int co=0;
	for(int i=0;i<N-1;i++)
	{
		//cout << i << endl;
		if(A[i])
		{
			cur[co++]=A[i+1];
			i++;
		}
	}
	for(int i=co-1;i>=0;i--) ans=ans*2+cur[i];
	//cout << ans << endl;
	//cout << "DONE" << endl;
	return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 41 ms 3056 KB Output is partially correct - L* = 17
2 Partially correct 40 ms 3064 KB Output is partially correct - L* = 16
3 Partially correct 40 ms 3064 KB Output is partially correct - L* = 18
4 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
5 Partially correct 40 ms 3056 KB Output is partially correct - L* = 17
6 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
7 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
8 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
9 Partially correct 40 ms 3008 KB Output is partially correct - L* = 18
10 Partially correct 40 ms 3056 KB Output is partially correct - L* = 16
11 Partially correct 40 ms 3056 KB Output is partially correct - L* = 17
12 Partially correct 40 ms 3000 KB Output is partially correct - L* = 18
13 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
14 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
15 Partially correct 40 ms 3000 KB Output is partially correct - L* = 16
16 Incorrect 40 ms 2904 KB Output isn't correct - L* = 0
17 Incorrect 40 ms 3080 KB Output isn't correct - L* = 0
18 Partially correct 41 ms 3056 KB Output is partially correct - L* = 16
19 Partially correct 40 ms 3056 KB Output is partially correct - L* = 18
20 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
21 Partially correct 40 ms 3056 KB Output is partially correct - L* = 17
22 Partially correct 40 ms 2912 KB Output is partially correct - L* = 14
23 Partially correct 40 ms 3056 KB Output is partially correct - L* = 15
24 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
25 Partially correct 40 ms 3056 KB Output is partially correct - L* = 15
26 Partially correct 40 ms 3056 KB Output is partially correct - L* = 15
27 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
28 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
29 Partially correct 40 ms 3064 KB Output is partially correct - L* = 16
30 Incorrect 41 ms 3056 KB Output isn't correct - L* = 0
31 Partially correct 40 ms 3056 KB Output is partially correct - L* = 17
32 Partially correct 43 ms 2912 KB Output is partially correct - L* = 18
33 Partially correct 40 ms 3056 KB Output is partially correct - L* = 17
34 Partially correct 40 ms 3064 KB Output is partially correct - L* = 18
35 Incorrect 43 ms 3056 KB Output isn't correct - L* = 0
36 Partially correct 40 ms 3312 KB Output is partially correct - L* = 15
37 Partially correct 40 ms 3056 KB Output is partially correct - L* = 14
38 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
39 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
40 Partially correct 40 ms 3056 KB Output is partially correct - L* = 15