QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#430087 | #5461. Paddle Star | 36champ | WA | 0ms | 4332kb | C++20 | 840b | 2024-06-03 13:54:01 | 2024-06-03 13:54:01 |
Judging History
answer
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define M_PI acos(-1)
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cout << fixed << setprecision(12);
int t = 1;
cin >> t;
while(t-->0)
{
double l1, l2, t1, t2;
cin >> l1 >> l2 >> t1 >> t2;
if(t2 <= 90) cout << t1 / 180 * M_PI * pow(l1 + l2, 2) + t2 / 180 * M_PI * pow(l2, 2) << "\n";
else
{
double area = t1 / 180 * M_PI * pow(l1 + l2, 2) + t2 / 180 * M_PI * pow(l2, 2);
double t3 = atan2(l2 * sin(t2), l1 - l2 * cos(t2));
area += l1 * l2 * sin(t2);
area -= t3 * (pow(l1 - l2 * cos(t2), 2) + pow(l2 * sin(t2), 2));
cout << area << "\n";
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 4332kb
input:
5 2 1 20 20 3 3 0 0 20 20 90 120 20 10 50 170 100 10 1 93
output:
3.490658503989 0.000000000000 3395.813965140428 1112.058098767133 349.259298514880
result:
wrong answer 3rd numbers differ - expected: '3367.1576119', found: '3395.8139651', error = '0.0085105'