696. Mahjong

The game of Mahjong is played with tiles belonging to suits. Each tile also has a number in the range , and for each suit/number combination there are exactly four indistinguishable tiles with that suit and number. (The real Mahjong game also contains other bonus tiles, but those will not feature in this problem.)

A winning hand is a collection of Tiles (where is a fixed integer) that can be arranged as Triples and one Pair, where:

For example, here is a winning hand with , , , consisting in this case of two Chows, two Pungs, and one Pair:

Note that sometimes the same collection of tiles can be represented as Triples and one Pair in more than one way. This only counts as one winning hand. For example, this is considered to be the same winning hand as above, because it consists of the same tiles:

Let be the number of distinct winning hands formed of Triples and one Pair, where there are suits available and tiles are numbered up to .

For example, with a single suit and tiles numbered up to 4, we have : there are 12 winning hands consisting of a Pung and a Pair, and another 8 containing a Chow and a Pair. You are also given that , , and .

Find . Give your answer modulo .

696. 麻将

麻将游戏的牌共有 花色,每一张牌上都有 范围内的一个正整数,称为点数。任意花色-点数的组合都恰有四张完全相同的牌(现实中的麻将游戏中还有字牌、花牌,但是本题中就不考虑了)。

当玩家拥有了一副由 张牌的牌组,且这个牌组能被整理为 三对子与一副对子,玩家就可以胡牌。其中定义:1

下图的牌组满足 ,且能胡牌。(由两副顺子,两副刻子,一副对子组成)

注意到有时候相同的一副牌可以通过不同的方式被整理为 副三对子与一副对子,但是重复的牌组只计一次。下图的牌组也能胡牌,但由于其与上图中的牌完全一致,所以被认为与上图重复:

为满足如下条件的不同的牌组数:由 副三对子与一副对子组成、有 个可用花色、最大点数为 且可以胡牌。

例如 ,因为一共有 12 个由一副刻子、一副对子组成的可胡牌的牌组;8 个由一副顺子、一副对子组成的可胡牌的牌组。亦已知

之值。


这个链接 回到源站。

这个链接 回到详细版题目目录。


1 所有麻将相关术语(除「点数」「三对子」)的译名参照《中国麻将竞赛规则(1998 年 7 月版)》。原译的「吃」「碰」「杠」是考虑到英文原稿而为,但这是错译。