Bingo Game

Time limit1sMemory limit128 MB

Summary
Count N x N grids with distinct values from 1 to M, columns increasing downward, each column larger than all columns to its left, and total sum S, modulo 100000.
Level

Hard8 of 10

Topics
Dynamic programming, Combinatorics, Prefix sum, Math
Solved
No attempts yet

Problem

At a certain programming contest, there is an unusual custom of playing a bingo game at the after-party. The "bingo card" used here is different from an ordinary bingo card: every cell must be filled so that all of the following conditions hold.

  • The bingo card is an N×NN \times N grid of cells, and each cell contains one integer. All of the integers are distinct.
  • Each integer is between 11 and MM inclusive.
  • The sum of all N×NN \times N integers is SS.
  • In every column the values increase from top to bottom (each column is in ascending order).
  • The integer in any cell must be greater than every integer in the columns to its left.

For example, when N=5N = 5, M=50M = 50, and S=685S = 685, at least one bingo card satisfying these conditions exists. (Reading any column from top to bottom gives increasing values, and every value in a column is larger than all values in the columns to its left.)

Because many people want to attend the after-party, you want to make as many bingo cards as possible. However, everyone wants their own card, so no two cards may be identical. Print the maximum number of distinct bingo cards you can make, taken modulo 100000100000.

Input

The input consists of one line containing three integers NN, MM, and SS separated by spaces: the card size NN (1≤N≤71 \le N \le 7), the maximum integer allowed in a cell MM (1≤M≤20001 \le M \le 2000), and the total sum of the integers on the card SS (1≤S≤30001 \le S \le 3000).

For every given input, it is guaranteed that at least one bingo card satisfying the conditions can be made.

Output

Print, on a single line, the maximum number of distinct bingo cards that can be made, taken modulo 100000100000.

Hint

For example, when N=5N = 5, M=50M = 50, and S=685S = 685, the total number of bingo cards that can be made is 642499974501642499974501, and 642499974501 mod 100000=74501642499974501 \bmod 100000 = 74501.

Examples3

  1. Example 1

    Input
    3 9 45
    
    Expected output
    1
    
  2. Example 2

    Input
    3 100 50
    
    Expected output
    7
    
  3. Example 3

    Input
    5 50 685
    
    Expected output
    74501