This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 = 2 + 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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |