当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1825:Young

题目描述
Consider m natural numbers n1, n2, ..., nm with the property n1 >= n2 >= ... >= nm > 0.

We define a Young table as an arrangement in a table of n1 + n2 + ... + nm natural numbers (bigger than 0 and any two different), so that the ith line has ni elements (1 <= i <= m) in ascending order from left to right, and the elements from the same column are in ascending order from bottom to top.

An example of Young table for m = 4, n1 = 6, n2 = 4, n3 = 4, n4 = 1 is the following:
1	2	5	9	10	15

3 6 7 13
4 8 12 14
11

Given n1, n2, ..., nm determine the number of Young tables containing the elements 1, 2, ..., n1+n2+...+nm.
输入解释
The input has the stucture:

on the first line is: the natural number m (1 <= m <= 20);
on the second line are: the numbers n1, n2, ..., nm separated by a space (n1 <= 12).
输出解释
The output will contain the number of Young tables that can be built.
输入样例
2
3 2
输出样例
5
提示
The five Young tables are:

1

3

5

1

2

3

1

2

4

2

4

4

5

3

5

1

3

4

1

2

5

2

5

3

4


该题目是Virtual Judge题目,来自 北京大学POJ

题目来源 Romania OI 2002

源链接: POJ-1825

最后修改于 2020-10-29T06:15:11+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 30000