QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#181092#5677. Clarissa's Conical CannolisCloudsWA 0ms3948kbC++14508b2023-09-16 15:43:392023-09-16 15:43:39

Judging History

你现在查看的是最新测评结果

  • [2023-09-16 15:43:39]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3948kb
  • [2023-09-16 15:43:39]
  • 提交

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 x2=(double)2*(r-sin(pi*d/s/2)*r);
    double x1=(double)2*(sin(pi*d/s/2)*(s-r)-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: 0
Wrong Answer
time: 0ms
memory: 3948kb

input:

8.00 12.00 5.00 0.50

output:

-2.0

result:

wrong answer 1st lines differ - expected: '1.5', found: '-2.0'