Submission #194231

# Submission time Handle Problem Language Result Execution time Memory
194231 2020-01-16T00:18:02 Z s_avila_g Mini tetris (IOI16_tetris) C++14
25 / 100
5 ms 504 KB
#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 == 2) lastpos = -1;
            position = lastpos + 1;
            lastpos++;
        }
	}
	return position;
}

int get_rotation() {
    if(figure == 1) rotation = 0;
    else{
        if(figure == 2) rotation = 1;
    }
	return rotation;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Win!
2 Correct 2 ms 256 KB Win!
3 Correct 2 ms 376 KB Win!
4 Correct 5 ms 452 KB Win!
5 Correct 2 ms 256 KB Win!
6 Correct 3 ms 256 KB Win!
7 Correct 3 ms 256 KB Win!
8 Correct 5 ms 256 KB Win!
# Verdict Execution time Memory Grader output
1 Correct 0 ms 376 KB Win!
2 Correct 2 ms 256 KB Win!
3 Correct 2 ms 252 KB Win!
4 Correct 2 ms 256 KB Win!
5 Correct 2 ms 256 KB Win!
6 Correct 3 ms 256 KB Win!
7 Correct 4 ms 376 KB Win!
8 Correct 5 ms 256 KB Win!
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Win!
2 Correct 2 ms 256 KB Win!
3 Correct 2 ms 376 KB Win!
4 Correct 5 ms 452 KB Win!
5 Correct 2 ms 256 KB Win!
6 Correct 3 ms 256 KB Win!
7 Correct 3 ms 256 KB Win!
8 Correct 5 ms 256 KB Win!
9 Correct 0 ms 376 KB Win!
10 Correct 2 ms 256 KB Win!
11 Correct 2 ms 252 KB Win!
12 Correct 2 ms 256 KB Win!
13 Correct 2 ms 256 KB Win!
14 Correct 3 ms 256 KB Win!
15 Correct 4 ms 376 KB Win!
16 Correct 5 ms 256 KB Win!
17 Correct 2 ms 376 KB Win!
18 Correct 2 ms 376 KB Win!
19 Correct 2 ms 256 KB Win!
20 Correct 2 ms 376 KB Win!
21 Correct 2 ms 256 KB Win!
22 Correct 0 ms 504 KB Win!
23 Correct 4 ms 252 KB Win!
24 Correct 1 ms 376 KB Win!
25 Correct 5 ms 252 KB Win!
26 Correct 5 ms 376 KB Win!
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Game over! After 3 turns.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Win!
2 Correct 2 ms 256 KB Win!
3 Correct 2 ms 376 KB Win!
4 Correct 5 ms 452 KB Win!
5 Correct 2 ms 256 KB Win!
6 Correct 3 ms 256 KB Win!
7 Correct 3 ms 256 KB Win!
8 Correct 5 ms 256 KB Win!
9 Correct 0 ms 376 KB Win!
10 Correct 2 ms 256 KB Win!
11 Correct 2 ms 252 KB Win!
12 Correct 2 ms 256 KB Win!
13 Correct 2 ms 256 KB Win!
14 Correct 3 ms 256 KB Win!
15 Correct 4 ms 376 KB Win!
16 Correct 5 ms 256 KB Win!
17 Correct 2 ms 376 KB Win!
18 Correct 2 ms 376 KB Win!
19 Correct 2 ms 256 KB Win!
20 Correct 2 ms 376 KB Win!
21 Correct 2 ms 256 KB Win!
22 Correct 0 ms 504 KB Win!
23 Correct 4 ms 252 KB Win!
24 Correct 1 ms 376 KB Win!
25 Correct 5 ms 252 KB Win!
26 Correct 5 ms 376 KB Win!
27 Incorrect 2 ms 376 KB Game over! After 3 turns.
28 Halted 0 ms 0 KB -