#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll Y = 439789002196527822LL;
vector<int> p = {76, 28, 65, 116, 25, 94, 61, 39, 87, 128, 55, 79, 73, 107, 52, 89, 82, 74, 109, 1, 115, 18, 88, 9, 72, 21, 77, 127, 130, 30, 8, 35, 56, 63, 27, 59, 78, 60, 41, 148, 46, 124, 143, 93, 4, 96, 10, 100, 44, 67, 149, 36, 85, 50, 138, 122, 132, 49, 105, 118, 91, 84, 113, 110, 83, 2, 101, 6, 97, 43, 22, 134, 119, 31, 45, 20, 66, 57, 80, 120, 33, 108, 14, 54, 104, 146, 3, 24, 69, 37, 141, 70, 117, 15, 64, 19, 111, 86, 129, 140, 136, 51, 106, 102, 58, 126, 92, 145, 26, 13, 7, 121, 12, 38, 16, 103, 99, 71, 114, 34, 5, 53, 40, 147, 144, 98, 142, 90, 135, 32, 17, 29, 68, 133, 81, 0, 125, 48, 42, 123, 23, 139, 11, 112, 131, 95, 75, 47, 137, 62};
const string B = "010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101";
void Anna(int N, long long X, int K, int P[]) {
vector<int> a(N), used(N);
X ^= Y;
for (int i = 0; i < K; ++i) {
used[P[i]] = true;
}
for (int i = 0, b = 0; i < N; ++i) {
if (!used[p[i]] && (X >> b & 1) == (B[i] - '0')) {
a[p[i]] = 1;
b += 1;
}
}
for (int i = 0; i < N; i++) {
Set(i, a[i]);
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll Y = 439789002196527822LL;
vector<int> p = {76, 28, 65, 116, 25, 94, 61, 39, 87, 128, 55, 79, 73, 107, 52, 89, 82, 74, 109, 1, 115, 18, 88, 9, 72, 21, 77, 127, 130, 30, 8, 35, 56, 63, 27, 59, 78, 60, 41, 148, 46, 124, 143, 93, 4, 96, 10, 100, 44, 67, 149, 36, 85, 50, 138, 122, 132, 49, 105, 118, 91, 84, 113, 110, 83, 2, 101, 6, 97, 43, 22, 134, 119, 31, 45, 20, 66, 57, 80, 120, 33, 108, 14, 54, 104, 146, 3, 24, 69, 37, 141, 70, 117, 15, 64, 19, 111, 86, 129, 140, 136, 51, 106, 102, 58, 126, 92, 145, 26, 13, 7, 121, 12, 38, 16, 103, 99, 71, 114, 34, 5, 53, 40, 147, 144, 98, 142, 90, 135, 32, 17, 29, 68, 133, 81, 0, 125, 48, 42, 123, 23, 139, 11, 112, 131, 95, 75, 47, 137, 62};
const string B = "010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101";
long long Bruno(int N, int A[]) {
ll X = 0;
for (int i = 0, b = 0; i < N; ++i) {
if (A[p[i]]) {
X |= ll(B[i] - '0') << b;
b += 1;
}
}
X ^= Y;
return X;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
28 ms |
2368 KB |
Output is partially correct - L* = 37 |
2 |
Partially correct |
30 ms |
2264 KB |
Output is partially correct - L* = 37 |
3 |
Partially correct |
30 ms |
2376 KB |
Output is partially correct - L* = 38 |
4 |
Partially correct |
28 ms |
2248 KB |
Output is partially correct - L* = 38 |
5 |
Partially correct |
33 ms |
2364 KB |
Output is partially correct - L* = 37 |
6 |
Partially correct |
31 ms |
2232 KB |
Output is partially correct - L* = 37 |
7 |
Partially correct |
31 ms |
2340 KB |
Output is partially correct - L* = 38 |
8 |
Partially correct |
31 ms |
2296 KB |
Output is partially correct - L* = 37 |
9 |
Partially correct |
31 ms |
2224 KB |
Output is partially correct - L* = 37 |
10 |
Partially correct |
34 ms |
2400 KB |
Output is partially correct - L* = 38 |
11 |
Partially correct |
30 ms |
2280 KB |
Output is partially correct - L* = 38 |
12 |
Partially correct |
33 ms |
2280 KB |
Output is partially correct - L* = 39 |
13 |
Partially correct |
31 ms |
2316 KB |
Output is partially correct - L* = 38 |
14 |
Partially correct |
34 ms |
2320 KB |
Output is partially correct - L* = 37 |
15 |
Partially correct |
34 ms |
2344 KB |
Output is partially correct - L* = 39 |
16 |
Partially correct |
32 ms |
2332 KB |
Output is partially correct - L* = 37 |
17 |
Partially correct |
32 ms |
2268 KB |
Output is partially correct - L* = 38 |
18 |
Partially correct |
31 ms |
2300 KB |
Output is partially correct - L* = 38 |
19 |
Partially correct |
32 ms |
2248 KB |
Output is partially correct - L* = 35 |
20 |
Partially correct |
33 ms |
2388 KB |
Output is partially correct - L* = 36 |
21 |
Partially correct |
39 ms |
2300 KB |
Output is partially correct - L* = 38 |
22 |
Correct |
35 ms |
2372 KB |
Output is correct - L* = 40 |
23 |
Partially correct |
30 ms |
2356 KB |
Output is partially correct - L* = 38 |
24 |
Partially correct |
34 ms |
2336 KB |
Output is partially correct - L* = 37 |
25 |
Partially correct |
32 ms |
2228 KB |
Output is partially correct - L* = 38 |
26 |
Partially correct |
33 ms |
2248 KB |
Output is partially correct - L* = 37 |
27 |
Partially correct |
34 ms |
2264 KB |
Output is partially correct - L* = 39 |
28 |
Partially correct |
37 ms |
2320 KB |
Output is partially correct - L* = 37 |
29 |
Partially correct |
41 ms |
2228 KB |
Output is partially correct - L* = 38 |
30 |
Partially correct |
41 ms |
2232 KB |
Output is partially correct - L* = 38 |
31 |
Partially correct |
39 ms |
2360 KB |
Output is partially correct - L* = 37 |
32 |
Partially correct |
31 ms |
2232 KB |
Output is partially correct - L* = 39 |
33 |
Partially correct |
34 ms |
2380 KB |
Output is partially correct - L* = 37 |
34 |
Partially correct |
38 ms |
2364 KB |
Output is partially correct - L* = 38 |
35 |
Partially correct |
32 ms |
2388 KB |
Output is partially correct - L* = 38 |
36 |
Partially correct |
31 ms |
2232 KB |
Output is partially correct - L* = 37 |
37 |
Partially correct |
40 ms |
2256 KB |
Output is partially correct - L* = 39 |
38 |
Partially correct |
33 ms |
2236 KB |
Output is partially correct - L* = 39 |
39 |
Partially correct |
60 ms |
2312 KB |
Output is partially correct - L* = 37 |
40 |
Partially correct |
43 ms |
2320 KB |
Output is partially correct - L* = 39 |