Submission #194229

# Submission time Handle Problem Language Result Execution time Memory
194229 2020-01-16T00:13:58 Z s_avila_g Mini tetris (IOI16_tetris) C++14
7 / 100
5 ms 420 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 == 3)position = -1;
            position = lastpos+1;
        }
	}
	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 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!
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 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 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 -
# 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 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 -