hdu 2141 (二分)】的更多相关文章

Can you find it? Time Limit: 10000/3000 MS (Java/Others)    Memory Limit: 32768/10000 K (Java/Others)Total Submission(s): 19416    Accepted Submission(s): 4891 Problem Description Give you three sequences of numbers A, B, C, then we give you a number…
转自:http://www.cnblogs.com/kuangbin/archive/2012/08/23/2653003.html   一种是直接根据公式计算的,另外一种是二分算出来的.两种方法速度都很快,充分体会到二分的效率之高啊~~~   题目中一个很重要的条件就是 (Lx*Lx+Ly*Ly) < vD*vD < vB*vB , 这样说明一定是可以追上的,而且可以以最大的距离射中,所以第一问的答案一定就是L的. 假设追击者跑的时间是 t1,那么肯定子弹飞行时间就是 L/vB 了 那么此时…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2141 题目大意:查找是否又满足条件的x值. 这里简单介绍一个小算法,二分查找. /* x^2+6*x-7==y 输入y 求x 精确度为10^-5 0=<x<=10000 */ #include <iostream> #include <cstdio> using namespace std; int main (void) { double y; while(cin>…
链接:http://acm.hdu.edu.cn/showproblem.php?pid=2141 Can you find it? Time Limit: 10000/3000 MS (Java/Others)    Memory Limit: 32768/10000 K (Java/Others)Total Submission(s): 11503    Accepted Submission(s): 3021 Problem Description Give you three seque…
题目链接: Can you find it? Time Limit: 10000/3000 MS (Java/Others)    Memory Limit: 32768/10000 K (Java/Others)Total Submission(s): 38634    Accepted Submission(s): 9395 Problem Description Give you three sequences of numbers A, B, C, then we give you a…
Can you find it? Time Limit: 10000/3000 MS (Java/Others)    Memory Limit: 32768/10000 K (Java/Others)Total Submission(s): 9180    Accepted Submission(s): 2401 Problem Description Give you three sequences of numbers A, B, C, then we give you a number…
Problem Description Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck = X.   Input There are many cases. Every data cas…
Can you find it? Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck = X. 你以为我是因为被$world final$打击到了而在做水题吗? 没错我就是在做水题.....…
Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck = X. Input There are many cases. Every data case is described as foll…
Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck = X. Input There are many cases. Every data case is described as foll…