Submission #340980

# Submission time Handle Problem Language Result Execution time Memory
340980 2020-12-28T19:42:19 Z rqi Broken Device (JOI17_broken_device) C++14
8 / 100
51 ms 3228 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;



void Anna( int N, ll _X, int K, int P[] ){
	vi res(150, 0);
	bitset<150> bad;
	bitset<60> X = bitset<60>(_X);

	for(int i = 0; i < K; i++){
		bad[P[i]] = 1;
	}

	bool frontbad = 0;
	for(int i = 0; i < 60; i++){
		if(bad[i]) frontbad = 1;
	}

	if(!frontbad){
		for(int i = 0; i < 60; i++){
			res[i] = X[i];
		}
	}
	else{
		for(int i = 0; i < 60; i++){
			res[90+i] = X[i];
		}
	}

	for(int i = 0; i < N; i++){
		Set(i, res[i]);
		//cout << res[i];
	}
	//cout << "\n";
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

long long Bruno( int N, int A[] ){
	bool frontbad = 1;
	for(int i = 0; i < 60; i++){
		if(A[i] == 1) frontbad = 0;
	}
	bitset<60> X;
	if(!frontbad){
		for(int i = 0; i < 60; i++){
			X[i] = A[i];
		}
	}
	else{
		for(int i = 0; i < 60; i++){
			X[i] = A[90+i];
		}
	}

	//cout << ll(X.to_ulong()) << "\n";

	return ll(X.to_ulong());
}
# Verdict Execution time Memory Grader output
1 Partially correct 45 ms 2948 KB Output is partially correct - L* = 14
2 Partially correct 40 ms 2880 KB Output is partially correct - L* = 14
3 Partially correct 40 ms 2956 KB Output is partially correct - L* = 14
4 Partially correct 39 ms 2744 KB Output is partially correct - L* = 14
5 Partially correct 39 ms 2752 KB Output is partially correct - L* = 15
6 Partially correct 39 ms 2748 KB Output is partially correct - L* = 14
7 Partially correct 39 ms 2884 KB Output is partially correct - L* = 14
8 Partially correct 43 ms 3004 KB Output is partially correct - L* = 14
9 Partially correct 40 ms 3204 KB Output is partially correct - L* = 14
10 Partially correct 39 ms 3076 KB Output is partially correct - L* = 14
11 Partially correct 40 ms 2948 KB Output is partially correct - L* = 14
12 Partially correct 44 ms 3000 KB Output is partially correct - L* = 14
13 Partially correct 40 ms 2872 KB Output is partially correct - L* = 14
14 Partially correct 39 ms 2744 KB Output is partially correct - L* = 14
15 Partially correct 39 ms 2960 KB Output is partially correct - L* = 14
16 Partially correct 48 ms 2748 KB Output is partially correct - L* = 14
17 Partially correct 40 ms 2896 KB Output is partially correct - L* = 14
18 Partially correct 39 ms 2948 KB Output is partially correct - L* = 14
19 Partially correct 39 ms 2744 KB Output is partially correct - L* = 14
20 Partially correct 39 ms 2880 KB Output is partially correct - L* = 14
21 Partially correct 42 ms 2740 KB Output is partially correct - L* = 14
22 Partially correct 40 ms 2868 KB Output is partially correct - L* = 14
23 Partially correct 47 ms 2948 KB Output is partially correct - L* = 14
24 Partially correct 46 ms 2692 KB Output is partially correct - L* = 14
25 Partially correct 39 ms 2500 KB Output is partially correct - L* = 14
26 Partially correct 39 ms 2884 KB Output is partially correct - L* = 14
27 Partially correct 45 ms 2876 KB Output is partially correct - L* = 14
28 Partially correct 39 ms 3020 KB Output is partially correct - L* = 14
29 Partially correct 39 ms 2948 KB Output is partially correct - L* = 14
30 Partially correct 40 ms 2956 KB Output is partially correct - L* = 14
31 Partially correct 41 ms 2888 KB Output is partially correct - L* = 14
32 Partially correct 41 ms 2912 KB Output is partially correct - L* = 14
33 Partially correct 39 ms 2868 KB Output is partially correct - L* = 14
34 Partially correct 41 ms 2996 KB Output is partially correct - L* = 14
35 Partially correct 39 ms 2744 KB Output is partially correct - L* = 14
36 Partially correct 39 ms 2892 KB Output is partially correct - L* = 14
37 Partially correct 51 ms 3228 KB Output is partially correct - L* = 14
38 Partially correct 40 ms 2784 KB Output is partially correct - L* = 14
39 Partially correct 40 ms 2912 KB Output is partially correct - L* = 14
40 Partially correct 39 ms 3108 KB Output is partially correct - L* = 14