- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
ACM第二学期题目报告
开放性实验 ACM部分实验报告
目录
1057 Undercut 3
1078 Palindrome Numbers 7
1195 Blowing Fuses 9
1489 2^x mod n = 1 14
1657 Goldbachs Conjecture 20
1755 Clay Bully 23
1813 Bikers Trip Odometer 26
2104 Let the Balloon Rise 29
2105 Number Sequence 32
2208 To and Fro 34
ZOJ Problem Set - 1057
1057 Undercut
Time Limit: 1 Second ???? Memory Limit: 32768 KB
Undercut is a card game where two players each have five cards numbered one through five. At each round, each player selects a card, then simultaneously reveals it. If the cards are of equal value, there is no score. Otherwise, there are two cases: the two cards are exactly one point apart (this is called an undercut), or the cards are more than one point apart. In the latter case, the person revealing the larger of the cards gets the number of points on the larger card. In the case of an undercut the player with the lower card gets the sum of the two cards. The exception[例外情况] to this is when the cards are 1 and 2, in which case the player with the lower card gets 6 points (instead of only 3 points). After each round, the cards are returned to the hands and they play another round.
For example, if there are 5 rounds and player A plays (in this order) 5, 3, 1, 3, 5 and player B plays 3, 3, 3, 3, 4, then the scoring for each round would be: A gets 5 points, no points, B gets 3 points, no points, B gets 9 points. The totals would be A: 5, B: 12.
In this problem you will be given card plays for both players and must determine the final scores.
Input
There will be multiple input instances. Each instance will be one game. The first line of input for a game will be an integer n = 20. (A value of n = 0 terminates input.) The next two lines will each contain n integers between 1 and 5 inclusive indicating the cards played on each of n rounds. The first line are player As card plays and the second line are player Bs card plays.
Output
Each input instance should generate one line of output of the form:
A has a points. B has b po
您可能关注的文档
- 美国会计Chapter 3 Practice Materials.doc
- python经典例题100道.doc
- 国外的审计报告格式.doc
- 机械检查标准(附件一).doc
- 广西百色市平果县2016年中考英语模拟试卷.doc
- 小学英语常用词组大全.docx
- 第一部分 写作高分策略.doc
- 幼儿园一日生活常用英语.doc
- 中国企业绩效管理问题总结及应对(英文).docx
- 译林版6A unit1-2.docx
- 高中英语学海_1-8词汇练习609.doc
- 篮球裁判英语80句.doc
- 建设工程中英互译.doc
- 【ISO 操稳法规_2005年欧盟EVSC会议上的调研报告】.doc
- 09-10学年仁爱版英语九上Unit2单元考试卷.doc
- JOIN IN四年级下册词汇.doc
- 内蒙古乌海市第二十二中学八年级英语上册 Unit 1 Topic 1 I’m going to play basketball Section B教案.doc
- 新目标英语八年级上UNIT 10 I’m going to be a basketball player—period A(1a 1b 1c)教案2.doc
- 201512020302 建筑翻译.doc
- 苏教版7A期中测试题.doc
最近下载
- 生物安全法的试题及答案.docx VIP
- 《全大学进阶英语综合教程3》Unit-4教案.pdf VIP
- 单句语法填空专项训练100题(基础知识)(解析版).docx VIP
- 法理学第五章 法律关系.ppt VIP
- 专题02 数轴中的动点问题的七种考法(原卷版)【2025数学常考压轴题上册七年级北师版】.docx VIP
- BP85956D_CN_DS_Rev.0.91 规格书晶丰明源家电电源.pdf VIP
- 思想道德与法治(23版):第六章 学习法治思想 提升法治素养.pptx
- 中药鉴定学课件-总论.ppt VIP
- 工地施工罚款单表格.docx VIP
- 聚丙烯酰胺安全技术说明书.docx VIP
文档评论(0)