Matrix printing

5

1 votes
Very-Easy
Problem

Given an NxN matrix. Print it in spiral form.

INPUT

First line contains N. Next is the NxN matrix.

OUTPUT

output in single line.

Constraints 1 <= N <= 10^3

Time Limit: 0.5
Memory Limit: 256
Source Limit:
Editor Image

?