Rotate

To confuse his pursuers, Neo has invented a way to rotate the Matrix.
However, Neo can only rotate the Matrix 90^(∘), 180^(∘), or 270^(∘).
Help Neo compute a given rotation of the Matrix.

Input

The input consists of several test cases. Each test case starts with the
number of rows 1 ≤ n ≤ 100 and the number of columns 1 ≤ m ≤ 100 of the
Matrix, as well as the number of degrees d that Neo wants to rotate the
Matrix. This is followed by n rows with m integers each.

Output

For each test case, the matrix that results from rotating the Matrix d
degrees.

Problem information

Author: Anders Jonsson

Generation: 2026-01-25T13:35:01.330Z

© Jutge.org, 2006–2026.
https://jutge.org
