第七届河南省大学生程序设计竞赛ACM赛前热身题目

上传人:笛音 文档编号:25746376 上传时间:2017-12-17 格式:DOCX 页数:8 大小:343.62KB
返回 下载 相关 举报
第七届河南省大学生程序设计竞赛ACM赛前热身题目_第1页
第1页 / 共8页
第七届河南省大学生程序设计竞赛ACM赛前热身题目_第2页
第2页 / 共8页
第七届河南省大学生程序设计竞赛ACM赛前热身题目_第3页
第3页 / 共8页
第七届河南省大学生程序设计竞赛ACM赛前热身题目_第4页
第4页 / 共8页
第七届河南省大学生程序设计竞赛ACM赛前热身题目_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《第七届河南省大学生程序设计竞赛ACM赛前热身题目》由会员分享,可在线阅读,更多相关《第七届河南省大学生程序设计竞赛ACM赛前热身题目(8页珍藏版)》请在金锄头文库上搜索。

1、第七届河南省大学生程序设计竞赛 ACM 网络热身赛题目Yougths Game时间限制:3000 ms | 内存限制:65535 KB 描述: 有一个长度为 n 的整数序列,A 和 B 轮流取数, A 先取,每次可以从左端或者右端取一个数,所有数都被取完时游戏结束,然后统计每个人取走的所有数字之和作为得分,两人的策略都是使自己的得分尽可能高,并且都足够聪明,求 A 的得分减去 B 的得分的结果。输入输入包括多组数据,每组数据第一行为正整数 n(1The story is about a poor guy possessed by a ghost, and became a magician u

2、nder the ghosts teaching, fighting against the evil and save the world finally.This time, the human ghost team is going to dig a bosss grave, the lord of the ghosts grave. Its not a easy thing. As we all know, ancient Chinese thinks that the grave is the home after human dead. So the bosss grave was

3、 built as an underground palace is not even strange. Whats more, this grave was protected by misters, ghosts, gears, etc.Now they faced the door after a long time journey but they cant open it. Lucky the ghost used her special eyes found that they are standing on a big map which marked with two colo

4、r, white and black. The map consists of a lot of cell. Each cell is a square marked with white or black. So the map is a big rectangle actually. They both believe that the way to open the door is to find some row which use those row can make up a new rectangle that every column has only one white ce

5、ll, because every thing has its own balance, like Tai Chi.To save the world, lets give them a hand. Write a program to find the new rectangle.输入:multible testevery test start with two integer C and R which describing the map(1=C,R=30)then C*R integer is the map1 means white0 means black输出:output the

6、 new rectangle(Guaranteed at only one available answer)样例输入6 70 0 1 0 1 1 01 0 0 1 0 0 10 1 1 0 0 1 01 0 0 1 0 0 00 1 0 0 0 0 10 0 0 1 1 0 1样例输出0 0 1 0 1 1 01 0 0 1 0 0 00 1 0 0 0 0 1合并游戏时间限制:1000 ms | 内存限制:65535 KB 描述 :大家都知道 Yougth 除了热爱编程之外,他还有一个爱好就是喜欢玩。某天在河边玩耍的时候,他发现了一种神奇的石子,当把两个石子放在一起的时候,后一个石子会消失

7、,而且会蹦出一定数量的金币,这可乐坏了 Yougth,但是他想得到最多的金币,他该怎么做?输入:首先一行,一个 n(1=n=10 ),表示有 n 个石子。接下来 n*n 的一个矩阵,Aij 表示第 i 个和第 j 个合并蹦出的金币值 (小于 10000,注意合并后 j 会消失)。输出:输出最多能得到的金币值。样例输入20 41 030 20 112 0 11 10 0样例输出422yes, master ghost! (III)时间限制:1000 ms | 内存限制:65535 KB 描述:After they fixed the water pipes,they are going to u

8、se those water pipes to get out of this hell. But when one of them touch the water, he feel his blood is sucking by the water and shout help. Luckily, this guy doesnt die. However, they have to find a way to get out. A magician say, its not water, its a kind of monster, like slime. A warlock say, I

9、have a spell, we can suck the monsters blood back. But if the blood you got is smaller than you lost, you maybe die!. A paladin say,Dont warry about this, I can keep you alive, and let those monster lose their ability at the same time. . How powerful magic!someone say. Infact, this magic is a camouf

10、lage. Monsters suck my mana instead of your blood. the paladin keep saying.Luckly, the warlock has figured out how much blood will lose and get if pass through one pipe(no mater how many people), and every pipes cost is different. After deliberation, they decide draw apart so that they can get maxim

11、um of monsters blood(because its pricious) while using the minimum of the paladins mana.(Guaranteed that they have enough man which means they can visit every pipe)Imagine that all those pipes consist a net, and our mission is find a way to from point A to point B. Of cause we need cost smallest man

12、a of paladin and get the blood of monsters as much as we can.输入:multiple test.the first line has two integers N and M(1=N=300,1=M=1000)fowoll M lines,every line has four integers,pa,pb,m,b. Which means from point pa to point pb will cost m mana of paladin and get b blood of the monster.last line has two integers S and E. Which means they are at point S, and they want to go to point E.输出:output the maximum of the blood while using the minimum of the mana.样例输入5 71 3 3 51 3 4 31 4 2 32 3 1 63 5 4 34 5 5 22 5 3 31 55 71 2 2 11 3 1 32 3 3 22 4 6 53 4 2 13 5 3 14 5 4 31 5样例输出3412

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 其它文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号