| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1187608 | weakweakweak | Mini tetris (IOI16_tetris) | C++20 | 1 ms | 328 KiB |
#include "tetris.h"
#include <iostream>
void init(int n) {
}
int position;
int rotation;
int type = 0; // 0 是空白,1 是 只有一個在邊邊, 2 是兩個在邊邊,3 是小階梯
int left = 0;
void new_figure(int figure_type) {
if (figure_type == 1) {
position = 0, rotation = 0;
return;
}
if (figure_type == 2) {
if (type == 0) {
position = 0;
rotation = 0;
type = 2, left = 1;
}
else if (type == 1) {
if (left) {
position = 1, rotation = 0;
type = 0;
}
else{
position = 0, rotation = 0;
type = 0;
}
}
else if (type == 2) {
if (left) {
position = 2, rotation = 1;
type = 1, left = 0;
}
else {
position = 0, rotation = 1;
type = 1, left = 1;
}
}
else {
if (left) {
position = 1, rotation = 0;
type = 2, left = 1;
}
else {
position = 0, rotation = 0;
type = 2, left = 0;
}
}
}
else {
if (type == 0) {
position = 0;
rotation = 0;
type = 3, left = 1;
}
else if (type == 1) {
if (left) {
position = 1, rotation = 1;
type = 1, left = 0;
}
else{
position = 0, rotation = 0;
type = 1, left = 1;
}
}
else if (type == 2) {
if (left) {
position = 1, rotation = 3;
type = 2, left = 0;
}
else {
position = 0, rotation = 1;
type = 2, left = 1;
}
}
else {
if (left) {
position = 1, rotation = 2;
type = 0;
}
else {
position = 0, rotation = 1;
type = 0;
}
}
}
}
int get_position() {
return position;
}
int get_rotation() {
return rotation;
}
컴파일 시 표준 에러 (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... | ||||
