답안 #334129

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
334129 2020-12-08T11:48:27 Z Matteo_Verz Mini tetris (IOI16_tetris) C++11
46 / 100
4 ms 384 KB
#include "tetris.h"
#include <bits/stdc++.h>

using namespace std;

string conf;
void init(int n) {
  conf = "000";
}

int position;
int rotation;

void new_figure(int figure_type) {
  if(figure_type == 1) {
    position = 0;
    rotation = 0;
  } else if(figure_type == 3) {
    if(conf == "000") {
      conf = "210";
      position = 0;
      rotation = 0;
    } else if(conf == "210") {
      conf = "000";
      position = 1;
      rotation = 2;
    } else if(conf == "110") {
      conf = "011";
      position = 1;
      rotation = 2;
    } else if(conf == "011") {
      conf = "110";
      position = 0;
      rotation = 3;
    } else if(conf == "100") {
      conf = "001";
      position = 1;
      rotation = 1;
    } else if(conf == "001") {
      conf = "100";
      position = 0;
      rotation = 0;
    }
  } else { // figure_type == 2
    if(conf == "000") {
      conf = "110";
      position = 0;
      rotation = 0;
    } else if(conf == "210") {
      conf = "110";
      position = 1;
      rotation = 0;
    } else if(conf == "110") {
      conf = "001";
      position = 2;
      rotation = 1;
    } else if(conf == "011") {
      conf = "110";
      position = 0;
      rotation = 1;
    } else if(conf == "100") {
      conf = "000";
      position = 1;
      rotation = 0;
    } else if(conf == "001") {
      conf = "000";
      position = 0;
      rotation = 0;
    }
  }
}

int get_position() {
  return position;
}

int get_rotation() {
  return rotation;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Win!
2 Correct 1 ms 364 KB Win!
3 Correct 1 ms 364 KB Win!
4 Correct 1 ms 256 KB Win!
5 Correct 1 ms 364 KB Win!
6 Correct 1 ms 384 KB Win!
7 Correct 2 ms 364 KB Win!
8 Correct 3 ms 364 KB Win!
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Win!
2 Correct 1 ms 364 KB Win!
3 Correct 1 ms 364 KB Win!
4 Correct 1 ms 364 KB Win!
5 Correct 1 ms 364 KB Win!
6 Correct 1 ms 364 KB Win!
7 Correct 2 ms 364 KB Win!
8 Correct 4 ms 384 KB Win!
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Win!
2 Correct 1 ms 364 KB Win!
3 Correct 1 ms 364 KB Win!
4 Correct 1 ms 256 KB Win!
5 Correct 1 ms 364 KB Win!
6 Correct 1 ms 384 KB Win!
7 Correct 2 ms 364 KB Win!
8 Correct 3 ms 364 KB Win!
9 Correct 1 ms 364 KB Win!
10 Correct 1 ms 364 KB Win!
11 Correct 1 ms 364 KB Win!
12 Correct 1 ms 364 KB Win!
13 Correct 1 ms 364 KB Win!
14 Correct 1 ms 364 KB Win!
15 Correct 2 ms 364 KB Win!
16 Correct 4 ms 384 KB Win!
17 Correct 1 ms 364 KB Win!
18 Correct 1 ms 364 KB Win!
19 Correct 1 ms 364 KB Win!
20 Correct 1 ms 364 KB Win!
21 Correct 1 ms 364 KB Win!
22 Correct 1 ms 364 KB Win!
23 Correct 2 ms 364 KB Win!
24 Correct 3 ms 364 KB Win!
25 Correct 3 ms 364 KB Win!
26 Correct 3 ms 364 KB Win!
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Win!
2 Correct 1 ms 364 KB Win!
3 Correct 1 ms 364 KB Win!
4 Correct 1 ms 364 KB Win!
5 Correct 1 ms 364 KB Win!
6 Correct 1 ms 364 KB Win!
7 Correct 2 ms 364 KB Win!
8 Correct 4 ms 364 KB Win!
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Win!
2 Correct 1 ms 364 KB Win!
3 Correct 1 ms 364 KB Win!
4 Correct 1 ms 256 KB Win!
5 Correct 1 ms 364 KB Win!
6 Correct 1 ms 384 KB Win!
7 Correct 2 ms 364 KB Win!
8 Correct 3 ms 364 KB Win!
9 Correct 1 ms 364 KB Win!
10 Correct 1 ms 364 KB Win!
11 Correct 1 ms 364 KB Win!
12 Correct 1 ms 364 KB Win!
13 Correct 1 ms 364 KB Win!
14 Correct 1 ms 364 KB Win!
15 Correct 2 ms 364 KB Win!
16 Correct 4 ms 384 KB Win!
17 Correct 1 ms 364 KB Win!
18 Correct 1 ms 364 KB Win!
19 Correct 1 ms 364 KB Win!
20 Correct 1 ms 364 KB Win!
21 Correct 1 ms 364 KB Win!
22 Correct 1 ms 364 KB Win!
23 Correct 2 ms 364 KB Win!
24 Correct 3 ms 364 KB Win!
25 Correct 3 ms 364 KB Win!
26 Correct 3 ms 364 KB Win!
27 Correct 1 ms 364 KB Win!
28 Correct 1 ms 364 KB Win!
29 Correct 1 ms 364 KB Win!
30 Correct 1 ms 364 KB Win!
31 Correct 1 ms 364 KB Win!
32 Correct 1 ms 364 KB Win!
33 Correct 2 ms 364 KB Win!
34 Correct 4 ms 364 KB Win!
35 Correct 1 ms 364 KB Win!
36 Correct 0 ms 364 KB Win!
37 Correct 1 ms 364 KB Win!
38 Incorrect 1 ms 364 KB Game over! After 40 turns.
39 Halted 0 ms 0 KB -