QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#656718#7032. Keiichi Tsuchiya the Drift Kingveg#AC ✓6ms4396kbC++20253b2024-10-19 13:36:362024-10-19 13:36:37

Judging History

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

  • [2024-10-19 13:36:37]
  • 评测
  • 测评结果:AC
  • 用时:6ms
  • 内存:4396kb
  • [2024-10-19 13:36:36]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

int main() {
	int T; scanf("%d",&T);
	while(T--) {
		int a,b,r,d; scanf("%d%d%d%d",&a,&b,&r,&d);
		printf("%.10lf\n",sqrt((a+r)*(a+r)+b*b)*cos(max(atan(1.0*b/(a+r))-1.0*d*acos(-1)/180,0.0))-r);
	}
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

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

input:

4
1 2 2 120
1 2 2 60
1 2 2 30
1 2 2 15

output:

1.6055512755
1.6055512755
1.5980762114
1.4154155691

result:

ok 4 numbers

Test #2:

score: 0
Accepted
time: 6ms
memory: 4300kb

input:

10000
17 35 10 70
56 65 64 74
54 58 75 31
56 9 87 44
33 60 39 8
39 52 4 94
63 99 76 134
15 91 16 149
21 85 94 71
98 9 34 116
8 6 13 134
18 68 26 85
21 20 61 117
73 18 49 64
41 25 66 32
19 72 94 110
80 38 92 152
62 46 67 157
38 72 79 139
75 18 9 124
73 23 96 150
1 26 49 114
36 76 66 38
80 34 23 88
69...

output:

34.2040722106
72.4734406396
66.4390328021
56.2829368767
40.6496870070
63.4759216313
94.6516920514
80.1353212924
49.0034964608
98.3064624272
8.8403296678
54.9938269253
23.4037913840
74.3207200757
43.8817546274
39.9888055025
84.1476653266
69.9561973771
58.3790377023
76.9069263797
74.5579080547
7.35601...

result:

ok 10000 numbers

Test #3:

score: 0
Accepted
time: 6ms
memory: 4396kb

input:

10000
99 1 1 99
99 1 1 98
98 1 1 98
97 1 1 98
97 1 1 97
97 1 1 96
96 1 1 96
92 1 1 99
93 1 1 97
95 1 1 94
94 1 1 94
90 1 1 97
93 1 1 93
89 1 1 96
98 1 1 86
99 1 1 84
84 1 1 98
89 1 1 92
95 1 1 85
81 1 1 98
92 1 1 86
95 1 1 82
84 1 1 92
89 1 1 86
95 1 1 79
79 1 1 94
87 1 1 85
90 1 1 81
77 1 1 93
94 1...

output:

99.0049998750
99.0049998750
98.0050503762
97.0051019080
97.0051019080
97.0051019080
96.0051545022
92.0053761887
93.0053189984
95.0052081921
94.0052630121
90.0054943396
93.0053189984
89.0055553841
98.0050503762
99.0049998750
84.0058821494
89.0055553841
95.0052081921
81.0060973343
92.0053761887
95.005...

result:

ok 10000 numbers

Test #4:

score: 0
Accepted
time: 6ms
memory: 4284kb

input:

10000
1 99 88 1
1 99 89 1
1 97 88 1
1 97 89 1
1 95 88 1
1 95 89 1
1 93 88 1
1 93 89 1
1 91 88 1
1 91 89 1
1 89 88 1
1 89 89 1
1 87 88 1
1 87 89 1
1 85 88 1
1 85 89 1
1 83 88 1
1 83 89 1
1 81 88 1
1 81 89 1
1 79 88 1
1 79 89 1
1 77 88 1
1 77 89 1
1 75 88 1
1 75 89 1
1 73 88 1
1 73 89 1
1 71 88 1
1 71...

output:

2.7142331062
2.7140808014
2.6793282933
2.6791759885
2.6444234805
2.6442711756
2.6095186676
2.6093663627
2.5746138547
2.5744615499
2.5397090418
2.5395567370
2.5048042290
2.5046519241
2.4698994161
2.4697471112
2.4349946032
2.4348422984
2.4000897903
2.3999374855
2.3651849775
2.3650326726
2.3302801646
2...

result:

ok 10000 numbers