| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1307691 | ballbreaker | Mini tetris (IOI16_tetris) | C++20 | 2 ms | 348 KiB |
#include "tetris.h"
#include<bits/stdc++.h>
using namespace std;
void init(int n) {
}
int position;
int rotation;
int cur = 0;
void new_figure(int figure_type) {
if (figure_type == 1) {
rotation = 0;
position = 0;
} else if (figure_type == 2) {
if (cur == 0) {
cur = 2;
position = 0;
rotation = 0;
} else if (cur == 1) {
cur = 2;
position = 1;
rotation = 0;
} else if (cur == 2) {
cur = 5;
position = 2;
rotation = 1;
} else if (cur == 3) {
cur = 4;
position = 0;
rotation = 1;
} else if (cur == 4) {
cur = 0;
position = 1;
rotation = 0;
} else if (cur == 5) {
cur = 0;
position = 0;
rotation = 0;
}
// cout << cur << endl;
} else {
if (cur == 0) {
cur = 1;
position = 0;
rotation = 0;
} else if (cur == 1) {
cur = 0;
position = 1;
rotation = 2;
} else if (cur == 2) {
cur = 3;
position = 1;
rotation = 2;
} else if (cur == 3) {
cur = 2;
position = 0;
rotation = 1;
} else if (cur == 4) {
cur = 5;
position = 1;
rotation = 1;
} else if (cur == 5) {
cur = 4;
position = 0;
rotation = 0;
}
}
// cout << cur << endl;
}
int get_position() {
return position;
}
int get_rotation() {
return rotation;
}
Compilation message (stderr)
| # | 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... | ||||
