Submission #691245

# Submission time Handle Problem Language Result Execution time Memory
691245 2023-01-31T03:29:13 Z amunduzbaev Broken Device (JOI17_broken_device) C++17
41 / 100
38 ms 2476 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;
	for(int i=1;i<n;i++){
		if(!used[i] && !used[i-1] && j < 60){
			used[i] = used[i-1] = 1;
			Set(i - 1, 1);
			Set(i, (x >> j & 1));
			j++;
		}
	}
	
	for(int i=0;i<n;i++){
		if(!used[i]) Set(i, 0);
	}
}
#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] * 1ll) << j); 
			j++, i++;
		}
	}
	
	return res;
}
# Verdict Execution time Memory Grader output
1 Partially correct 30 ms 2456 KB Output is partially correct - L* = 15
2 Partially correct 28 ms 2248 KB Output is partially correct - L* = 15
3 Partially correct 28 ms 2248 KB Output is partially correct - L* = 17
4 Partially correct 28 ms 2340 KB Output is partially correct - L* = 16
5 Partially correct 28 ms 2232 KB Output is partially correct - L* = 15
6 Partially correct 28 ms 2288 KB Output is partially correct - L* = 15
7 Partially correct 27 ms 2340 KB Output is partially correct - L* = 18
8 Partially correct 28 ms 2356 KB Output is partially correct - L* = 18
9 Partially correct 31 ms 2476 KB Output is partially correct - L* = 16
10 Partially correct 28 ms 2252 KB Output is partially correct - L* = 16
11 Partially correct 28 ms 2348 KB Output is partially correct - L* = 17
12 Partially correct 31 ms 2452 KB Output is partially correct - L* = 17
13 Partially correct 28 ms 2328 KB Output is partially correct - L* = 15
14 Partially correct 29 ms 2244 KB Output is partially correct - L* = 15
15 Partially correct 38 ms 2244 KB Output is partially correct - L* = 16
16 Partially correct 30 ms 2228 KB Output is partially correct - L* = 15
17 Partially correct 27 ms 2324 KB Output is partially correct - L* = 17
18 Partially correct 31 ms 2232 KB Output is partially correct - L* = 16
19 Partially correct 30 ms 2316 KB Output is partially correct - L* = 18
20 Partially correct 27 ms 2256 KB Output is partially correct - L* = 15
21 Partially correct 28 ms 2312 KB Output is partially correct - L* = 15
22 Partially correct 29 ms 2336 KB Output is partially correct - L* = 15
23 Partially correct 28 ms 2168 KB Output is partially correct - L* = 15
24 Partially correct 27 ms 2228 KB Output is partially correct - L* = 17
25 Partially correct 28 ms 2248 KB Output is partially correct - L* = 15
26 Partially correct 29 ms 2356 KB Output is partially correct - L* = 16
27 Partially correct 30 ms 2248 KB Output is partially correct - L* = 15
28 Partially correct 30 ms 2292 KB Output is partially correct - L* = 16
29 Partially correct 27 ms 2348 KB Output is partially correct - L* = 15
30 Partially correct 27 ms 2292 KB Output is partially correct - L* = 16
31 Partially correct 27 ms 2324 KB Output is partially correct - L* = 15
32 Partially correct 30 ms 2256 KB Output is partially correct - L* = 16
33 Partially correct 27 ms 2220 KB Output is partially correct - L* = 15
34 Partially correct 32 ms 2248 KB Output is partially correct - L* = 16
35 Partially correct 32 ms 2268 KB Output is partially correct - L* = 15
36 Partially correct 28 ms 2288 KB Output is partially correct - L* = 15
37 Partially correct 27 ms 2248 KB Output is partially correct - L* = 16
38 Partially correct 28 ms 2244 KB Output is partially correct - L* = 17
39 Partially correct 28 ms 2304 KB Output is partially correct - L* = 15
40 Partially correct 28 ms 2264 KB Output is partially correct - L* = 15