#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
const long long rng = 890834321347256190ll;
void Anna( int N, long long X, int K, int P[] ){
X ^= rng;
vector<int> broke(N);
for (int i = 0; i < K; ++i) broke[P[i]] = 1;
int i = 0;
while (X) {
if (!broke[i] && (!broke[i+1] || !(X&1))) {
Set(i++, 1);
Set(i++, X&1);
X >>= 1;
} else {
Set(i++, 0);
}
}
assert(i <= N);
// cout << i << endl;
for (; i < N; ++i) Set(i, 0);
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
const long long rng = 890834321347256190ll;
long long Bruno( int N, int A[] ){
long long ans = 0, b = 0;
for (int i = 0; i < N; ++i) {
if (A[i]) {
ans |= (long long) A[i+1] << b;
i++;
b++;
}
}
cout << (ans ^ rng) << endl;
return ans ^ rng;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
508 KB |
Wrong Answer [1] |
2 |
Incorrect |
1 ms |
632 KB |
Wrong Answer [1] |
3 |
Incorrect |
0 ms |
508 KB |
Wrong Answer [1] |
4 |
Incorrect |
1 ms |
636 KB |
Wrong Answer [1] |
5 |
Incorrect |
0 ms |
504 KB |
Wrong Answer [1] |
6 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
7 |
Incorrect |
1 ms |
508 KB |
Wrong Answer [1] |
8 |
Incorrect |
2 ms |
636 KB |
Wrong Answer [1] |
9 |
Incorrect |
1 ms |
636 KB |
Wrong Answer [1] |
10 |
Incorrect |
0 ms |
516 KB |
Wrong Answer [1] |
11 |
Incorrect |
0 ms |
508 KB |
Wrong Answer [1] |
12 |
Incorrect |
1 ms |
508 KB |
Wrong Answer [1] |
13 |
Incorrect |
1 ms |
516 KB |
Wrong Answer [1] |
14 |
Incorrect |
1 ms |
508 KB |
Wrong Answer [1] |
15 |
Incorrect |
0 ms |
508 KB |
Wrong Answer [1] |
16 |
Incorrect |
1 ms |
636 KB |
Wrong Answer [1] |
17 |
Incorrect |
1 ms |
508 KB |
Wrong Answer [1] |
18 |
Incorrect |
0 ms |
508 KB |
Wrong Answer [1] |
19 |
Incorrect |
0 ms |
504 KB |
Wrong Answer [1] |
20 |
Incorrect |
1 ms |
576 KB |
Wrong Answer [1] |
21 |
Incorrect |
0 ms |
508 KB |
Wrong Answer [1] |
22 |
Incorrect |
1 ms |
636 KB |
Wrong Answer [1] |
23 |
Incorrect |
1 ms |
644 KB |
Wrong Answer [1] |
24 |
Incorrect |
1 ms |
512 KB |
Wrong Answer [1] |
25 |
Incorrect |
2 ms |
508 KB |
Wrong Answer [1] |
26 |
Incorrect |
0 ms |
644 KB |
Wrong Answer [1] |
27 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [1] |
28 |
Incorrect |
0 ms |
508 KB |
Wrong Answer [1] |
29 |
Incorrect |
0 ms |
636 KB |
Wrong Answer [1] |
30 |
Incorrect |
1 ms |
628 KB |
Wrong Answer [1] |
31 |
Incorrect |
1 ms |
504 KB |
Wrong Answer [1] |
32 |
Incorrect |
0 ms |
508 KB |
Wrong Answer [1] |
33 |
Incorrect |
1 ms |
516 KB |
Wrong Answer [1] |
34 |
Incorrect |
1 ms |
608 KB |
Wrong Answer [1] |
35 |
Incorrect |
1 ms |
508 KB |
Wrong Answer [1] |
36 |
Incorrect |
2 ms |
508 KB |
Wrong Answer [1] |
37 |
Incorrect |
1 ms |
620 KB |
Wrong Answer [1] |
38 |
Incorrect |
1 ms |
636 KB |
Wrong Answer [1] |
39 |
Incorrect |
0 ms |
636 KB |
Wrong Answer [1] |
40 |
Incorrect |
0 ms |
516 KB |
Wrong Answer [1] |