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

Задача 7125. Largest on the diagonals


In an NxN square array, where N is an odd number. The largest element among those standing on the main and secondary diagonals is interchanged with the element standing at the intersection of these diagonals. If there are several largest elements, then change the one with the row and column number 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
89 10 79 
42 7 5 
94 32 68  
89 10 79 
42 94 5 
7 32 68