QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#198960#6423. FireworksrsjTL 827ms4072kbC++14305b2023-10-03 19:38:442023-10-03 19:38:45

Judging History

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

  • [2023-10-03 19:38:45]
  • 评测
  • 测评结果:TL
  • 用时:827ms
  • 内存:4072kb
  • [2023-10-03 19:38:44]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
using ld = long double;
void get() {
	long double n,m,p,i,ans=1e18;
	cin>>n>>m>>p;
	for(i=1;i<=100000;i++) {
		ans=min(ans,(n*i+m)/(1-pow(1-p/10000,i)));
	}
	printf("%.10Lf\n",ans);
}
int main() {
	int T; cin>>T;
	while(T--) get();
	return 0;
} 

詳細信息

Test #1:

score: 100
Accepted
time: 70ms
memory: 4004kb

input:

3
1 1 5000
1 1 1
1 2 10000

output:

4.0000000000
10141.5852891136
3.0000000000

result:

ok 3 numbers

Test #2:

score: 0
Accepted
time: 827ms
memory: 4048kb

input:

20
10 27 2855
79 59 6888
65 72 7725
78 50 2888
31 21 5759
41 58 6619
47 27 3881
35 55 5095
77 7 6028
17 89 1792
84 60 8604
58 44 4923
88 27 3824
54 63 1482
19 42 5366
93 76 97
100 99 8660
96 36 4343
90 56 9515
24 44 9922

output:

89.7298056505
200.3484320557
177.3462783172
416.8398778004
90.2934537246
149.5694213627
190.6725070858
164.6015211156
139.3497013935
275.1331102484
167.3640167364
207.1907373553
300.7322175732
589.0588489505
101.8770282124
10796.8872669046
229.7921478060
303.9373704812
153.4419337888
68.5345696432

result:

ok 20 numbers

Test #3:

score: 0
Accepted
time: 437ms
memory: 4012kb

input:

10
954269343 987322500 9806
916720797 981711601 9728
902477101 957414437 9250
967013471 988735825 9674
985383693 926528961 9411
970653208 917703218 9331
998423148 911924940 9283
986159007 902133513 9759
953796828 947934512 9959
995334734 931874197 9944

output:

1980003919.0291658168
1951513567.0230263158
2010693554.5945945946
2021655257.3909448005
2031572260.1211348422
2023744964.0981673989
2057899480.7713023807
1934924193.0525668614
1909560538.2066472537
1938062078.6403861626

result:

ok 10 numbers

Test #4:

score: 0
Accepted
time: 434ms
memory: 4072kb

input:

10
933722894 72 9673
975866948 5 9424
910984544 95 9682
994597175 6 9351
972675086 51 9712
952759975 51 9114
956482031 85 9478
921988922 72 9017
950640658 36 9893
965297247 78 9342

output:

965287879.6650470382
1035512471.3497453310
940905431.7289816153
1063626543.6851673618
1001518880.7660626029
1045380761.4658766732
1009160282.7600759654
1022500825.1081290895
960922565.4503184069
1033287652.5369299935

result:

ok 10 numbers

Test #5:

score: 0
Accepted
time: 264ms
memory: 4004kb

input:

10
910088095 81 316
970640211 35 537
908853334 41 89
932269507 8 457
953224740 22 113
959834859 69 34
924852390 63 115
952730384 97 382
917634328 91 20
937287266 32 654

output:

28800258734.1772151925
18075237355.6797020435
102118356741.5730339438
20399770568.9277899303
84356173628.3185841739
282304390588.2352963388
80421952434.7826085389
24940588507.8534031324
458817209500.0000028908
14331610061.1620795066

result:

ok 10 numbers

Test #6:

score: 0
Accepted
time: 272ms
memory: 3816kb

input:

10
968675373 962412132 104
923494255 934310785 381
922721350 957856460 282
978335370 917228676 825
951116860 942542480 359
999013758 972493824 676
930242700 964474169 342
968944030 984608304 520
965837594 909045242 369
990484700 925952624 479

output:

106669104052.2942859381
31076848077.7611116040
40771434362.8951464705
16579259543.3635332631
33660076568.7019471396
20209258011.5019213501
34581380127.3951082230
24798113234.3329600524
33145494087.7282868009
26925682159.1201055031

result:

ok 10 numbers

Test #7:

score: 0
Accepted
time: 269ms
memory: 4056kb

input:

10
22 972733171 975
22 973609752 512
55 987399854 126
49 967364929 642
23 948126474 513
25 962813818 421
93 933323422 113
58 950364131 647
82 991906690 682
31 957667404 402

output:

972736672.6812934418
973616306.9869359169
987457697.3967793246
967376069.3154853236
948133283.1016139328
962822722.6475790979
933426898.3177281949
950377057.3633431627
991923706.5853916611
957678776.9653454308

result:

ok 10 numbers

Test #8:

score: 0
Accepted
time: 433ms
memory: 4068kb

input:

10
47 972371220 9743
65 949941115 9400
86 921812690 9736
11 927065494 9182
71 923766617 9378
63 941828720 9029
96 917539847 9084
88 952051332 9499
91 958386812 9427
64 950375055 9887

output:

972371465.9017902687
949941549.3204729251
921813131.8212261270
927065583.8583901209
923767096.4939659917
941829231.4426227260
917540568.6470663585
952051875.0552152066
958387391.9210137959
950375326.4956188945

result:

ok 10 numbers

Test #9:

score: 0
Accepted
time: 435ms
memory: 3904kb

input:

10
98 46 9403
99 89 9661
80 62 9450
25 20 9283
68 74 9328
54 14 9286
4 80 9574
35 61 9420
77 47 9943
22 9 9358

output:

153.1426140593
194.5968326260
150.2645502646
48.4757082840
152.2298456261
73.2285160457
87.7376227282
101.9108280255
124.7108518556
33.1267364822

result:

ok 10 numbers

Test #10:

score: 0
Accepted
time: 272ms
memory: 4052kb

input:

10
89 77 65
53 41 913
47 67 488
89 13 267
20 60 427
58 72 690
23 60 677
43 38 775
52 68 343
83 61 805

output:

15149.2838382386
795.1959596787
1340.2626103173
3590.6475047324
734.4631078246
1204.0440417989
568.4325370470
761.4534497617
1986.6695583741
1378.1584483391

result:

ok 10 numbers

Test #11:

score: 0
Accepted
time: 528ms
memory: 4056kb

input:

20
5 1000000000 4
3 999999979 5
5 1000000000 2
2 999999999 4
3 999999983 1
3 999999984 1
3 999999987 3
3 999999974 1
2 999999998 1
1 999999981 2
4 999999971 4
3 999999992 1
5 999999973 4
4 999999984 4
3 999999972 4
2 999999994 4
2 999999980 5
4 999999970 5
2 999999980 2
4 999999983 4

output:

1000153595.9668460542
1000078103.9377190369
1000289896.6213884300
1000066017.4862779920
1000345375.9061622589
1000345376.9062076383
1000125100.2351018558
1000345366.9057538453
1000245386.3689136337
1000066005.5899477357
1000125078.4776289703
1000345384.9065706726
1000153568.9665087107
1000125091.477...

result:

ok 20 numbers

Test #12:

score: -100
Time Limit Exceeded

input:

10000
15 999999991 6
16 999999975 2
12 999999978 9
7 999999993 4
19 999999980 5
20 999999977 5
13 999999995 10
11 999999979 6
19 999999995 5
6 999999982 10
15 999999978 1
2 999999974 5
12 999999980 4
18 999999997 1
12 999999992 10
20 999999970 6
2 999999999 2
13 999999984 1
16 999999984 2
16 9999999...

output:

1000289834.6274338200
1000834644.9803735576
1000162916.0544203185
1000209141.2387603692
1000424660.5573016633
1000444958.7589435849
1000159181.2223668232
1000218214.1490877256
1000424675.5578713314
1000078088.8970948448
1001470863.7083149313
1000053678.6490806649
1000342357.1715582501
1001732290.589...

result: