302622: CF509A. Maximum in Table
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Maximum in Table
题意翻译
给定一个 $N$ * $N$ 的矩阵,令 $a_{i,j}$ 为矩阵中第i行第j列的元素,则有: 1. $a_{k,1}=a_{1,k}=1(1≤k≤N)$ 2. $a_{i,j}=a_{i-1,j}+a_{i,j-1}(2≤i,j≤N)$ 现请求出该矩阵中最大元素的值。 输入格式: 一行一个正整数 $N(N ≤ 10)$ 。 输出格式: 一行一个正整数表示上述答案。题目描述
An $ n×n $ table $ a $ is defined as follows: - The first row and the first column contain ones, that is: $ a_{i,1}=a_{1,i}=1 $ for all $ i=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 $ a_{i,j}=a_{i-1,j}+a_{i,j-1} $ . These conditions define all the values in the table. You are given a number $ n $ . You need to determine the maximum value in the $ n×n $ table defined by the rules above.输入输出格式
输入格式
The only line of input contains a positive integer $ n $ ( $ 1<=n<=10 $ ) — the number of rows and columns of the table.
输出格式
Print a single line containing a positive integer $ m $ — the maximum value in the table.
输入输出样例
输入样例 #1
1
输出样例 #1
1
输入样例 #2
5
输出样例 #2
70