Submission #522076

#TimeUsernameProblemLanguageResultExecution timeMemory
522076tabrMini tetris (IOI16_tetris)C++17
46 / 100
2 ms292 KiB
#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 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...