#include <bits/stdc++.h>
using namespace std;
#ifdef tabr
#include "library/debug.cpp"
#else
#define debug(...)
#endif
int pos;
int rot;
int state;
void init(int) {
state = -1;
}
void new_figure(int type) {
if (type == 1) {
pos = 0;
rot = 0;
} else if (type == 2) {
if (state == -1) {
pos = 0;
rot = 0;
state = 2;
} else if (state < 2) {
pos = 1 ^ state;
rot = 0;
state += 2;
} else if (state < 4) {
pos = state % 3;
rot = 1;
state = 7 - state;
} else {
pos = 5 - state;
rot = 0;
state = -1;
}
} else {
if (state == -1) {
pos = 0;
rot = 0;
state = 0;
} else if (state < 2) {
pos = 1 ^ state;
rot = 2 + state;
state = -1;
} else if (state < 4) {
pos = 1 ^ (state % 2);
rot = state;
state ^= 1;
} else {
pos = 5 - state;
rot = 5 - state;
state ^= 1;
}
}
}
int get_position() {
return pos;
}
int get_rotation() {
return rot;
}
#ifdef tabr
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
return 0;
}
#endif
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Win! |
2 |
Correct |
0 ms |
204 KB |
Win! |
3 |
Correct |
0 ms |
204 KB |
Win! |
4 |
Correct |
0 ms |
204 KB |
Win! |
5 |
Correct |
1 ms |
204 KB |
Win! |
6 |
Correct |
1 ms |
204 KB |
Win! |
7 |
Correct |
1 ms |
204 KB |
Win! |
8 |
Correct |
2 ms |
204 KB |
Win! |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Win! |
2 |
Correct |
0 ms |
204 KB |
Win! |
3 |
Correct |
1 ms |
204 KB |
Win! |
4 |
Correct |
0 ms |
204 KB |
Win! |
5 |
Correct |
1 ms |
204 KB |
Win! |
6 |
Correct |
1 ms |
204 KB |
Win! |
7 |
Correct |
1 ms |
204 KB |
Win! |
8 |
Correct |
2 ms |
204 KB |
Win! |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Win! |
2 |
Correct |
0 ms |
204 KB |
Win! |
3 |
Correct |
0 ms |
204 KB |
Win! |
4 |
Correct |
0 ms |
204 KB |
Win! |
5 |
Correct |
1 ms |
204 KB |
Win! |
6 |
Correct |
1 ms |
204 KB |
Win! |
7 |
Correct |
1 ms |
204 KB |
Win! |
8 |
Correct |
2 ms |
204 KB |
Win! |
9 |
Correct |
0 ms |
204 KB |
Win! |
10 |
Correct |
0 ms |
204 KB |
Win! |
11 |
Correct |
1 ms |
204 KB |
Win! |
12 |
Correct |
0 ms |
204 KB |
Win! |
13 |
Correct |
1 ms |
204 KB |
Win! |
14 |
Correct |
1 ms |
204 KB |
Win! |
15 |
Correct |
1 ms |
204 KB |
Win! |
16 |
Correct |
2 ms |
204 KB |
Win! |
17 |
Correct |
0 ms |
204 KB |
Win! |
18 |
Correct |
0 ms |
204 KB |
Win! |
19 |
Correct |
0 ms |
204 KB |
Win! |
20 |
Correct |
0 ms |
204 KB |
Win! |
21 |
Correct |
1 ms |
204 KB |
Win! |
22 |
Correct |
1 ms |
204 KB |
Win! |
23 |
Correct |
1 ms |
204 KB |
Win! |
24 |
Correct |
2 ms |
204 KB |
Win! |
25 |
Correct |
2 ms |
204 KB |
Win! |
26 |
Correct |
2 ms |
204 KB |
Win! |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Win! |
2 |
Correct |
0 ms |
204 KB |
Win! |
3 |
Correct |
1 ms |
204 KB |
Win! |
4 |
Correct |
1 ms |
204 KB |
Win! |
5 |
Correct |
1 ms |
204 KB |
Win! |
6 |
Correct |
1 ms |
204 KB |
Win! |
7 |
Correct |
1 ms |
204 KB |
Win! |
8 |
Correct |
2 ms |
204 KB |
Win! |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Win! |
2 |
Correct |
0 ms |
204 KB |
Win! |
3 |
Correct |
0 ms |
204 KB |
Win! |
4 |
Correct |
0 ms |
204 KB |
Win! |
5 |
Correct |
1 ms |
204 KB |
Win! |
6 |
Correct |
1 ms |
204 KB |
Win! |
7 |
Correct |
1 ms |
204 KB |
Win! |
8 |
Correct |
2 ms |
204 KB |
Win! |
9 |
Correct |
0 ms |
204 KB |
Win! |
10 |
Correct |
0 ms |
204 KB |
Win! |
11 |
Correct |
1 ms |
204 KB |
Win! |
12 |
Correct |
0 ms |
204 KB |
Win! |
13 |
Correct |
1 ms |
204 KB |
Win! |
14 |
Correct |
1 ms |
204 KB |
Win! |
15 |
Correct |
1 ms |
204 KB |
Win! |
16 |
Correct |
2 ms |
204 KB |
Win! |
17 |
Correct |
0 ms |
204 KB |
Win! |
18 |
Correct |
0 ms |
204 KB |
Win! |
19 |
Correct |
0 ms |
204 KB |
Win! |
20 |
Correct |
0 ms |
204 KB |
Win! |
21 |
Correct |
1 ms |
204 KB |
Win! |
22 |
Correct |
1 ms |
204 KB |
Win! |
23 |
Correct |
1 ms |
204 KB |
Win! |
24 |
Correct |
2 ms |
204 KB |
Win! |
25 |
Correct |
2 ms |
204 KB |
Win! |
26 |
Correct |
2 ms |
204 KB |
Win! |
27 |
Correct |
0 ms |
204 KB |
Win! |
28 |
Correct |
0 ms |
204 KB |
Win! |
29 |
Correct |
1 ms |
204 KB |
Win! |
30 |
Correct |
1 ms |
204 KB |
Win! |
31 |
Correct |
1 ms |
204 KB |
Win! |
32 |
Correct |
1 ms |
204 KB |
Win! |
33 |
Correct |
1 ms |
204 KB |
Win! |
34 |
Correct |
2 ms |
204 KB |
Win! |
35 |
Correct |
0 ms |
204 KB |
Win! |
36 |
Correct |
0 ms |
204 KB |
Win! |
37 |
Correct |
0 ms |
204 KB |
Win! |
38 |
Correct |
1 ms |
204 KB |
Win! |
39 |
Correct |
1 ms |
292 KB |
Win! |
40 |
Correct |
1 ms |
292 KB |
Win! |
41 |
Correct |
1 ms |
204 KB |
Win! |
42 |
Correct |
2 ms |
204 KB |
Win! |
43 |
Correct |
2 ms |
292 KB |
Win! |
44 |
Correct |
2 ms |
204 KB |
Win! |
45 |
Correct |
2 ms |
204 KB |
Win! |