# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
568361 | Trisanu_Das | Mini tetris (IOI16_tetris) | C++17 | 0 ms | 0 KiB |
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"
#include <bits/stdc++.h>
using namespace std;
void init(int n){}
int st = 0, pos, rot;
int r1[6] = {0, 1, 1, 0, 0, 0}, p1[6] = {0, 2, 0, 0, 1, 1}, n1[6] = {1, 3, 4, 0, 0, 1};
int r2[6] = {0, 2, 3, 0, 1, 2}, p2[6] = {0, 1, 0, 0, 1, 1}, n2[6] = {5, 2, 1, 4, 3, 0};
void new_figure(int type){
if(type == 1){pos = 0; rot = 0;}
if(type == 2){
rot = r1[st];
pos = p1[st];
st = n1[st];
}
if(type == 3){
rot = r2[st];
pos = p2[st];
st = n2[st];
}
}
int get_position() return pos;
int get_rotation() return rotation;