#include <bits/stdc++.h>
#include "Annalib.h"
using namespace std;
int a[155]={118, 71, 75, 109, 56, 22, 70, 112, 98, 47, 19, 94, 33, 132, 102, 72, 134, 37, 101, 50, 104, 46, 107, 66, 96, 14, 57, 100, 129, 73, 64, 28, 111, 27, 138, 126, 55, 35, 54, 139, 6, 40, 83, 42, 4, 116, 144, 140, 108, 3, 106, 39, 131, 9, 10, 69, 11, 68, 44, 38, 81, 148, 36, 26, 43, 86, 149, 8, 78, 80, 82, 113, 13, 5, 84, 130, 115, 76, 16, 124, 137, 122, 79, 67, 65, 20, 60, 59, 17, 34, 49, 87, 25, 119, 51, 105, 135, 89, 146, 125, 61, 74, 121, 62, 91, 2, 58, 120, 32, 85, 143, 127, 63, 133, 88, 24, 1, 30, 141, 147, 93, 103, 53, 95, 136, 12, 77, 123, 52, 0, 117, 48, 21, 7, 90, 145, 18, 29, 99, 23, 15, 41, 142, 114, 92, 110, 97, 31, 45, 128};
bool b[155];
void Anna( int N, long long x, int K, int P[]){
int i;
for(i=0;i<K;i++){
b[P[i]]=true;}
for(i=0;i<N;i+=2){
if(b[a[i]] || b[a[i+1]]) {Set(a[i],0); Set(a[i+1],0); continue;}
if(x%3==0) {Set(a[i],0); Set(a[i+1],1);}
if(x%3==1) {Set(a[i],1); Set(a[i+1],0);}
if(x%3==2) {Set(a[i],1); Set(a[i+1],1);}
x/=3;
}
}
#include <bits/stdc++.h>
#include "Brunolib.h"
using namespace std;
int a[155]={118, 71, 75, 109, 56, 22, 70, 112, 98, 47, 19, 94, 33, 132, 102, 72, 134, 37, 101, 50, 104, 46, 107, 66, 96, 14, 57, 100, 129, 73, 64, 28, 111, 27, 138, 126, 55, 35, 54, 139, 6, 40, 83, 42, 4, 116, 144, 140, 108, 3, 106, 39, 131, 9, 10, 69, 11, 68, 44, 38, 81, 148, 36, 26, 43, 86, 149, 8, 78, 80, 82, 113, 13, 5, 84, 130, 115, 76, 16, 124, 137, 122, 79, 67, 65, 20, 60, 59, 17, 34, 49, 87, 25, 119, 51, 105, 135, 89, 146, 125, 61, 74, 121, 62, 91, 2, 58, 120, 32, 85, 143, 127, 63, 133, 88, 24, 1, 30, 141, 147, 93, 103, 53, 95, 136, 12, 77, 123, 52, 0, 117, 48, 21, 7, 90, 145, 18, 29, 99, 23, 15, 41, 142, 114, 92, 110, 97, 31, 45, 128};
long long Bruno( int N, int A[]){
int i;
long long ans,st;
ans=0;
st=1;
for(i=0;i<N;i+=2){
if(A[a[i]]==0 && A[a[i+1]]==0) continue;
if(A[a[i]]==1 && A[a[i+1]]==0) ans+=st;
if(A[a[i]]==1 && A[a[i+1]]==1) ans+=2*st;
st*=3;
}
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
2 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
3 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
4 |
Incorrect |
33 ms |
3056 KB |
Output isn't correct - L* = 0 |
5 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
6 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
7 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
8 |
Incorrect |
33 ms |
3056 KB |
Output isn't correct - L* = 0 |
9 |
Incorrect |
33 ms |
3208 KB |
Output isn't correct - L* = 0 |
10 |
Incorrect |
33 ms |
3056 KB |
Output isn't correct - L* = 0 |
11 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
12 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
13 |
Incorrect |
33 ms |
3056 KB |
Output isn't correct - L* = 0 |
14 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
15 |
Incorrect |
33 ms |
3056 KB |
Output isn't correct - L* = 0 |
16 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
17 |
Incorrect |
33 ms |
3056 KB |
Output isn't correct - L* = 0 |
18 |
Incorrect |
33 ms |
3056 KB |
Output isn't correct - L* = 0 |
19 |
Incorrect |
34 ms |
3064 KB |
Output isn't correct - L* = 0 |
20 |
Incorrect |
35 ms |
3056 KB |
Output isn't correct - L* = 0 |
21 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
22 |
Incorrect |
34 ms |
3064 KB |
Output isn't correct - L* = 0 |
23 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
24 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
25 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
26 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
27 |
Incorrect |
33 ms |
3056 KB |
Output isn't correct - L* = 0 |
28 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
29 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
30 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
31 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
32 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
33 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
34 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
35 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
36 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
37 |
Incorrect |
33 ms |
3056 KB |
Output isn't correct - L* = 0 |
38 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |
39 |
Incorrect |
34 ms |
3064 KB |
Output isn't correct - L* = 0 |
40 |
Incorrect |
34 ms |
3056 KB |
Output isn't correct - L* = 0 |