文件名称:huaweiOJ
- 所属分类:
- JSP源码/Java
- 资源属性:
- [WORD]
- 上传时间:
- 2016-04-28
- 文件大小:
- 10kb
- 下载次数:
- 0次
- 提 供 者:
- s
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
胡牌简化规则如下:
1.必须有一个对子,即两张相同的牌,比如:两个2筒,两个4条等。
2.剩余的牌,每3张需要凑成一个有效牌,比如:3个一样的牌(3个2筒),或者3个顺子(1条2条3条),如果所有的牌都能够凑好,再满足规则2和1,有一个对子,并且所有的牌只有两种类型,那么就可以胡牌了。
3.假设牌不会出现碰的情况,即输入的牌肯定是13张。
4.输入牌肯定都是麻将牌,不用考虑异常输入;也不用考虑会输入“门”,“红中”等成都麻将中不会出现的牌。
5.条用T表示,D用D表示,万用W标识。
6.不用考虑输入的合法性,这个由函数的使用者保证。输入的牌为字符串,字母为大写的TDW”
要求根据13个已知输入,判断可以胡那几张牌。
运行时间限制: 无限制
内存限制: 无限制
样例输入:
1T8T6W6W5D4W1T3W6W2W5D6T1T
样例输出:
1
7T
-Chengdu mahjong first player rules
First player to simplify rules are as follows:
1. There must be a pair, ie two identical cards, such as: two 2-cylinder, two four and so on.
2. The remaining cards, every three need to make up a valid license, for example: the same three cards (three 2 cylinder), or three straight (1 2 3), if all the cards are able to Minato good, and then meet the rules 1 and 2, there is a pair, and all the cards are only two types, it can be a winning hand.
3. Suppose licensing situation will not touch, the input card must be 13.
4. Enter the brand are certainly tiles, regardless of the abnormal input they do not consider will enter the door , in red and so does not appear in Chengdu mahjong cards.
5. Article represented by T, D D stands, universal W logo.
6. legality without considering the input by the user to ensure this function. Enter a string of cards, letters to uppercase TDW
According to claim 13 known input, it can determine the cards in Hu.
1.必须有一个对子,即两张相同的牌,比如:两个2筒,两个4条等。
2.剩余的牌,每3张需要凑成一个有效牌,比如:3个一样的牌(3个2筒),或者3个顺子(1条2条3条),如果所有的牌都能够凑好,再满足规则2和1,有一个对子,并且所有的牌只有两种类型,那么就可以胡牌了。
3.假设牌不会出现碰的情况,即输入的牌肯定是13张。
4.输入牌肯定都是麻将牌,不用考虑异常输入;也不用考虑会输入“门”,“红中”等成都麻将中不会出现的牌。
5.条用T表示,D用D表示,万用W标识。
6.不用考虑输入的合法性,这个由函数的使用者保证。输入的牌为字符串,字母为大写的TDW”
要求根据13个已知输入,判断可以胡那几张牌。
运行时间限制: 无限制
内存限制: 无限制
样例输入:
1T8T6W6W5D4W1T3W6W2W5D6T1T
样例输出:
1
7T
-Chengdu mahjong first player rules
First player to simplify rules are as follows:
1. There must be a pair, ie two identical cards, such as: two 2-cylinder, two four and so on.
2. The remaining cards, every three need to make up a valid license, for example: the same three cards (three 2 cylinder), or three straight (1 2 3), if all the cards are able to Minato good, and then meet the rules 1 and 2, there is a pair, and all the cards are only two types, it can be a winning hand.
3. Suppose licensing situation will not touch, the input card must be 13.
4. Enter the brand are certainly tiles, regardless of the abnormal input they do not consider will enter the door , in red and so does not appear in Chengdu mahjong cards.
5. Article represented by T, D D stands, universal W logo.
6. legality without considering the input by the user to ensure this function. Enter a string of cards, letters to uppercase TDW
According to claim 13 known input, it can determine the cards in Hu.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
huaweiOJ.doc