TOPPARR - Editorial

array
cakewalk
editorial
nitwma01

#1

PROBLEM LINK:

Practice
Contest

Author: Full name
Tester: Full name
Editorialist: Full name

DIFFICULTY:

CAKEWALK

PROBLEM:

You have to print clockwise rotations of a given 2-D array at given times, provided there is one clockwise rotation of the array per unit time.

EXPLANATION:

Whatever be the times at which the array is asked to be displayed, it can have only four states which can be found by taking T modulo 4, where T is the time at which we need to print the array. With some observation, the array can be printed easily by altering the looping variables.

AUTHOR’S AND TESTER’S SOLUTIONS:

Author’s solution can be found here.