A. New Year Transportation time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output New Year is coming in Line World! In this world, there are n cells numbered by integers from 1 to n, as a 1 × n b…