1. 程式人生 > 實用技巧 >Character Wheels-(矩陣的按層旋轉小模擬)

Character Wheels-(矩陣的按層旋轉小模擬)

題目連線:https://ac.nowcoder.com/acm/contest/8688/I
CSDN食用連結:https://blog.csdn.net/qq_43906000/article/details/109406367
You are given one \(n \times n\) character wheels, and it is guaranteed that n is even. Please implement these following operations:

1.Clockwise/Counter-clockwise rotate the x-th wheel \(y(1\leq y\leq10^9)\)

times. Rotating one time means rotatting 90 degrees. The instruction is L/R x y, R indicates rotating clockwise and L indicates rotating counter-clockwise. For example, R 1 3 means rotate the 1-st wheel 3 times clockwise.
2.Print all the wheels, the instruction is P.

輸入描述:
First line contains one integer