QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#75553 | #5461. Paddle Star | zhouhuanyi | WA | 0ms | 3988kb | C++14 | 601b | 2023-02-05 19:55:46 | 2023-02-05 19:55:50 |
Judging History
answer
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int read()
{
char c=0;
int sum=0;
while (c<'0'||c>'9') c=getchar();
while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
return sum;
}
int T;
const double Pi=asin(1)*2;
double l1,l2,l3,a,b;
int main()
{
T=read();
while (T--)
{
l1=read(),l2=read(),a=read()/180.0*Pi,b=read()/180.0*Pi;
if (b<=Pi/2) printf("%0.20lf\n",(l1+l2)*(l1+l2)*a+l2*l2*b);
else l3=l1*sin(Pi-b),printf("%0.20lf\n",(l1+l2)*(l1+l2)*a+l2*l2*b+l1*l3*sin(b-Pi/2)-l3*l3*(b-Pi/2));
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3988kb
input:
5 2 1 20 20 3 3 0 0 20 20 90 120 20 10 50 170 100 10 1 93
output:
3.49065850398865906712 0.00000000000000000000 3367.15761190651073775371 1133.66716761306315675029 373.97816510564075542788
result:
wrong answer 4th numbers differ - expected: '1098.8632790', found: '1133.6671676', error = '0.0316726'