#include "Annalib.h"
const int A[8] = {6, 4, 7, 3, 1, 2, 5, 0};
const int B[8] = {3, 2, 1, 0, 1, 0, 0, 0};
const int C[8] = {2, 2, 2, 2, 1, 1, 1, 0};
int chk[155];
void Anna (int N, long long X, int K, int P[]) {
for(int i=0;i<K;i++) {
chk[P[i]] = 1;
}
for(int i=0;i<50;i++) {
int T = chk[3*i] * 1 + chk[3*i+1] * 2 + chk[3*i+2] * 4;
for(int j=0;j<8;j++) {
if((T & A[j]) || X % (1<<C[j]) != B[j]) continue;
for(int k=0;k<3;k++) {
Set(3*i+k, !!(A[j]&(1<<k)));
}
X /= (1<<C[j]);
break;
}
}
}
#include "Brunolib.h"
const int A[8] = {6, 4, 7, 3, 1, 2, 5, 0};
const int B[8] = {3, 2, 1, 0, 1, 0, 0, 0};
const int C[8] = {2, 2, 2, 2, 1, 1, 1, 0};
long long Bruno (int N, int P[]) {
long long ret = 0, bit = 1;
for(int i=0;i<50;i++) {
int T = P[3*i] * 1 + P[3*i+1] * 2 + P[3*i+2] * 4;
for(int j=0;j<8;j++) {
if(T != A[j]) continue;
ret += bit * B[j];
bit *= (1<<C[j]);
break;
}
}
return ret;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
56 ms |
3056 KB |
Output isn't correct - L* = 0 |
2 |
Incorrect |
50 ms |
3336 KB |
Output isn't correct - L* = 0 |
3 |
Incorrect |
48 ms |
3344 KB |
Output isn't correct - L* = 0 |
4 |
Incorrect |
47 ms |
3608 KB |
Output isn't correct - L* = 0 |
5 |
Incorrect |
61 ms |
3608 KB |
Output isn't correct - L* = 0 |
6 |
Incorrect |
54 ms |
3752 KB |
Output isn't correct - L* = 0 |
7 |
Incorrect |
57 ms |
3752 KB |
Output isn't correct - L* = 0 |
8 |
Incorrect |
73 ms |
3752 KB |
Output isn't correct - L* = 0 |
9 |
Incorrect |
51 ms |
3840 KB |
Output isn't correct - L* = 0 |
10 |
Incorrect |
71 ms |
3840 KB |
Output isn't correct - L* = 0 |
11 |
Incorrect |
53 ms |
3840 KB |
Output isn't correct - L* = 0 |
12 |
Incorrect |
56 ms |
3840 KB |
Output isn't correct - L* = 0 |
13 |
Incorrect |
56 ms |
3840 KB |
Output isn't correct - L* = 0 |
14 |
Incorrect |
50 ms |
3840 KB |
Output isn't correct - L* = 0 |
15 |
Incorrect |
66 ms |
3840 KB |
Output isn't correct - L* = 0 |
16 |
Incorrect |
56 ms |
3840 KB |
Output isn't correct - L* = 0 |
17 |
Incorrect |
66 ms |
3840 KB |
Output isn't correct - L* = 0 |
18 |
Incorrect |
52 ms |
3840 KB |
Output isn't correct - L* = 0 |
19 |
Incorrect |
68 ms |
3840 KB |
Output isn't correct - L* = 0 |
20 |
Incorrect |
49 ms |
3840 KB |
Output isn't correct - L* = 0 |
21 |
Incorrect |
61 ms |
3840 KB |
Output isn't correct - L* = 0 |
22 |
Incorrect |
72 ms |
3840 KB |
Output isn't correct - L* = 0 |
23 |
Incorrect |
53 ms |
3840 KB |
Output isn't correct - L* = 0 |
24 |
Incorrect |
74 ms |
3840 KB |
Output isn't correct - L* = 0 |
25 |
Incorrect |
70 ms |
3840 KB |
Output isn't correct - L* = 0 |
26 |
Incorrect |
79 ms |
3840 KB |
Output isn't correct - L* = 0 |
27 |
Incorrect |
57 ms |
3840 KB |
Output isn't correct - L* = 0 |
28 |
Incorrect |
72 ms |
3840 KB |
Output isn't correct - L* = 0 |
29 |
Incorrect |
58 ms |
3840 KB |
Output isn't correct - L* = 0 |
30 |
Incorrect |
52 ms |
3840 KB |
Output isn't correct - L* = 0 |
31 |
Incorrect |
57 ms |
3840 KB |
Output isn't correct - L* = 0 |
32 |
Incorrect |
81 ms |
3840 KB |
Output isn't correct - L* = 0 |
33 |
Incorrect |
71 ms |
3840 KB |
Output isn't correct - L* = 0 |
34 |
Incorrect |
57 ms |
3840 KB |
Output isn't correct - L* = 0 |
35 |
Incorrect |
54 ms |
3840 KB |
Output isn't correct - L* = 0 |
36 |
Incorrect |
47 ms |
3840 KB |
Output isn't correct - L* = 0 |
37 |
Incorrect |
73 ms |
3840 KB |
Output isn't correct - L* = 0 |
38 |
Incorrect |
76 ms |
3840 KB |
Output isn't correct - L* = 0 |
39 |
Incorrect |
60 ms |
3840 KB |
Output isn't correct - L* = 0 |
40 |
Incorrect |
68 ms |
3840 KB |
Output isn't correct - L* = 0 |