#include <bits/stdc++.h>
#include "tetris.h"
using namespace std;
void init(int n) {
}
int position;
int rotation;
int figure, lastpos = -1;
void new_figure(int figure_type) {
figure = figure_type;
}
int get_position() {
if(figure == 1) position = 0;
else{
if(figure == 2){
if(lastpos == 3)position = -1;
position = lastpos+1;
}
}
return position;
}
int get_rotation() {
if(figure == 1) rotation = 0;
else{
if(figure == 2) rotation = 1;
}
return rotation;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
256 KB |
Win! |
2 |
Correct |
2 ms |
256 KB |
Win! |
3 |
Correct |
2 ms |
256 KB |
Win! |
4 |
Correct |
2 ms |
420 KB |
Win! |
5 |
Correct |
2 ms |
376 KB |
Win! |
6 |
Correct |
3 ms |
376 KB |
Win! |
7 |
Correct |
1 ms |
376 KB |
Win! |
8 |
Correct |
5 ms |
256 KB |
Win! |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Game over! After 3 turns. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
256 KB |
Win! |
2 |
Correct |
2 ms |
256 KB |
Win! |
3 |
Correct |
2 ms |
256 KB |
Win! |
4 |
Correct |
2 ms |
420 KB |
Win! |
5 |
Correct |
2 ms |
376 KB |
Win! |
6 |
Correct |
3 ms |
376 KB |
Win! |
7 |
Correct |
1 ms |
376 KB |
Win! |
8 |
Correct |
5 ms |
256 KB |
Win! |
9 |
Incorrect |
2 ms |
256 KB |
Game over! After 3 turns. |
10 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Game over! After 3 turns. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
256 KB |
Win! |
2 |
Correct |
2 ms |
256 KB |
Win! |
3 |
Correct |
2 ms |
256 KB |
Win! |
4 |
Correct |
2 ms |
420 KB |
Win! |
5 |
Correct |
2 ms |
376 KB |
Win! |
6 |
Correct |
3 ms |
376 KB |
Win! |
7 |
Correct |
1 ms |
376 KB |
Win! |
8 |
Correct |
5 ms |
256 KB |
Win! |
9 |
Incorrect |
2 ms |
256 KB |
Game over! After 3 turns. |
10 |
Halted |
0 ms |
0 KB |
- |