Submission #691241

# Submission time Handle Problem Language Result Execution time Memory
691241 2023-01-31T03:25:11 Z amunduzbaev Broken Device (JOI17_broken_device) C++17
0 / 100
36 ms 2516 KB
#include "Annalib.h"
#include "bits/stdc++.h"
using namespace std;

typedef long long ll;
#define ar array
//~ #define int ll

void Anna(int n, ll x, int k, int p[] ){
	vector<int> used(n, 0);
	for(int i=0;i<k;i++){
		used[p[i]] = 1;
		Set(p[i], 0);
	}
	
	int j = 0;
	vector<int> a(n, 0);
	//~ cout<<n<<endl;
	for(int i=1;i<n;i++){
		if(!used[i] && !used[i-1] && j < 60){
			used[i] = used[i-1] = 1;
			//~ cout<<i - 1<<" "<<i<<" "<<(x >> j & 1)<<"\n";
			a[i - 1] = 1, a[i] = (x >> j & 1);
			Set(i - 1, 1);
			Set(i, (x >> j & 1));
			j++;
		}
	}
	
	for(int i=0;i<n;i++){
		if(!used[i]) Set(i, 0);
	}
	//~ cout<<x<<"<-\n";
}
#include "Brunolib.h"
#include "bits/stdc++.h"
using namespace std;

typedef long long ll;
#define ar array
//~ #define int ll

ll Bruno(int n, int a[] ){
	int j = 0;
	ll res = 0;
	for(int i=0;i<n;i++){
		if(a[i]){
			res |= (a[i + 1] << j); 
			j++, i++;
		}
	}
	//~ cout<<res<<" <-\n";
	return res;
}
# Verdict Execution time Memory Grader output
1 Partially correct 28 ms 2264 KB Output isn't correct - L* = 0
2 Partially correct 30 ms 2284 KB Output isn't correct - L* = 0
3 Partially correct 30 ms 2252 KB Output isn't correct - L* = 0
4 Partially correct 33 ms 2320 KB Output isn't correct - L* = 0
5 Partially correct 28 ms 2248 KB Output isn't correct - L* = 0
6 Partially correct 28 ms 2332 KB Output isn't correct - L* = 0
7 Partially correct 30 ms 2312 KB Output isn't correct - L* = 0
8 Partially correct 28 ms 2364 KB Output isn't correct - L* = 0
9 Partially correct 28 ms 2228 KB Output isn't correct - L* = 0
10 Partially correct 28 ms 2344 KB Output isn't correct - L* = 0
11 Partially correct 33 ms 2516 KB Output isn't correct - L* = 0
12 Partially correct 28 ms 2248 KB Output isn't correct - L* = 0
13 Partially correct 31 ms 2372 KB Output isn't correct - L* = 0
14 Partially correct 28 ms 2252 KB Output isn't correct - L* = 0
15 Partially correct 28 ms 2256 KB Output isn't correct - L* = 0
16 Partially correct 28 ms 2232 KB Output isn't correct - L* = 0
17 Partially correct 30 ms 2256 KB Output isn't correct - L* = 0
18 Partially correct 32 ms 2336 KB Output isn't correct - L* = 0
19 Partially correct 28 ms 2272 KB Output isn't correct - L* = 0
20 Partially correct 28 ms 2248 KB Output isn't correct - L* = 0
21 Partially correct 30 ms 2252 KB Output isn't correct - L* = 0
22 Partially correct 28 ms 2252 KB Output isn't correct - L* = 0
23 Partially correct 28 ms 2252 KB Output isn't correct - L* = 0
24 Partially correct 28 ms 2440 KB Output isn't correct - L* = 0
25 Partially correct 32 ms 2232 KB Output isn't correct - L* = 0
26 Partially correct 30 ms 2288 KB Output isn't correct - L* = 0
27 Partially correct 28 ms 2284 KB Output isn't correct - L* = 0
28 Partially correct 28 ms 2224 KB Output isn't correct - L* = 0
29 Partially correct 28 ms 2256 KB Output isn't correct - L* = 0
30 Partially correct 28 ms 2240 KB Output isn't correct - L* = 0
31 Partially correct 32 ms 2232 KB Output isn't correct - L* = 0
32 Partially correct 28 ms 2244 KB Output isn't correct - L* = 0
33 Partially correct 30 ms 2216 KB Output isn't correct - L* = 0
34 Partially correct 28 ms 2244 KB Output isn't correct - L* = 0
35 Partially correct 30 ms 2232 KB Output isn't correct - L* = 0
36 Partially correct 28 ms 2268 KB Output isn't correct - L* = 0
37 Partially correct 30 ms 2308 KB Output isn't correct - L* = 0
38 Partially correct 28 ms 2256 KB Output isn't correct - L* = 0
39 Partially correct 28 ms 2244 KB Output isn't correct - L* = 0
40 Partially correct 36 ms 2288 KB Output isn't correct - L* = 0