I2P Homework4b: Problem Description
I2P Homework4b: Problem Description
Problem Description
Given a vector of dimension N, use it to create an N-by-N circulant matrix. An example of circulant
matrix:
15432
21543
32154
43215
54321
Input
The first line contains a positive integer N indicating the size of the matrix. (0<N<20)
The second line contains N numbers indicating the components of the vector. Note that each component
of the vector is a one-digit number.
Output
The N-by-N circulant matrix. Print the elements of the matrix using the format "%2d". Each row is ended
with a newline character '\n'.
Sample Input
5
87462
Sample Output
82647
78264
47826
64782
26478
http://140.114.86.238/problem_print.php?pid=10099
Page 1 of 1