CF509A.Maximum in Table

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

An n×nn×n table aa is defined as follows:

  • The first row and the first column contain ones, that is: ai,1=a1,i=1a_{i,1}=a_{1,i}=1 for all i=1,2,...,ni=1,2,...,n .
  • Each of the remaining numbers in the table is equal to the sum of the number above it and the number to the left of it. In other words, the remaining elements are defined by the formula ai,j=ai1,j+ai,j1a_{i,j}=a_{i-1,j}+a_{i,j-1} .

These conditions define all the values in the table.

You are given a number nn . You need to determine the maximum value in the n×nn×n table defined by the rules above.

输入格式

The only line of input contains a positive integer nn ( 1<=n<=101<=n<=10 ) — the number of rows and columns of the table.

输出格式

Print a single line containing a positive integer mm — the maximum value in the table.

输入输出样例

  • 输入#1

    1
    

    输出#1

    1
  • 输入#2

    5
    

    输出#2

    70

说明/提示

In the second test the rows of the table look as follows:

1,1,1,1,1,{1,1,1,1,1}, 1,2,3,4,5,{1,2,3,4,5}, 1,3,6,10,15,{1,3,6,10,15}, 1,4,10,20,35,{1,4,10,20,35}, 1,5,15,35,70.{1,5,15,35,70}.

首页