Submission #340979

# Submission time Handle Problem Language Result Execution time Memory
340979 2020-12-28T19:40:16 Z rqi Broken Device (JOI17_broken_device) C++14
0 / 100
49 ms 3356 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;

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

vi res(150, 0);

bool bad[150];

void Anna( int N, ll _X, int K, int P[] ){
	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 38 ms 2872 KB Output isn't correct - L* = 0
2 Partially correct 39 ms 2900 KB Output isn't correct - L* = 0
3 Partially correct 38 ms 2740 KB Output isn't correct - L* = 0
4 Partially correct 39 ms 2956 KB Output isn't correct - L* = 0
5 Partially correct 45 ms 2940 KB Output isn't correct - L* = 0
6 Partially correct 39 ms 2948 KB Output isn't correct - L* = 0
7 Partially correct 40 ms 2872 KB Output isn't correct - L* = 0
8 Partially correct 38 ms 2800 KB Output isn't correct - L* = 0
9 Partially correct 39 ms 2872 KB Output isn't correct - L* = 0
10 Partially correct 49 ms 3356 KB Output isn't correct - L* = 0
11 Partially correct 38 ms 2744 KB Output isn't correct - L* = 0
12 Partially correct 38 ms 2744 KB Output isn't correct - L* = 0
13 Partially correct 38 ms 2744 KB Output isn't correct - L* = 0
14 Partially correct 38 ms 2740 KB Output isn't correct - L* = 0
15 Partially correct 38 ms 2868 KB Output isn't correct - L* = 0
16 Partially correct 38 ms 2772 KB Output isn't correct - L* = 0
17 Partially correct 38 ms 2868 KB Output isn't correct - L* = 0
18 Partially correct 38 ms 2868 KB Output isn't correct - L* = 0
19 Partially correct 38 ms 2744 KB Output isn't correct - L* = 0
20 Partially correct 38 ms 2872 KB Output isn't correct - L* = 0
21 Partially correct 39 ms 2928 KB Output isn't correct - L* = 0
22 Partially correct 40 ms 2740 KB Output isn't correct - L* = 0
23 Partially correct 40 ms 2744 KB Output isn't correct - L* = 0
24 Partially correct 38 ms 2908 KB Output isn't correct - L* = 0
25 Partially correct 47 ms 2748 KB Output isn't correct - L* = 0
26 Partially correct 38 ms 2748 KB Output isn't correct - L* = 0
27 Partially correct 38 ms 2748 KB Output isn't correct - L* = 0
28 Partially correct 38 ms 2744 KB Output isn't correct - L* = 0
29 Partially correct 38 ms 3004 KB Output isn't correct - L* = 0
30 Partially correct 38 ms 2748 KB Output isn't correct - L* = 0
31 Partially correct 38 ms 3212 KB Output isn't correct - L* = 0
32 Partially correct 38 ms 2792 KB Output isn't correct - L* = 0
33 Partially correct 38 ms 2740 KB Output isn't correct - L* = 0
34 Partially correct 39 ms 2868 KB Output isn't correct - L* = 0
35 Partially correct 38 ms 2872 KB Output isn't correct - L* = 0
36 Partially correct 39 ms 2904 KB Output isn't correct - L* = 0
37 Partially correct 38 ms 3000 KB Output isn't correct - L* = 0
38 Partially correct 38 ms 2872 KB Output isn't correct - L* = 0
39 Partially correct 39 ms 2948 KB Output isn't correct - L* = 0
40 Partially correct 38 ms 2744 KB Output isn't correct - L* = 0