QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#158366#7110. Kuririn MIRACLEucup-team1477#WA 1ms3944kbC++14527b2023-09-02 16:27:352023-09-02 16:27:36

Judging History

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

  • [2023-09-02 16:27:36]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3944kb
  • [2023-09-02 16:27:35]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
inline int read()
{
	int n=0,f=1,ch=getchar();
	while(ch<'0'||ch>'9')
	{
		if(ch=='-')f=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9')
	{
		n=n*10+ch-'0';
		ch=getchar();
	}
	return n*f;
}
int main()
{
	int t;
	long double v,r,d;
	t=read();
	for(int greg=1;greg<=t;greg++)
	{
		scanf("%Lf%Lf%Lf",&v,&r,&d);
		long double sj=5.080773245203136*r/v;
		if(4*r+sj*v>d)printf("%.9Lf\n",d/v);
		else printf("%.9Lf\n",sj+(d-4*r-sj*v)/(2*v));
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3944kb

input:

1
2.00 3 30.0

output:

8.310579934

result:

ok found '8.3105799', expected '8.3105799', error '0.0000000'

Test #2:

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

input:

100
8.66 6.05 71.59
8.44 8.67 82.55
4.23 9.68 24.74
6.63 9.95 7.45
1.2 7.27 97.55
2.08 2.94 31.61
8.48 5.56 20.16
7.35 5.55 52.48
1.35 8.15 51.23
3.88 9.02 72.37
7.03 1.97 57.03
1.78 4.44 93.44
5.5 6.11 52.94
1.09 9.64 69.01
1.01 3.54 16.78
1.63 4.55 44.06
5.82 5.51 5.92
5.62 2.93 76.01
4.75 4.43 73...

output:

4.510893657
5.445515642
5.848699764
1.123680241
43.919675622
8.362373399
2.377358491
3.978115069
37.948148148
18.652061856
4.207619011
27.595121688
9.625454545
63.311926606
16.613861386
15.023778609
1.017182131
7.044187332
8.283981629
8.858447489
1.769764216
4.541139241
10.473186120
5.620603015
4.33...

result:

wrong answer 1st numbers differ - expected: '4.4578371', found: '4.5108937', error = '0.0119019'