Submission #568361

#TimeUsernameProblemLanguageResultExecution timeMemory
568361Trisanu_DasMini tetris (IOI16_tetris)C++17
Compilation error
0 ms0 KiB
#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 rotation;

Compilation message (stderr)

tetris.cpp: In function 'int get_position()':
tetris.cpp:22:20: error: named return values are no longer supported
   22 | int get_position() return pos;
      |                    ^~~~~~
tetris.cpp:23:35: error: expected '{' at end of input
   23 | int get_rotation() return rotation;
      |                                   ^
tetris.cpp:23:35: warning: no return statement in function returning non-void [-Wreturn-type]