Crazy TankTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5033    Accepted Submission(s): 1017 Problem DescriptionCrazy Tank was a famous game about ten years ago. Every child liked it. Time fli…
Crazy Tank Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4562    Accepted Submission(s): 902 Problem Description Crazy Tank was a famous game about ten years ago. Every child liked it. Time f…
题意: 给你N个炮弹的发射速度,以及炮台高度H和L1,R1,L2,R2. 问任选发射角度.最多能有几个炮弹在不打入L2~R2的情况下打入L1~R1 注意:区间有可能重叠. 思路: 物理题,发现单纯的依据V去求X很困难. 这个时候想到暴力枚举角度.for(double i=0; i<=pi; i+=0.0007) 算出能到达的x.然后推断x,统计sum 发现以增长级0.0007弧度 刚刚好能过这道题 反正也是醉了~ 代码: #include"cstdlib" #include&qu…
遇到物理题,千万不要一味的当成物理题去想着推出一个最终结果来,这样ACM竞赛成了物理比赛,出题人就没水平了...往往只需要基础的物理分析,然后还是用算法去解决问题.这题n小于等于200,一看就估计是暴力枚举能过.就枚举角度就行了. #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<string> #include<cmath>…
题意: n个物体从高H处以相同角度抛下,有各自的初速度,下面[L1,R1]是敌方坦克的范围,[L2,R2]是友方坦克,问从某个角度抛出,在没有一个炮弹碰到友方坦克的情况下,最多的碰到敌方坦克的炮弹数. 解法: 枚举角度,将pi/2分成1000份,然后枚举,通过方程 v*sin(theta)*t - 1/2*g*t^2 = -H 解出t,然后 x = v*cos(theta)*t算出水平距离,直接统计即可. 代码: #include <iostream> #include <cstdio&…
题意不难理解,仔细看题吧,就不说题意了 #include <iostream> #include <cstdio> #include <cstring> #include <cmath> using namespace std; const double PI=acos(-1.0); const double g=9.8; double V[205]; int main() { //freopen("in.txt","r&quo…
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> const double g = 9.8; using namespace std; double h,l1,r1,l2,r2;z double cal(double ang,double v) { double vx,vy; vx = v * sin(ang…
简单推下物理公式  对角度枚举 物理公式不会推啊智商捉急啊.... 到现在没想通为什么用下面这个公式就可以包括角度大于90的情况啊... #include<iostream> #include<cmath> #include<cstdio> #include<vector> #include<cstring> #include<algorithm> using namespace std; #define inf 0x3f3f3f3f…
Problem Description A single playing card can be placed on a table, carefully, so that the short edges of the card are parallel to the table's edge, and half the length of the card hangs over the edge of the table. If the card hung any further out, w…
题目链接 去年杭州现场赛的神题..枚举角度..精度也不用注意.. #include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <cmath> #include <algorithm> using namespace std; #define eps 1e-8 #define PI 3.1415926 double xl,xr,y…