Submission #568364

#TimeUsernameProblemLanguageResultExecution timeMemory
568364Trisanu_DasMini tetris (IOI16_tetris)C++17
100 / 100
3 ms304 KiB
#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 rot;}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...