| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1358293 | toast12 | Mini tetris (IOI16_tetris) | C++20 | 1 ms | 344 KiB |
#include "tetris.h"
#include <bits/stdc++.h>
using namespace std;
struct state {
int pos, rot, nxt;
};
vector<state> t2, t3;
int cur = 0;
void init(int n) {
t2.resize(6);
t2 = {{0, 0, 3},
{1, 0, 3},
{0, 1, 4},
{2, 1, 5},
{1, 0, 0},
{0, 0, 0}};
t3 = {{0, 0, 1},
{1, 2, 0},
{0, 3, 3},
{1, 2, 2},
{1, 1, 5},
{0, 0, 4}};
}
int type;
int p;
void new_figure(int figure_type) {
type = figure_type;
p = cur;
if (type == 2) cur = t2[cur].nxt;
else cur = t3[cur].nxt;
}
int get_position() {
if (type == 2) return t2[p].pos;
return t3[p].pos;
}
int get_rotation() {
if (type == 2) return t2[p].rot;
return t3[p].rot;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
