#include <bits/stdc++.h>
#include "Annalib.h"
using namespace std;
typedef long long ll;
namespace A{
int n, k;
ll x;
bool broken[152];
};
using namespace A;
void Anna(int N, ll X, int K, int P[]){
n = N, k = K, x = X;
for(int i=0; i<k; i++) broken[P[i]] = 1;
int prv = 0, cnt = 0;
for(int i=0; i<n; i++){
if(cnt == 60) break;
if(P[i]){
Set(i, 0);
continue;
}
if((prv ^ !!(x & (1<<cnt)) ^ (i&1)) == 0) Set(i, 1), prv = ((i&1) ^ !!(x & (1<<cnt))), cnt++;
else Set(i, 0);
}
}
#include <bits/stdc++.h>
#include "Brunolib.h"
using namespace std;
typedef long long ll;
namespace B{
int n;
};
using namespace B;
ll Bruno(int N, int A[]){
n = N;
vector<int> vec;
for(int i=0; i<n; i++) if(A[i]) vec.push_back(i);
ll prv = 0;
ll ret = 0;
for(int i=0; i<(int)vec.size(); i++){
ret += (1<<i) * ((i - prv) % 2 == 0 ? 1 : 0);
}
return ret;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
1024 KB |
Wrong Answer [4] |
2 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |
3 |
Incorrect |
0 ms |
644 KB |
Wrong Answer [4] |
4 |
Incorrect |
1 ms |
644 KB |
Wrong Answer [4] |
5 |
Incorrect |
1 ms |
1148 KB |
Wrong Answer [4] |
6 |
Incorrect |
1 ms |
780 KB |
Wrong Answer [4] |
7 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
8 |
Incorrect |
0 ms |
1024 KB |
Wrong Answer [4] |
9 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |
10 |
Incorrect |
0 ms |
900 KB |
Wrong Answer [4] |
11 |
Incorrect |
0 ms |
1028 KB |
Wrong Answer [4] |
12 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
13 |
Incorrect |
1 ms |
1028 KB |
Wrong Answer [4] |
14 |
Incorrect |
2 ms |
644 KB |
Wrong Answer [4] |
15 |
Incorrect |
1 ms |
644 KB |
Wrong Answer [4] |
16 |
Incorrect |
1 ms |
644 KB |
Wrong Answer [4] |
17 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
18 |
Incorrect |
0 ms |
780 KB |
Wrong Answer [4] |
19 |
Incorrect |
0 ms |
900 KB |
Wrong Answer [4] |
20 |
Incorrect |
0 ms |
784 KB |
Wrong Answer [4] |
21 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
22 |
Incorrect |
0 ms |
644 KB |
Wrong Answer [4] |
23 |
Incorrect |
2 ms |
1032 KB |
Wrong Answer [4] |
24 |
Incorrect |
0 ms |
644 KB |
Wrong Answer [4] |
25 |
Incorrect |
1 ms |
900 KB |
Wrong Answer [4] |
26 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
27 |
Incorrect |
1 ms |
644 KB |
Wrong Answer [4] |
28 |
Incorrect |
0 ms |
776 KB |
Wrong Answer [4] |
29 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
30 |
Incorrect |
0 ms |
776 KB |
Wrong Answer [4] |
31 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
32 |
Incorrect |
0 ms |
644 KB |
Wrong Answer [4] |
33 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |
34 |
Incorrect |
0 ms |
900 KB |
Wrong Answer [4] |
35 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |
36 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |
37 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |
38 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
39 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |
40 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |