Олимпиадный тренинг

Задача 7126. Minimum on diagonals


In an NxN square array, where N is an odd number. Swap the smallest element among those on the main and secondary diagonals with the element located in the lower left corner of the array. If there are several smallest elements, then change the one with the row and column numbers less.

Input: The program receives as input the number N <= 15, which is the number of rows and columns in the array. Next, the input stream contains N lines of N numbers that are elements of the array.
Output: The program should display the modified array

# Input Output
1
3
80 10 22 
81 90 13 
37 79 80  
80 10 37 
81 90 13 
22 79 80