Devesh Agarwal's submission of Beautiful Arrays | CodeChef