0% found this document useful (0 votes)
40 views

CSEC-ASTU Competitive Programming Contest 2021: Time Limit: 1 Second

This document describes Young diagrams and semi-standard Young tableaux. Young diagrams are arrangements of boxes in rows and columns that follow specific rules. Semi-standard Young tableaux are Young diagrams filled with integers from 1 to N, following additional rules. The task is to count the number of possible semi-standard Young tableaux for a given Young diagram and integer N, based on input of the diagram dimensions and N. Sample input and output are provided.

Uploaded by

Abraham Mekuria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

CSEC-ASTU Competitive Programming Contest 2021: Time Limit: 1 Second

This document describes Young diagrams and semi-standard Young tableaux. Young diagrams are arrangements of boxes in rows and columns that follow specific rules. Semi-standard Young tableaux are Young diagrams filled with integers from 1 to N, following additional rules. The task is to count the number of possible semi-standard Young tableaux for a given Young diagram and integer N, based on input of the diagram dimensions and N. Sample input and output are provided.

Uploaded by

Abraham Mekuria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Ashebir Wondemeneh

CSEC-ASTU Competitive Programming Contest 2021

Problem 79: Diagrams & Tableaux


Time Limit: 1 second
A Young diagram is an arrangement of boxes in rows and columns conforming to the following
rules:

 the boxes in each row and each column are contiguous,


 the left borders of all rows are aligned, and
 each row is not longer than the one above.
Here are some examples of Young diagrams:

A semi-standard Young tableau for a given number N is a Young diagram that has its boxes filled
according to the following rules:
 Each box contains a single integer between 1 and N, inclusive,
 each integer is greater than or equal to the integer in the box to its left, and
 each integer is strictly greater than the integer in the box above.
Here is a list of all semi-standard Young tableaux for N = 3, based on a particular Young diagram:

Your task is to count how many semi-standard Young tableaux are possible, based on a given
Young diagram, with a given N.

Input

Each test case consists of two lines. The first line of each test case specifies the Young diagram.
This line starts with the number k satisfying 1 ≤ k ≤ 7, the number of rows, followed by k positive
integers l1, l2, . . . , lk . These integers specify the number of boxes on each row of the Young
diagram, and they satisfy 7 ≥ l1 ≥ l2 ≥ ··· ≥ lk ≥ 1. The second line contains the integer N, satisfying
k ≤ N ≤ 7.

Source: NWERC-2013 Andalus Division July 6, 2021


Ashebir Wondemeneh

CSEC-ASTU Competitive Programming Contest 2021

Output

For each test case, print one line containing the number of semi-standard Young tableaux based
on the given Young diagram, with the given N.

Sample Input 1 Sample Output 1


11 1
1 2
11 20
2 20
221
4
43211
4

Source: NWERC-2013 Andalus Division July 6, 2021

You might also like