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 "tetris.h"
void init(int n) {}
int position, rotation, state;
int nxt_pos[3][6] = {{0, 0, 0, 0, 0, 0}, {1, 0, 0, 2, 0, 1}, {1, 0, 0, 1, 0, 1}};
int nxt_rot[3][6] = {{0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 0, 0}, {1, 3, 3, 2, 0, 1}};
int nxt_state[3][6] = {{0, 1, 2, 3, 4, 5}, {2, 2, 5, 4, 0, 0}, {1, 0, 3, 2, 5, 4}};
void new_figure(int figure_type) {
position = nxt_pos[--figure_type][state];
rotation = nxt_rot[figure_type][state];
state = nxt_state[figure_type][state];
}
int get_position() { return position; }
int get_rotation() { return rotation; }
# | 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... |