QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#181053#5677. Clarissa's Conical CannolisCloudsWA 0ms4136kbC++14445b2023-09-16 15:28:382023-09-16 15:28:38

Judging History

This is the latest submission verdict.

  • [2023-09-16 15:28:38]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 4136kb
  • [2023-09-16 15:28:38]
  • Submitted

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=2*(r-sin(pi*d/s)*r);
    double x2=2*(r-sin(pi*d/s)*(s-r));
    double x3=s-(r-o/2)/sin(pi*d/s)-r;
    
    if(x1<o)
        cout<<"-1.0"<<endl;
    else if(x2>o)
        cout<<"-2.0"<<endl;
    else
        printf("%.1lf\n",x3);
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 4136kb

input:

8.00 12.00 5.00 0.50

output:

1.5

result:

ok single line: '1.5'

Test #2:

score: 0
Accepted
time: 0ms
memory: 4032kb

input:

5.00 12.00 5.00 0.50

output:

-1.0

result:

ok single line: '-1.0'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3980kb

input:

11.00 12.00 5.00 0.50

output:

-2.0

result:

ok single line: '-2.0'

Test #4:

score: -100
Wrong Answer
time: 0ms
memory: 4052kb

input:

7.00 12.00 3.00 0.90

output:

-1.0

result:

wrong answer 1st lines differ - expected: '5.8', found: '-1.0'