#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] || 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 |
1 ms |
784 KB |
Wrong Answer [1] |
2 |
Incorrect |
0 ms |
780 KB |
Wrong Answer [1] |
3 |
Incorrect |
1 ms |
780 KB |
Wrong Answer [1] |
4 |
Incorrect |
1 ms |
784 KB |
Wrong Answer [1] |
5 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |
6 |
Incorrect |
0 ms |
792 KB |
Wrong Answer [1] |
7 |
Incorrect |
1 ms |
780 KB |
Wrong Answer [1] |
8 |
Incorrect |
1 ms |
792 KB |
Wrong Answer [1] |
9 |
Incorrect |
0 ms |
784 KB |
Wrong Answer [1] |
10 |
Incorrect |
0 ms |
796 KB |
Wrong Answer [1] |
11 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |
12 |
Incorrect |
0 ms |
796 KB |
Wrong Answer [1] |
13 |
Incorrect |
0 ms |
796 KB |
Wrong Answer [1] |
14 |
Incorrect |
0 ms |
796 KB |
Wrong Answer [1] |
15 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |
16 |
Incorrect |
1 ms |
1036 KB |
Wrong Answer [1] |
17 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |
18 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |
19 |
Incorrect |
1 ms |
776 KB |
Wrong Answer [1] |
20 |
Incorrect |
0 ms |
784 KB |
Wrong Answer [1] |
21 |
Incorrect |
1 ms |
784 KB |
Wrong Answer [1] |
22 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |
23 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |
24 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [1] |
25 |
Incorrect |
0 ms |
796 KB |
Wrong Answer [1] |
26 |
Incorrect |
1 ms |
784 KB |
Wrong Answer [1] |
27 |
Incorrect |
1 ms |
784 KB |
Wrong Answer [1] |
28 |
Incorrect |
1 ms |
780 KB |
Wrong Answer [1] |
29 |
Incorrect |
0 ms |
780 KB |
Wrong Answer [1] |
30 |
Incorrect |
1 ms |
784 KB |
Wrong Answer [1] |
31 |
Incorrect |
0 ms |
784 KB |
Wrong Answer [1] |
32 |
Incorrect |
0 ms |
796 KB |
Wrong Answer [1] |
33 |
Incorrect |
0 ms |
792 KB |
Wrong Answer [1] |
34 |
Incorrect |
0 ms |
796 KB |
Wrong Answer [1] |
35 |
Incorrect |
0 ms |
796 KB |
Wrong Answer [1] |
36 |
Incorrect |
1 ms |
784 KB |
Wrong Answer [1] |
37 |
Incorrect |
0 ms |
784 KB |
Wrong Answer [1] |
38 |
Incorrect |
0 ms |
796 KB |
Wrong Answer [1] |
39 |
Incorrect |
0 ms |
800 KB |
Wrong Answer [1] |
40 |
Incorrect |
0 ms |
792 KB |
Wrong Answer [1] |