设为首页 加入收藏

TOP

uva 11210 Chinese Mahjong(暴力枚举)(一)
2015-07-20 17:23:26 来源: 作者: 【 】 浏览:6
Tags:uva 11210 Chinese Mahjong 暴力 枚举

uva 11210 Chinese Mahjong


Mahjong (\) is a game of Chinese Z??http://www.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vcmlnaW4gdXN1YWxseSBwbGF5ZWQgYnkgZm91ciBwZXJzb25zIHdpdGggdGlsZXMgcmVzZW1ibGluZyBkb21pbm9lcyBhbmQgYmVhcmluZyB2YXJpb3VzIGRlc2lnbnMsIHdoaWNoIGFyZSBkcmF3biBhbmQgZGlzY2FyZGVkIHVudGlsIG9uZSBwbGF5ZXIgd2lucyB3aXRoCiBhIGhhbmQgb2YgZm91ciBjb21iaW5hdGlvbnMgb2YgdGhyZWUgdGlsZXMgZWFjaCBhbmQgYSBwYWlyIG9mIG1hdGNoaW5nIHRpbGVzLjwvcD4KPHA+QSBzZXQgb2YgTWFoam9uZyB0aWxlcyB3aWxsIHVzdWFsbHkgZGlmZmVyIGZyb20gcGxhY2UgdG8gcGxhY2UuIEl0IHVzdWFsbHkgaGFzIGF0IGxlYXN0IDEzNiB0aWxlcywgbW9zdCBjb21tb25seSAxNDQsIGFsdGhvdWdoIHNldHMgb3JpZ2luYXRpbmcgZnJvbSBBbWVyaWNhIG9yIEphcGFuIHdpbGwgaGF2ZSBtb3JlLiBUaGUgMTM2LXRpbGUgTWFoam9uZyBpbmNsdWRlczo8L3A+CjxwPjxzdHJvbmc+RG90czo8L3N0cm9uZz4gbmFtZWQgYXMgZWFjaCB0aWxlIGNvbnNpc3RzIG9mIGEgbnVtYmVyIG9mIGNpcmNsZXMuIEVhY2ggY2lyY2xlIGlzIHNhaWQgdG8gcmVwcmVzZW50IGNvcHBlciAodG9uZykgY29pbnMgd2l0aCBhIHNxdWFyZSBob2xlIGluIHRoZSBtaWRkbGUuIEluIHRoaXMgcHJvYmxlbSwgdGhleQ=="re represented by 1T, 2T, 3T, 4T, 5T, 6T, 7T, 8T and 9T.

\

Bams: named as each tile (except the 1 Bamboo) consists of a number of bamboo sticks. Each stick is said to represent a string (suo) that holds a hundred coins. In this problem, they"re represented by 1S, 2S, 3S, 4S, 5S, 6S, 7S, 8S and 9S.

\

Craks: named as each tile represents ten thousand (wan) coins, or one hundred strings of one hundred coins. In this problem, they"re represented by 1W, 2W, 3W, 4W, 5W, 6W, 7W, 8W and 9W.

\

Wind tiles: East, South, West, and North. In this problem, they"re represented by DONG, NAN, XI, BEI.

\

Dragon tiles: red, green, and white. The term dragon tile is a western convention introduced by Joseph Park Babcock in his 1920 book introducing Mahjong to America. Originally, these tiles are said to have something to do with the Chinese Imperial Examination. The red tile means you pass the examination and thus will be appointed a government official. The green tile means, consequently you will become financially well off. The white tile (a clean board) means since you are now doing well you should act like a good, incorrupt official. In this problem, they"re represented by ZHONG, FA, BAI.

\

There are 9*3+4+3=34 kinds, with exactly 4 tiles of each kind, so there are 136 tiles in total.

To who may be interested, the 144-tile Mahjong also includes:

Flower tiles:

typically optional components to a set of mahjong tiles, often contain artwork on their tiles. There are exactly one tile of each kind, so 136+8=144 tiles in total. In this problem, we don?ˉt consider these tiles.

\

Chinese Mahjong is very complicated. However, we only need to know very few of the rules in order to solve this problem. A meld is a certain set of tiles in one"s hand. There are three kinds of melds you need to know (to who knows Mahjong already, kong is not considered):

Pong: A set of three identical titles. Example: \;\.

Chow: A set of three suited tiles in sequence. All three tiles must be of the same suites. Sequences of higher length are not permissible (unless it forms more than one meld). Obviously, wind tiles and dragon tiles can never be involved in chows. Example:\;\.

Eye: The pair, while not a meld, is the final component to the standard hand. It consists of any two identical tiles.

A player wins the round by creating a standard mahjong hand. That means, the hand consists of an eye and several (possible zero) pongs and chows. Note that each titl

首页 上一页 1 2 下一页 尾页 1/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇ZOJ 2969 && BNU16488 Ea.. 下一篇UVA 10534--Wavio Sequence+二分+..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Python 数据分析与可 (2025-12-26 21:51:20)
·从零开始学Python之 (2025-12-26 21:51:17)
·超长干货:Python实 (2025-12-26 21:51:14)
·为什么 Java 社区至 (2025-12-26 21:19:10)
·Java多线程阻塞队列 (2025-12-26 21:19:07)