#include "Annalib.h"
#include <bits/stdc++.h>
typedef long long LL;
static bool ch[210];
static LL thr[210];
static int len=38;
void Anna(int N, LL X, int K, int P[]){
memset(ch, 0, sizeof ch);
for(int i=0; i<K; i++)ch[P[i]]=true;
for(int i=1; i<=len; i++){
thr[i]=X%3;
X/=3;
}
int re=len;
for(int i=0; i<N; i+=2){
if(ch[i]||ch[i+1])Set(i, 0), Set(i+1, 0);
else{
if(re<0)break;
if(thr[re]==0)Set(i, 0), Set(i+1, 1);
if(thr[re]==1)Set(i, 1), Set(i+1, 0);
if(thr[re]==2)Set(i, 1), Set(i+1, 1);
re--;
}
}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
typedef long long LL;
static bool ch[210];
static LL thr[210];
static int len=38;
LL Bruno(int N, int A[]){
LL ret=0;
int num=0;
for(int i=0; i<N; i+=2){
if(!A[i]&&!A[i+1])continue;
ret*=3;
if(A[i]&&!A[i+1])ret++;
if(A[i]&&A[i+1])ret+=2;
num++;
if(num>len)return ret;
}
}
Compilation message
Bruno.cpp: In function 'LL Bruno(int, int*)':
Bruno.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Bruno.cpp: At global scope:
Bruno.cpp:6:11: warning: 'thr' defined but not used [-Wunused-variable]
static LL thr[210];
^~~
Bruno.cpp:5:13: warning: 'ch' defined but not used [-Wunused-variable]
static bool ch[210];
^~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
1024 KB |
Wrong Answer [4] |
2 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
3 |
Incorrect |
0 ms |
644 KB |
Wrong Answer [4] |
4 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |
5 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
6 |
Incorrect |
0 ms |
1020 KB |
Wrong Answer [4] |
7 |
Incorrect |
1 ms |
1024 KB |
Wrong Answer [4] |
8 |
Incorrect |
0 ms |
1020 KB |
Wrong Answer [4] |
9 |
Incorrect |
0 ms |
900 KB |
Wrong Answer [4] |
10 |
Incorrect |
1 ms |
1024 KB |
Wrong Answer [4] |
11 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |
12 |
Incorrect |
1 ms |
832 KB |
Wrong Answer [4] |
13 |
Incorrect |
0 ms |
900 KB |
Wrong Answer [4] |
14 |
Incorrect |
1 ms |
900 KB |
Wrong Answer [4] |
15 |
Incorrect |
0 ms |
1024 KB |
Wrong Answer [4] |
16 |
Incorrect |
1 ms |
1024 KB |
Wrong Answer [4] |
17 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |
18 |
Incorrect |
0 ms |
1032 KB |
Wrong Answer [4] |
19 |
Incorrect |
0 ms |
1024 KB |
Wrong Answer [4] |
20 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
21 |
Incorrect |
1 ms |
1024 KB |
Wrong Answer [4] |
22 |
Incorrect |
1 ms |
900 KB |
Wrong Answer [4] |
23 |
Incorrect |
0 ms |
644 KB |
Wrong Answer [4] |
24 |
Incorrect |
1 ms |
772 KB |
Wrong Answer [4] |
25 |
Incorrect |
0 ms |
912 KB |
Wrong Answer [4] |
26 |
Incorrect |
1 ms |
776 KB |
Wrong Answer [4] |
27 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
28 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
29 |
Incorrect |
0 ms |
900 KB |
Wrong Answer [4] |
30 |
Incorrect |
0 ms |
900 KB |
Wrong Answer [4] |
31 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
32 |
Incorrect |
0 ms |
900 KB |
Wrong Answer [4] |
33 |
Incorrect |
1 ms |
1024 KB |
Wrong Answer [4] |
34 |
Incorrect |
1 ms |
804 KB |
Wrong Answer [4] |
35 |
Incorrect |
0 ms |
1024 KB |
Wrong Answer [4] |
36 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
37 |
Incorrect |
0 ms |
1024 KB |
Wrong Answer [4] |
38 |
Incorrect |
0 ms |
772 KB |
Wrong Answer [4] |
39 |
Incorrect |
1 ms |
1152 KB |
Wrong Answer [4] |
40 |
Incorrect |
0 ms |
900 KB |
Wrong Answer [4] |