Submission #1113122

# Submission time Handle Problem Language Result Execution time Memory
1113122 2024-11-15T19:57:28 Z ttamx Broken Device (JOI17_broken_device) C++17
0 / 100
57 ms 2856 KB
#include "Annalib.h"
#include<bits/stdc++.h>

using namespace std;

void Anna(int n,long long x,int k,int p[]){
	mt19937_64 rng(0);
	vector<uint64_t> basis(64);
	vector<int> id(64,-1);
	auto add=[&](uint64_t x,int i){
		for(int b=63;b>=0;b--){
			if(x>>b&1){
				if(id[b]==-1){
					basis[b]=x;
					id[b]=i;
					return;
				}
				x^=basis[b];
			}
		}
	};
	vector<bool> ok(n,true);
	for(int i=0;i<k;i++){
		ok[p[i]]=false;
	}
	for(int i=0;i<n;i++){
		uint64_t val=rng();
		if(ok[i]){
			add(val,i);
		}
	}
	vector<int> ans(n);
	for(int i=63;i>=0;i--){
		if(x>>i&1){
			x^=basis[i];
			ans[id[i]]=1;
		}
	}
	for(int i=0;i<n;i++){
		Set(i,ans[i]);
	}
}
#include "Brunolib.h"
#include<bits/stdc++.h>

using namespace std;

long long Bruno(int n,int a[]){
	mt19937_64 rng(0);
	uint64_t ans=0;
	for(int i=0;i<n;i++){
		uint64_t val=rng();
		if(a[i]){
			ans^=val;
		}
	}
  	return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 47 ms 2736 KB Output isn't correct - L* = 0
2 Partially correct 47 ms 2676 KB Output isn't correct - L* = 0
3 Partially correct 48 ms 2752 KB Output isn't correct - L* = 0
4 Partially correct 50 ms 2832 KB Output isn't correct - L* = 0
5 Partially correct 54 ms 2660 KB Output isn't correct - L* = 0
6 Partially correct 46 ms 2768 KB Output isn't correct - L* = 0
7 Partially correct 46 ms 2736 KB Output isn't correct - L* = 0
8 Partially correct 57 ms 2736 KB Output isn't correct - L* = 0
9 Partially correct 47 ms 2744 KB Output isn't correct - L* = 0
10 Partially correct 48 ms 2744 KB Output isn't correct - L* = 0
11 Partially correct 50 ms 2856 KB Output isn't correct - L* = 0
12 Partially correct 50 ms 2736 KB Output isn't correct - L* = 0
13 Partially correct 55 ms 2752 KB Output isn't correct - L* = 0
14 Partially correct 47 ms 2736 KB Output isn't correct - L* = 0
15 Partially correct 48 ms 2744 KB Output isn't correct - L* = 0
16 Partially correct 47 ms 2740 KB Output isn't correct - L* = 0
17 Partially correct 46 ms 2740 KB Output isn't correct - L* = 0
18 Partially correct 49 ms 2700 KB Output isn't correct - L* = 0
19 Partially correct 48 ms 2736 KB Output isn't correct - L* = 0
20 Partially correct 49 ms 2660 KB Output isn't correct - L* = 0
21 Partially correct 48 ms 2736 KB Output isn't correct - L* = 0
22 Partially correct 50 ms 2660 KB Output isn't correct - L* = 0
23 Partially correct 57 ms 2844 KB Output isn't correct - L* = 0
24 Partially correct 47 ms 2744 KB Output isn't correct - L* = 0
25 Partially correct 47 ms 2736 KB Output isn't correct - L* = 0
26 Partially correct 46 ms 2744 KB Output isn't correct - L* = 0
27 Partially correct 47 ms 2660 KB Output isn't correct - L* = 0
28 Partially correct 51 ms 2732 KB Output isn't correct - L* = 0
29 Partially correct 57 ms 2732 KB Output isn't correct - L* = 0
30 Partially correct 44 ms 2684 KB Output isn't correct - L* = 0
31 Partially correct 45 ms 2732 KB Output isn't correct - L* = 0
32 Partially correct 44 ms 2616 KB Output isn't correct - L* = 0
33 Partially correct 48 ms 2728 KB Output isn't correct - L* = 0
34 Partially correct 54 ms 2740 KB Output isn't correct - L* = 0
35 Partially correct 48 ms 2736 KB Output isn't correct - L* = 0
36 Partially correct 46 ms 2736 KB Output isn't correct - L* = 0
37 Partially correct 48 ms 2760 KB Output isn't correct - L* = 0
38 Partially correct 45 ms 2732 KB Output isn't correct - L* = 0
39 Partially correct 46 ms 2736 KB Output isn't correct - L* = 0
40 Partially correct 46 ms 2696 KB Output isn't correct - L* = 0