#CTR0017. Easy
Easy
Description
Given a positive integer , consider an matrix where the element in the -th row and -th column is given by . Below is an example for :
$ \begin{bmatrix} 1 & 2 & 3 & 4 \\ 5 & 6 & 7 & 8 \\ 9 & 10 & 11 & 12 \\ 13 & 14 & 15 & 16 \\ \end{bmatrix} $
Your task is to select some numbers from the matrix such that:
-
Exactly two numbers are chosen from each row.
-
Exactly two numbers are chosen from each column.
You need to determine the minimum sum of the numbers that are selected.
Input Format
The first line contains a positive integer , representing the size of the matrix.
Output Format
A single integer, representing the minimum sum of the numbers that are selected.
Sample Input #1
2
Sample Output #1
10
Sample Input #2
4
Sample Output #2
68
相关
在下列比赛中: