Submission #194302

# Submission time Handle Problem Language Result Execution time Memory
194302 2020-01-16T02:16:43 Z s_avila_g Mini tetris (IOI16_tetris) C++14
25 / 100
5 ms 380 KB
#include <bits/stdc++.h>
#include "tetris.h"
using namespace std;

void init(int n) {
}

int position;
int rotation;
int figure, lastpos = -1, it = 2;

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++;
        }else{
            if(it % 2 == 0){
                position = 0;
                it++;
            }else{
                position = 1;
                it++;
            }
        }
	}
	return position;
}

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