扑克牌 3 张两人比大小,C 语言代码
背景:两个人每人发 3 张牌(各从一副牌中),每张牌包括花色(红桃(Heart)>
黑桃(Spade)>方块 (Diamond)>梅花 (Club))和大小(从小到大依次是:2-10、
J、Q、K、A),谁手上有最大的一张或多张(如果有相同的牌)牌谁获胜。
输入:A 的 3 张牌(未排序)和 B 的 3 张牌(未排序)。(参见用例)
输出:A 的 3 张牌的排序后的输出和 B 的 3 张牌的排序后的输出,以及 A 和 B 谁
获胜。(参见用例)
1.DA H2 C3↵
2.H4 H3 DJ↵
View plain
1.Winner is B!↵
2.A: H2 DA C3↵
3.B: H4 H3 DJ↵
Unlimited
256M
0
Test Case 3
View plain
1.HA CA CB↵
2.HQ CJ CQ↵
View plain
1.Input Error!↵
Unlimited
256M
0
Test Case 4
View plain
1.HA CA CJ↵
2.DA DK DK↵
View plain
1.Input Error!↵
Unlimited
256M
0
Test Case 5
View plain
1.SA SJ SK↵
2.SA SJ