编程介的小学生 2017-10-17 09:29 采纳率: 20.5%
浏览 1132
已采纳

Young

Description

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.
Input

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).
Output

The output will contain the number of Young tables that can be built.
Sample Input

2
3 2
Sample Output

5

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-11-01 15:48
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?