sdnu oj 1282 愤怒的小鸟
程序员文章站
2022-05-12 12:25:43
...
如果还在上高中,大概不会被卡住2333
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <math.h>
using namespace std;
int main()
{
int T;
int p, t, n;
double x, ty, a, b, s1, s2;
scanf("%d", &T);
while(T--)
{
scanf("%d%d%lf", &p, &t, &x);
b = tan(x);
double tmp = (double)(2.0*t*p - t*t);
a = (-b*p)/tmp;
s1 = a*t*t*t/3 + b*t*t/2;
ty = a*t*t + b*t;
s2 = ty*(p-t)*0.5;
printf("%.3lf\n", s1+s2);
}
}
上一篇: 【Linux系统】一、学习前期准备
下一篇: CTF show WEB11