标题:C语言新人求助两道题。。没什么思路
取消只看楼主
LeslieCh
Rank: 1
等 级:新手上路
帖 子:33
专家分:0
注 册:2013-11-27
结帖率:77.78%
已结贴  问题点数:30 回复次数:3 
C语言新人求助两道题。。没什么思路
2441: Time Stop
Time Limit: 1 Sec  Memory Limit: 64 MB
Submit: 3511  Solved: 1075

Description
Faceless Void(JBL) is a hero in dota game. His ult is Time Stop. It makes a space(a circle of radius R) that all units in it will stop. The question is wether can JBL choose a position to release Time Stop cause all enemy units stop.


Input
The first line is integer T(T <= 50), the number of test cases.The first line fo each test case is two integers n(0 < n <= 100), R(0 <= R <= 10000), the number enemy units and the Radius of Time Stop.Then n lines, each line contains two integer x and y (-1000 <= x,y <= 1000), means the position of a enemy unit.
Output
For each case output Yes if JBL can stop all enemy units, otherwise print No.Pay attention to the output format.
Sample Input
2
5 1
0 0
0 1
1 0
1 1
2 2
5 2
0 0
0 1
1 0
1 1
2 2

Sample Output
Case #1: No
Case #2: Yes
HINT



2442: Requiem of Souls
Time Limit: 1 Sec  Memory Limit: 64 MB
Submit: 2478  Solved: 1018

Description
Nevermore is a terrible monster. When he kill a life, he will absorb its soul to improve his strength.And his ult called Requiem of Souls, is very fierce and cruel. Evil spirit will be summoned to attack nearby enemy units.The damage is related to the distance to nevermore.


To simplify the problem we assume that all enemy unit are on the x-axis. The damage is A - D, A is the initial damage, D is the distance to nevermore.Nevermore can choose anywhere to release his ult as he has a blink dagger. Your task is to call the minimum initial damage A Nevermore need to kill all enemy units by release Requiem of Souls once.(If a unit's HP less than or equal to zero, it will die.)
Input
The first line is integer T(T <= 20), the number of test cases.The first line of each case contains a integer n (0 < n <= 10^5), the number of enemy units.Then n lines, each line contains two integer a, b(0 < a, b < 10^8), a is the enemy unit's location, b is the enemy unit's HP.
Output
For each case, output the minimum initial damage in the sample output format.
Sample Input
3
1
1 1
2
1 1
2 1
2
1 1
2 2

Sample Output
Case #1: 1.00
Case #2: 1.50
Case #3: 2.00


HINT

这两题要怎么做。。?求教
搜索更多相关主题的帖子: position question release Memory number 
2013-12-06 16:48
LeslieCh
Rank: 1
等 级:新手上路
帖 子:33
专家分:0
注 册:2013-11-27
得分:0 
.
2013-12-06 17:08
LeslieCh
Rank: 1
等 级:新手上路
帖 子:33
专家分:0
注 册:2013-11-27
得分:0 
回复 10楼 pangshch
哦,谢谢~我去试试先。。。
2013-12-08 11:31
LeslieCh
Rank: 1
等 级:新手上路
帖 子:33
专家分:0
注 册:2013-11-27
得分:0 
.
2013-12-11 17:07



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-424798-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.130569 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved