Submission #131565

# Submission time Handle Problem Language Result Execution time Memory
131565 2019-07-17T09:49:06 Z mahmoudbadawy Broken Device (JOI17_broken_device) C++17
0 / 100
54 ms 3144 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)
		{
			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;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 54 ms 3056 KB Output is partially correct - L* = 15
2 Partially correct 39 ms 3056 KB Output is partially correct - L* = 15
3 Partially correct 39 ms 3064 KB Output is partially correct - L* = 17
4 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
5 Partially correct 39 ms 3056 KB Output is partially correct - L* = 15
6 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
7 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
8 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
9 Partially correct 40 ms 3056 KB Output is partially correct - L* = 16
10 Partially correct 39 ms 3056 KB Output is partially correct - L* = 16
11 Partially correct 39 ms 3144 KB Output is partially correct - L* = 17
12 Partially correct 39 ms 3056 KB Output is partially correct - L* = 17
13 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
14 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
15 Partially correct 40 ms 3000 KB Output is partially correct - L* = 16
16 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
17 Incorrect 40 ms 3064 KB Output isn't correct - L* = 0
18 Partially correct 39 ms 3056 KB Output is partially correct - L* = 16
19 Partially correct 41 ms 3056 KB Output is partially correct - L* = 18
20 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
21 Partially correct 43 ms 3056 KB Output is partially correct - L* = 15
22 Partially correct 40 ms 3056 KB Output is partially correct - L* = 14
23 Partially correct 45 ms 3056 KB Output is partially correct - L* = 15
24 Incorrect 41 ms 3056 KB Output isn't correct - L* = 0
25 Partially correct 39 ms 3064 KB Output is partially correct - L* = 15
26 Partially correct 40 ms 3056 KB Output is partially correct - L* = 15
27 Incorrect 40 ms 2968 KB Output isn't correct - L* = 0
28 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
29 Partially correct 40 ms 3056 KB Output is partially correct - L* = 15
30 Incorrect 40 ms 3056 KB Output isn't correct - L* = 0
31 Partially correct 44 ms 3056 KB Output is partially correct - L* = 15
32 Partially correct 41 ms 3056 KB Output is partially correct - L* = 16
33 Partially correct 41 ms 3056 KB Output is partially correct - L* = 15
34 Partially correct 41 ms 3056 KB Output is partially correct - L* = 16
35 Partially correct 40 ms 3056 KB Output is partially correct - L* = 15
36 Partially correct 43 ms 3056 KB Output is partially correct - L* = 15
37 Partially correct 40 ms 2872 KB Output is partially correct - L* = 14
38 Partially correct 40 ms 3056 KB Output is partially correct - L* = 17
39 Incorrect 39 ms 3056 KB Output isn't correct - L* = 0
40 Partially correct 39 ms 3056 KB Output is partially correct - L* = 15