Submission #194126

#TimeUsernameProblemLanguageResultExecution timeMemory
194126juanmartinez111Mini tetris (IOI16_tetris)C++14
15 / 100
5 ms504 KiB
#include "tetris.h" void init(int n) { } int position; int rotation; int figura,cnt=-1; void new_figure(int figure_type) { figura=figure_type; cnt++; } int get_position() { if(figura==2){ if(cnt%3==0)return 0; return 1; } else if(figura==1)return 0; else if(figura==3){ if(cnt%2==0)return 2; return 0; } } int get_rotation() { if(figura==2){ if(cnt%3==0)return 1; return 0; } else if(figura==1)return 0; else if(figura==3){ if(cnt%2==0)return 2; return 0; } }

Compilation message (stderr)

tetris.cpp: In function 'int get_position()':
tetris.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
tetris.cpp: In function 'int get_rotation()':
tetris.cpp:36:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...