Submission #926382

#TimeUsernameProblemLanguageResultExecution timeMemory
926382rainboyMini tetris (IOI16_tetris)C11
100 / 100
1 ms504 KiB
#include "tetris_c.h" /* * 0 1 2 3 4 5 * ... ... ... ... ... x.. * ... x.. ..x xx. .xx xx. */ int tt[][3] = { { 0, 3, 5 }, { 1, 0, 2 }, { 2, 0, 1 }, { 3, 2, 4 }, { 4, 1, 3 }, { 5, 3, 0 } }; int pp[][3] = { { 0, 0, 0 }, { 0, 1, 1 }, { 0, 0, 0 }, { 0, 2, 1 }, { 0, 0, 0 }, { 0, 1, 1 } }; int rr[][3] = { { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 1, 2 }, { 0, 1, 3 }, { 0, 0, 2 } }; int s, p, r; void init(int n) { s = 0, p = r = -1; } void new_figure(int c) { c--; p = pp[s][c], r = rr[s][c], s = tt[s][c]; } int get_position() { return p; } int get_rotation() { return r; }

Compilation message (stderr)

grader.c: In function 'main':
grader.c:10:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     scanf("%d", &n);
      |     ^~~~~~~~~~~~~~~
grader.c:12:6: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |      scanf("%d", &a[i]);
      |      ^~~~~~~~~~~~~~~~~~
#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...