QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#181088 | #5677. Clarissa's Conical Cannolis | Clouds | WA | 1ms | 4272kb | C++14 | 508b | 2023-09-16 15:41:43 | 2023-09-16 15:41:44 |
Judging History
answer
#include<bits/stdc++.h>
#define endl '\n'
#define int long long
#define pi acos(-1.0)
using namespace std;
double d,s,r,o;
signed main()
{
cin>>d>>s>>r>>o;
double x1=(double)2*(r-sin(pi*d/s/2)*r);
double x2=(double)2*(r-sin(pi*d/s/2)*(s-r));
double x3=s-(r-o/2)/sin(pi*d/s/2)-r;
if(x1<o)
{
cout<<"-1.0"<<endl;
return 0;
}
if(x2>o)
{
cout<<"-2.0"<<endl;
return 0;
}
printf("%.1lf\n",x3);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 4272kb
input:
8.00 12.00 5.00 0.50
output:
1.5
result:
ok single line: '1.5'
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 4096kb
input:
5.00 12.00 5.00 0.50
output:
-2.0
result:
wrong answer 1st lines differ - expected: '-1.0', found: '-2.0'