you mighty Blackout stand upperleft 00 corner nxm matrix you right second there K transformer jump matrix follow way each transformer start jump position xy time t jump position second the xaxe grow downward yaxe grow right the order jumping position define xyxdydxdyxyd periodic before time t transformer matrixyou want arrive bottomright corner N1M1 slay transformer lose possible energy when meet transformer matrix field kill lose sum energy amount require kill transformerafter transformer kill course stop jump fall abyss leave matrix world Output minimum possible energy waste