#include "Anna.h"
#include <utility>
#include <vector>
using namespace std;
namespace {
}
int Declare() {
return 180;
}
std::pair<std::vector<int>, std::vector<int> > Anna(long long A) {
vector<int> X;
vector<int> Y;
for(int i=0;i<60;i++){
for(int k=0;k<3;k++){
if((A>>i)&1) X.push_back(1);
else X.push_back(0);
}
}
for(int i=1;i<=180;i++){
if(i&1) Y.push_back(1);
else Y.push_back(0);
}
return make_pair(X, Y);
}
#include "Bruno.h"
#include <utility>
#include <vector>
#include<iostream>
using namespace std;
long long Bruno(std::vector<int> u) {
int a = 0;
vector<int> ans;
ans.push_back(0);
long long A = 0;
long long p = 1;
for(auto i : u){
if(i==0) a--;
else a++;
if(a==3){//mod 3 ==0
A+=p;
p<<=1;
a-=3;
}
if(a==-2){//mod 3 == 1
p<<=1;
a+=3;
}
}
return A;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
788 KB |
Output is correct |
2 |
Correct |
63 ms |
3468 KB |
Output is correct |
3 |
Correct |
63 ms |
3596 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
788 KB |
Output is correct |
2 |
Correct |
63 ms |
3468 KB |
Output is correct |
3 |
Correct |
63 ms |
3596 KB |
Output is correct |
4 |
Correct |
65 ms |
3720 KB |
Output is correct |
5 |
Correct |
66 ms |
3540 KB |
Output is correct |
6 |
Correct |
65 ms |
3476 KB |
Output is correct |
7 |
Correct |
65 ms |
3648 KB |
Output is correct |
8 |
Correct |
65 ms |
3712 KB |
Output is correct |
9 |
Correct |
63 ms |
3572 KB |
Output is correct |
10 |
Correct |
60 ms |
3568 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
788 KB |
Output is correct |
2 |
Correct |
63 ms |
3468 KB |
Output is correct |
3 |
Correct |
63 ms |
3596 KB |
Output is correct |
4 |
Correct |
65 ms |
3720 KB |
Output is correct |
5 |
Correct |
66 ms |
3540 KB |
Output is correct |
6 |
Correct |
65 ms |
3476 KB |
Output is correct |
7 |
Correct |
65 ms |
3648 KB |
Output is correct |
8 |
Correct |
65 ms |
3712 KB |
Output is correct |
9 |
Correct |
63 ms |
3572 KB |
Output is correct |
10 |
Correct |
60 ms |
3568 KB |
Output is correct |
11 |
Correct |
65 ms |
3564 KB |
Output is correct |
12 |
Correct |
69 ms |
3584 KB |
Output is correct |
13 |
Correct |
65 ms |
3568 KB |
Output is correct |
14 |
Correct |
70 ms |
3836 KB |
Output is correct |
15 |
Correct |
65 ms |
3548 KB |
Output is correct |
16 |
Correct |
63 ms |
3692 KB |
Output is correct |
17 |
Correct |
61 ms |
3468 KB |
Output is correct |
18 |
Correct |
65 ms |
3580 KB |
Output is correct |
19 |
Correct |
66 ms |
3728 KB |
Output is correct |
20 |
Correct |
66 ms |
3464 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
788 KB |
Output is correct |
2 |
Correct |
63 ms |
3468 KB |
Output is correct |
3 |
Correct |
63 ms |
3596 KB |
Output is correct |
4 |
Correct |
65 ms |
3720 KB |
Output is correct |
5 |
Correct |
66 ms |
3540 KB |
Output is correct |
6 |
Correct |
65 ms |
3476 KB |
Output is correct |
7 |
Correct |
65 ms |
3648 KB |
Output is correct |
8 |
Correct |
65 ms |
3712 KB |
Output is correct |
9 |
Correct |
63 ms |
3572 KB |
Output is correct |
10 |
Correct |
60 ms |
3568 KB |
Output is correct |
11 |
Correct |
65 ms |
3564 KB |
Output is correct |
12 |
Correct |
69 ms |
3584 KB |
Output is correct |
13 |
Correct |
65 ms |
3568 KB |
Output is correct |
14 |
Correct |
70 ms |
3836 KB |
Output is correct |
15 |
Correct |
65 ms |
3548 KB |
Output is correct |
16 |
Correct |
63 ms |
3692 KB |
Output is correct |
17 |
Correct |
61 ms |
3468 KB |
Output is correct |
18 |
Correct |
65 ms |
3580 KB |
Output is correct |
19 |
Correct |
66 ms |
3728 KB |
Output is correct |
20 |
Correct |
66 ms |
3464 KB |
Output is correct |
21 |
Correct |
69 ms |
3544 KB |
Output is correct |
22 |
Correct |
66 ms |
3624 KB |
Output is correct |
23 |
Correct |
64 ms |
3548 KB |
Output is correct |
24 |
Correct |
72 ms |
3604 KB |
Output is correct |
25 |
Correct |
68 ms |
3476 KB |
Output is correct |
26 |
Correct |
63 ms |
3600 KB |
Output is correct |
27 |
Correct |
64 ms |
3572 KB |
Output is correct |
28 |
Correct |
70 ms |
4032 KB |
Output is correct |
29 |
Correct |
65 ms |
3476 KB |
Output is correct |
30 |
Correct |
66 ms |
3480 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
788 KB |
Output is correct |
2 |
Correct |
63 ms |
3468 KB |
Output is correct |
3 |
Correct |
63 ms |
3596 KB |
Output is correct |
4 |
Correct |
65 ms |
3720 KB |
Output is correct |
5 |
Correct |
66 ms |
3540 KB |
Output is correct |
6 |
Correct |
65 ms |
3476 KB |
Output is correct |
7 |
Correct |
65 ms |
3648 KB |
Output is correct |
8 |
Correct |
65 ms |
3712 KB |
Output is correct |
9 |
Correct |
63 ms |
3572 KB |
Output is correct |
10 |
Correct |
60 ms |
3568 KB |
Output is correct |
11 |
Correct |
65 ms |
3564 KB |
Output is correct |
12 |
Correct |
69 ms |
3584 KB |
Output is correct |
13 |
Correct |
65 ms |
3568 KB |
Output is correct |
14 |
Correct |
70 ms |
3836 KB |
Output is correct |
15 |
Correct |
65 ms |
3548 KB |
Output is correct |
16 |
Correct |
63 ms |
3692 KB |
Output is correct |
17 |
Correct |
61 ms |
3468 KB |
Output is correct |
18 |
Correct |
65 ms |
3580 KB |
Output is correct |
19 |
Correct |
66 ms |
3728 KB |
Output is correct |
20 |
Correct |
66 ms |
3464 KB |
Output is correct |
21 |
Correct |
69 ms |
3544 KB |
Output is correct |
22 |
Correct |
66 ms |
3624 KB |
Output is correct |
23 |
Correct |
64 ms |
3548 KB |
Output is correct |
24 |
Correct |
72 ms |
3604 KB |
Output is correct |
25 |
Correct |
68 ms |
3476 KB |
Output is correct |
26 |
Correct |
63 ms |
3600 KB |
Output is correct |
27 |
Correct |
64 ms |
3572 KB |
Output is correct |
28 |
Correct |
70 ms |
4032 KB |
Output is correct |
29 |
Correct |
65 ms |
3476 KB |
Output is correct |
30 |
Correct |
66 ms |
3480 KB |
Output is correct |
31 |
Correct |
65 ms |
3492 KB |
Output is correct |
32 |
Correct |
66 ms |
3568 KB |
Output is correct |
33 |
Correct |
69 ms |
3880 KB |
Output is correct |
34 |
Correct |
66 ms |
3640 KB |
Output is correct |
35 |
Correct |
65 ms |
3476 KB |
Output is correct |
36 |
Correct |
66 ms |
3572 KB |
Output is correct |
37 |
Correct |
61 ms |
3616 KB |
Output is correct |
38 |
Correct |
71 ms |
3480 KB |
Output is correct |
39 |
Correct |
65 ms |
3552 KB |
Output is correct |
40 |
Correct |
66 ms |
3476 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
68 ms |
3484 KB |
Output is partially correct |
2 |
Partially correct |
67 ms |
3604 KB |
Output is partially correct |
3 |
Partially correct |
67 ms |
3664 KB |
Output is partially correct |
4 |
Partially correct |
74 ms |
3540 KB |
Output is partially correct |
5 |
Partially correct |
69 ms |
3492 KB |
Output is partially correct |
6 |
Partially correct |
67 ms |
3660 KB |
Output is partially correct |
7 |
Partially correct |
66 ms |
3548 KB |
Output is partially correct |
8 |
Partially correct |
69 ms |
3780 KB |
Output is partially correct |
9 |
Partially correct |
67 ms |
3636 KB |
Output is partially correct |
10 |
Partially correct |
68 ms |
3840 KB |
Output is partially correct |
11 |
Partially correct |
66 ms |
3560 KB |
Output is partially correct |
12 |
Partially correct |
73 ms |
3480 KB |
Output is partially correct |
13 |
Partially correct |
64 ms |
3548 KB |
Output is partially correct |
14 |
Partially correct |
63 ms |
3732 KB |
Output is partially correct |
15 |
Partially correct |
75 ms |
3576 KB |
Output is partially correct |
16 |
Partially correct |
65 ms |
3724 KB |
Output is partially correct |
17 |
Partially correct |
66 ms |
3664 KB |
Output is partially correct |
18 |
Partially correct |
72 ms |
3692 KB |
Output is partially correct |
19 |
Partially correct |
64 ms |
3552 KB |
Output is partially correct |
20 |
Partially correct |
66 ms |
3580 KB |
Output is partially correct |