#include "Annalib.h"
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
#define For(i,a,b) for (int i = (a), _b = (b) ; i <= _b; i++)
bool onbit(const long long state, const int pos) {
return (state >> pos) & 1;
}
const int L = 60;
bool broken[500];
void Anna( int N, long long X, int K, int P[] ){
memset(broken,0,sizeof(broken));
for (int i = 0 ; i < K; i++) broken[P[i]] = true;
int cur = 0;
for (int pos = 0; pos < L; pos += 2) {
bool found = false;
while (!found) {
while (broken[cur]) {
Set(cur,0);
++cur;
}
if (onbit(X, pos) && broken[cur + 1]) {
Set(cur,0);
++cur;
continue;
}
if (onbit(X, pos + 1) && broken[cur + 2]) {
Set(cur,0);
++cur;
continue;
}
found = true;
Set(cur,1); ++cur;
Set(cur,onbit(X, pos)); ++cur;
Set(cur,onbit(X, pos + 1)); ++cur;
}
}
while (cur < 150) {
Set(cur,0);++cur;
}
}
#include "Annalib.h"
#include <iostream>
#include <cstdio>
using namespace std;
#define For(i,a,b) for (int i = (a), _b = (b) ; i <= _b; i++)
bool onbit(const long long state, const int pos) {
return (state >> pos) & 1;
}
long long Bruno( int N, int A[] ){
int cur = 0;
int pos = 0;
long long res = 0;
for (; pos < 60 ; pos +=2 ) {
while (!A[cur]) ++cur;
if (A[cur + 1]) res |= (1LL << (pos + 1));
if (A[cur + 2]) res |= (1LL << (pos + 2));
cur = cur + 3;
}
return res;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
2 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
3 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
4 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
5 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
6 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
7 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
8 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
9 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
10 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
11 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
12 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
13 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
14 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
15 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
16 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
17 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
18 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
19 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
20 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
21 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
22 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
23 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
24 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
25 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
26 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
27 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
28 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
29 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
30 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
31 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
32 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
33 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
34 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
35 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
36 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
37 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
38 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
39 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |
40 |
Incorrect |
0 ms |
4636 KB |
Wrong Answer [1] |