Yet Another Tetris Problem

CodeForces - 1324A