matrice

Be there n a positive integer. We will build a matrix with n lines and n columns as per the rules that can be deduced from the following example (in which n=7):

1  1  1  1  1  1  1
1  1  2  3  4  5  6
1  2  1  3  6 10 15
1  3  3  1  4 10 20
1  4  6  4  1  5 15
1  5 10 10  5  1  6
1  6 15 20 15  6  1

Task

Determine the value that is at a specified position in the matrix.

Input Data

Input file matrice.in contains on line one 3 positive integers each separated by a space: n i j, where n is the size of the matrix, i is the line and j the column where the value that needs to be determined is located.

Output Data

Output file matrice.out will contain a single line with a single positive integer, representing the value located in the matrix on line i and column j.

Constraints and Statements

Examples
matrice.in matrice.out

7 4 5

10

Time limit: 0.5 seconds/test
Total available memory: 2 Mb, of which 1 Mb for the stack.

prof. Emanuela Cerchez
"Grigore Moisil" Iaşi IT High School
Contact:emanuela.cerchez@gmail.com