#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const ll K = 626237348924392349LL;
static int radi[1005];
void Anna(int _n, long long X, int _k, int P[] ){
int n = _n;
int k = _k;
for(int i=0; i<n; i++) radi[i] = 1;
for(int i=0; i<k; i++) radi[P[i]] = 0;
if(k > 38){
for(int i=0; i<n; i++) Set(i, 1);
return;
}
X ^= K;
int j = 0;
for(int i=0; i<38; i++){
int treba = X%3;
X /= 3;
treba++;
for(;;){
if(treba/2 <= radi[j] && treba%2 <= radi[j+1]){
Set(j, treba/2);
Set(j+1, treba%2);
j += 2;
break;
}
Set(j, 0);
Set(j+1, 0);
j += 2;
}
}
while(j < n){
Set(j, 0);
j++;
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const ll K = 626237348924392349LL;
long long Bruno( int N, int A[] ){
int j = 0;
ll p3 = 1;
ll res = 0;
for(int i=0; i<38; i++){
int tr;
for(;;){
tr = 2*A[j] + A[j+1];
j += 2;
if(tr) break;
}
res += (tr-1)*p3;
p3 *= 3;
}
return res ^ K;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
488 KB |
Wrong Answer [1] |
2 |
Incorrect |
2 ms |
500 KB |
Wrong Answer [1] |
3 |
Incorrect |
1 ms |
620 KB |
Wrong Answer [1] |
4 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
5 |
Incorrect |
1 ms |
848 KB |
Wrong Answer [1] |
6 |
Incorrect |
1 ms |
492 KB |
Wrong Answer [1] |
7 |
Incorrect |
1 ms |
484 KB |
Wrong Answer [1] |
8 |
Incorrect |
2 ms |
484 KB |
Wrong Answer [1] |
9 |
Incorrect |
3 ms |
872 KB |
Wrong Answer [1] |
10 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
11 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
12 |
Incorrect |
2 ms |
616 KB |
Wrong Answer [1] |
13 |
Incorrect |
1 ms |
484 KB |
Wrong Answer [1] |
14 |
Incorrect |
1 ms |
496 KB |
Wrong Answer [1] |
15 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
16 |
Incorrect |
0 ms |
484 KB |
Wrong Answer [1] |
17 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
18 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
19 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
20 |
Incorrect |
1 ms |
496 KB |
Wrong Answer [1] |
21 |
Incorrect |
1 ms |
488 KB |
Wrong Answer [1] |
22 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
23 |
Incorrect |
0 ms |
488 KB |
Wrong Answer [1] |
24 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
25 |
Incorrect |
1 ms |
628 KB |
Wrong Answer [1] |
26 |
Incorrect |
1 ms |
488 KB |
Wrong Answer [1] |
27 |
Incorrect |
1 ms |
624 KB |
Wrong Answer [1] |
28 |
Incorrect |
2 ms |
840 KB |
Wrong Answer [1] |
29 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
30 |
Incorrect |
1 ms |
488 KB |
Wrong Answer [1] |
31 |
Incorrect |
1 ms |
624 KB |
Wrong Answer [1] |
32 |
Incorrect |
1 ms |
488 KB |
Wrong Answer [1] |
33 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
34 |
Incorrect |
1 ms |
492 KB |
Wrong Answer [1] |
35 |
Incorrect |
2 ms |
616 KB |
Wrong Answer [1] |
36 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
37 |
Incorrect |
1 ms |
620 KB |
Wrong Answer [1] |
38 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |
39 |
Incorrect |
1 ms |
628 KB |
Wrong Answer [1] |
40 |
Incorrect |
1 ms |
616 KB |
Wrong Answer [1] |