hdu Cup】的更多相关文章

这题是道水题,用数学方法做比较简单.因为在做二分法的专题,所以这里采用二分的方式做,很简单,但是还是要用到数学的知识,比如三角形相似,圆台的 体积公式等. #include"iostream" #include"stdio.h" #include"algorithm" #include"string.h" #include"cmath" #define inf 1e-9 using namespace st…
Cup Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8942    Accepted Submission(s): 2744 Problem Description The WHU ACM Team has a big cup, with which every member drinks water. Now, we know th…
Cup Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6684    Accepted Submission(s): 2062 Problem Description The WHU ACM Team has a big cup, with which every member drinks water. Now, we know th…
Cup Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7077    Accepted Submission(s): 2177 Problem Description The WHU ACM Team has a big cup, with which every member drinks water. Now, we know th…
http://acm.hdu.edu.cn/showproblem.php?pid=2289 二分法解题. 这个题很恶心...一开始测试样例都不能过,这个π一开始取3.1415926结果是99.999026,改为3.1414927,结果是99.999023..我就发现这个π对结果影响很大,这个题对π的精度要求也比较高...然后我的π就改为3.1415926536... 一开始判断跳出二分的条件是结果差值小于0.000000001,发现超时,改为0.01后还是超时...无语了...然后仔细想想,题…
The Third Cup is Free Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1811    Accepted Submission(s): 846 Problem Description Panda and his friends were hiking in the forest. They came across…
这道题目.运营商做数学题?算上两个子主题做?顶多算一个水主要议题... 首先,没有实际的二分法,但是,我们发现了一个新的解决方案,以取代二分法. 若果按照i从0,每次添加0.00000001我一直枚举h如果,绝对逼暂停.枚举太大 然而,它可以分为两个步骤: #include<cstdio> #include<cmath> #define pai acos(-1.0) double r1,r2,h,v; double get_v(double temp) { double rr=r1…
<题目链接> 题目大意: 一个圆台型的杯子,它的上底半径和下底半径已经给出,并且给出它的高度,问你,体积为V的水倒入这个杯子中,高度为多少. 解题分析: 就是简单的二分答案,二分枚举杯中水的高度,然后根据几何计算出该高度下,水的上半径,然后计算出该高度下水的体积,在与实际水的体积进行比较,从而确定最终的答案. #include <cstdio> #include <cstring> #include <cmath> const double PI=acos(…
题目传送门:https://vjudge.net/problem/HDU-2289 题意:有一个上口小于底部的圆台形水杯,告诉我们水的体积求水高度. 思路:利用高中数学知识求rr然后二分求h,具体化简过程见下图. 1 //#include<bits/stdc++.h> 2 #include<time.h> 3 #include <set> 4 #include <map> 5 #include <stack> 6 #include <cma…
Radar Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2280    Accepted Submission(s): 897 Problem Description N cities of the Java Kingdom need to be covered by radars for being in a state of wa…