Third round Marathon

Move the matrix

Time limit: 5 sec

Memory limit: 256 MiB
The statement of task #1 in round 3 / 2021 can be downloaded from here
Partners
https://www.president.bg/
https://www.prestigio.bg/
https://www.cougar.bg/
https://www.uni-sofia.bg/
https://www.fmi.uni-sofia.bg/
https://smg.bg/