이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
}
컴파일 시 표준 에러 (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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |