there conveyor 120 row 120 column each row column number 0 119 cell ith row jth column denote j the leftmost cell 0 0 each cell belt belt initially face rightinitially slime ball belt 0 0 belt every second state conveyor change follow all slime ball conveyor cell direction belt time if cell move position slime get conveyor slime ball cell merge all belt slime ball previous second change direction time belt face right face vice versa a new slime ball place cell 0 0 there q query integer t x y you find slime cell x y t second start can