#include "Annalib.h"
#include "bits/stdc++.h"
void Anna( int N, long long X, int K, int P[] ){
std::vector<int>bad(N, 0);
for(int i=0; i<K; i++)bad[P[i]]=1;
long long tmp = X;
for(int i=0; i<N; i++){
if(bad[i] || (i + 1 < N && bad[i+1]) || tmp == 0){
Set(i, 0);
}else{
int bit = tmp % 2;
Set(i, 1);
Set(i+1, bit);
i++;
tmp /= 2;
}
}
}
#include "Brunolib.h"
#include "bits/stdc++.h"
long long Bruno( int N, int A[] ){
std::vector<int>bits;
for(int i=0; i<N; i++){
if(A[i] == 0)continue;
else{
bits.emplace_back(A[i+1]);
i++;
}
}
long long answer = 0LL;
while(!bits.empty()){
answer *= 2LL;
answer += bits.back();
bits.pop_back();
}
return answer;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
800 KB |
Wrong Answer [1] |
2 |
Incorrect |
0 ms |
800 KB |
Wrong Answer [1] |
3 |
Incorrect |
1 ms |
808 KB |
Wrong Answer [1] |
4 |
Incorrect |
0 ms |
800 KB |
Wrong Answer [1] |
5 |
Incorrect |
0 ms |
812 KB |
Wrong Answer [1] |
6 |
Incorrect |
1 ms |
812 KB |
Wrong Answer [1] |
7 |
Incorrect |
0 ms |
808 KB |
Wrong Answer [1] |
8 |
Incorrect |
1 ms |
800 KB |
Wrong Answer [1] |
9 |
Incorrect |
0 ms |
812 KB |
Wrong Answer [1] |
10 |
Incorrect |
1 ms |
808 KB |
Wrong Answer [1] |
11 |
Incorrect |
0 ms |
792 KB |
Wrong Answer [1] |
12 |
Incorrect |
1 ms |
812 KB |
Wrong Answer [1] |
13 |
Incorrect |
0 ms |
800 KB |
Wrong Answer [1] |
14 |
Incorrect |
1 ms |
812 KB |
Wrong Answer [1] |
15 |
Incorrect |
1 ms |
800 KB |
Wrong Answer [1] |
16 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |
17 |
Incorrect |
0 ms |
808 KB |
Wrong Answer [1] |
18 |
Incorrect |
1 ms |
804 KB |
Wrong Answer [1] |
19 |
Incorrect |
0 ms |
916 KB |
Wrong Answer [1] |
20 |
Incorrect |
1 ms |
800 KB |
Wrong Answer [1] |
21 |
Incorrect |
1 ms |
808 KB |
Wrong Answer [1] |
22 |
Incorrect |
0 ms |
908 KB |
Wrong Answer [1] |
23 |
Incorrect |
1 ms |
1056 KB |
Wrong Answer [1] |
24 |
Incorrect |
1 ms |
812 KB |
Wrong Answer [1] |
25 |
Incorrect |
1 ms |
800 KB |
Wrong Answer [1] |
26 |
Incorrect |
1 ms |
800 KB |
Wrong Answer [1] |
27 |
Incorrect |
0 ms |
812 KB |
Wrong Answer [1] |
28 |
Incorrect |
1 ms |
804 KB |
Wrong Answer [1] |
29 |
Incorrect |
1 ms |
800 KB |
Wrong Answer [1] |
30 |
Incorrect |
0 ms |
808 KB |
Wrong Answer [1] |
31 |
Incorrect |
0 ms |
800 KB |
Wrong Answer [1] |
32 |
Incorrect |
1 ms |
812 KB |
Wrong Answer [1] |
33 |
Incorrect |
1 ms |
800 KB |
Wrong Answer [1] |
34 |
Incorrect |
0 ms |
812 KB |
Wrong Answer [1] |
35 |
Incorrect |
0 ms |
860 KB |
Wrong Answer [1] |
36 |
Incorrect |
1 ms |
808 KB |
Wrong Answer [1] |
37 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |
38 |
Incorrect |
0 ms |
800 KB |
Wrong Answer [1] |
39 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |
40 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |