Submission #568363

# Submission time Handle Problem Language Result Execution time Memory
568363 2022-05-25T09:13:08 Z Trisanu_Das Mini tetris (IOI16_tetris) C++17
Compilation error
0 ms 0 KB
#include "tetris.h"
#include <bits/stdc++.h>
using namespace std;
 
void init(int n){}
int st = 0, pos, rot;
int r1[6] = {0, 1, 1, 0, 0, 0}, p1[6] = {0, 2, 0, 0, 1, 1}, n1[6] = {1, 3, 4, 0, 0, 1};
int r2[6] = {0, 2, 3, 0, 1, 2}, p2[6] = {0, 1, 0, 0, 1, 1}, n2[6] = {5, 2, 1, 4, 3, 0};
void new_figure(int type){
  if(type == 1){pos = 0; rot = 0;}
  if(type == 2){
    rot = r1[st];
    pos = p1[st];
    st = n1[st];
  }
  if(type == 3){
    rot = r2[st];
    pos = p2[st];
    st = n2[st];
  }
}
int get_position() {return pos};
int get_rotation() {return rot};

Compilation message

tetris.cpp: In function 'int get_position()':
tetris.cpp:22:31: error: expected ';' before '}' token
   22 | int get_position() {return pos};
      |                               ^
      |                               ;
tetris.cpp: In function 'int get_rotation()':
tetris.cpp:23:31: error: expected ';' before '}' token
   23 | int get_rotation() {return rot};
      |                               ^
      |                               ;