Submission #131615

# Submission time Handle Problem Language Result Execution time Memory
131615 2019-07-17T10:31:31 Z mahmoudbadawy Broken Device (JOI17_broken_device) C++17
41 / 100
43 ms 3320 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;
	int cur=59;
	for(int i=0;i<N;i++)
	{
		if(cur>=0&&i+1<N&&br[i]==0&&(br[i+1]==0||((X&(1LL<<cur))==0&&br[i+1]==1)))
		{
			Set(i,1); Set(i+1,(X&(1LL<<cur))?1:0);
			cur--;
			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])
		{
			ans=ans*2+A[i+1];
			i++;
		}
	}
	//cout << ans << endl;
	//cout << "DONE" << endl;
	return ans;
}

Compilation message

Bruno.cpp: In function 'long long int Bruno(int, int*)':
Bruno.cpp:10:6: warning: unused variable 'co' [-Wunused-variable]
  int co=0;
      ^~
# Verdict Execution time Memory Grader output
1 Partially correct 40 ms 3320 KB Output is partially correct - L* = 15
2 Partially correct 39 ms 3312 KB Output is partially correct - L* = 15
3 Partially correct 40 ms 3320 KB Output is partially correct - L* = 16
4 Partially correct 40 ms 3056 KB Output is partially correct - L* = 15
5 Partially correct 40 ms 3056 KB Output is partially correct - L* = 15
6 Partially correct 39 ms 3312 KB Output is partially correct - L* = 15
7 Partially correct 40 ms 3280 KB Output is partially correct - L* = 15
8 Partially correct 39 ms 3088 KB Output is partially correct - L* = 15
9 Partially correct 39 ms 3312 KB Output is partially correct - L* = 18
10 Partially correct 39 ms 3312 KB Output is partially correct - L* = 15
11 Partially correct 39 ms 3312 KB Output is partially correct - L* = 17
12 Partially correct 40 ms 3056 KB Output is partially correct - L* = 16
13 Partially correct 39 ms 3312 KB Output is partially correct - L* = 15
14 Partially correct 39 ms 3056 KB Output is partially correct - L* = 15
15 Partially correct 39 ms 3056 KB Output is partially correct - L* = 16
16 Partially correct 39 ms 3312 KB Output is partially correct - L* = 17
17 Partially correct 41 ms 3312 KB Output is partially correct - L* = 17
18 Partially correct 39 ms 3312 KB Output is partially correct - L* = 16
19 Partially correct 40 ms 3312 KB Output is partially correct - L* = 18
20 Partially correct 40 ms 3256 KB Output is partially correct - L* = 18
21 Partially correct 39 ms 3312 KB Output is partially correct - L* = 15
22 Partially correct 40 ms 3312 KB Output is partially correct - L* = 16
23 Partially correct 39 ms 3312 KB Output is partially correct - L* = 17
24 Partially correct 40 ms 3320 KB Output is partially correct - L* = 16
25 Partially correct 41 ms 3312 KB Output is partially correct - L* = 15
26 Partially correct 40 ms 3064 KB Output is partially correct - L* = 16
27 Partially correct 41 ms 3072 KB Output is partially correct - L* = 16
28 Partially correct 40 ms 3056 KB Output is partially correct - L* = 15
29 Partially correct 41 ms 3056 KB Output is partially correct - L* = 15
30 Partially correct 43 ms 3312 KB Output is partially correct - L* = 15
31 Partially correct 41 ms 3056 KB Output is partially correct - L* = 17
32 Partially correct 40 ms 3176 KB Output is partially correct - L* = 18
33 Partially correct 43 ms 3072 KB Output is partially correct - L* = 15
34 Partially correct 39 ms 3312 KB Output is partially correct - L* = 16
35 Partially correct 40 ms 3256 KB Output is partially correct - L* = 15
36 Partially correct 40 ms 3312 KB Output is partially correct - L* = 15
37 Partially correct 43 ms 3312 KB Output is partially correct - L* = 16
38 Partially correct 40 ms 3240 KB Output is partially correct - L* = 18
39 Partially correct 40 ms 3312 KB Output is partially correct - L* = 15
40 Partially correct 41 ms 3152 KB Output is partially correct - L* = 15