[工学]ACM测试题+后台测试数据+代码参考.doc

[工学]ACM测试题+后台测试数据+代码参考.doc

  1. 1、本文档共37页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
[工学]ACM测试题后台测试数据代码参考

Three Cards Time limit: 1sec. Submitted: 29 Memory limit: 64M Accepted: 11 Source: Debug cool Description LaoPei and A q are good friends with Debugcool and they like playing cards.There is a way to play cards called Three cards, it is to say, all of the players will get three cards and only one will be the winner. As everyone knows, each card has one of four suits and one of thirteen values: · suits:clubs( C ),diamonds( D ),hearts( H )and spades( S ). They have no order. · values:2 3 4 …… 9 T( 10 ) J Q K A . And there will be seven types of the three cards on the players hands: 1) BaoZi:the three cards have the same values, for example:AH AS AD, 2C 2D 2S 2) TongHuaShun:the three cards have the same suit and their values increase by one, for example:7C 8C 9C, JH QH KH 3) JinHua:the three cards have the same suit 4) ShunZi:the three cards values increase by one 5) DuiZi:there are two cards in the three cards have the same values 6) Other:the other situation except the above The order:Baozi TongHuaShun JinHua ShunZi DuiZi Other, if the players cards have the same type, the values will be taken into count:on one hand, if the same type is DuiZi, the value of the two cards who have the same value will be compared firstly, if they have the same value, the other cards value will be compared. On the other hand, if the type is not DuiZi, from the biggest to the smallest will be compared successively, eg. QC 10C 9C KC 4C 3C. If all value of the three cards of the players are the same, they tied. eg. QC 10C 9C = QH 10H 9H. Input The input contains several test cases, each test case will have only one line to represent the cards in LaoPeis hand and A qs hand, every line will have six cards, three for LaoPei and three for A q. Each card will consist of two parts:the values and the suits. For example:AS mean spades with value A. The cards will be separated by a space. Output For each test case, output a line containing the result of the game. If LaoPeis cards i

您可能关注的文档

文档评论(0)

qiwqpu54 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档