QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#253697#1426. ExpmasterhuangAC ✓349ms81808kbC++20974b2023-11-17 12:00:002023-11-17 12:00:00

Judging History

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

  • [2023-11-17 12:00:00]
  • 评测
  • 测评结果:AC
  • 用时:349ms
  • 内存:81808kb
  • [2023-11-17 12:00:00]
  • 提交

answer

#include<bits/stdc++.h>
#define P pair<int,int>
#define fi first
#define se second
#define LL long long
#define fr(x) freopen(#x".in","r",stdin);freopen(#x".out","w",stdout);
using namespace std;
const int N=1e7+5,mod=998244353;
int n,K,x,a[105],b[N],I[N];long double X;
inline int md(int x){return x>=mod?x-mod:x;}
inline int ksm(int x,int p){int s=1;for(;p;(p&1)&&(s=1ll*s*x%mod),x=1ll*x*x%mod,p>>=1);return s;}
int main()
{
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin>>n>>K>>x;
	for(int i=0,y;i<=K;i++) cin>>X,y=round(X*10000),a[i]=796898467ll*y%mod;
	I[1]=1;for(int i=2;i<=x;i++) I[i]=mod-1ll*I[mod%i]*(mod/i)%mod;
	b[0]=ksm(a[0],n);int inv=ksm(a[0],mod-2);
	for(int i=0;i<x;i++)
	{
		int s=0;
		for(int j=1;j<=K&&j<=i+1;j++) s=(s+(1ll*(n+1)*j%mod-i-1+mod)*a[j]%mod*b[i-j+1])%mod;
		b[i+1]=1ll*s*inv%mod*I[i+1]%mod;
	}
	int t=1,ans=0;
	for(int i=0;i<x;i++) ans=(ans+1ll*i*b[i])%mod,t=md(t-b[i]+mod);
	return cout<<(ans+1ll*t*x)%mod,0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2 1 2
0.5000 0.5000

output:

1

result:

ok 1 number(s): "1"

Test #2:

score: 0
Accepted
time: 1ms
memory: 5612kb

input:

2 1 1
0.5000 0.5000

output:

249561089

result:

ok 1 number(s): "249561089"

Test #3:

score: 0
Accepted
time: 1ms
memory: 5572kb

input:

4 2 5
0.2000 0.5000 0.3000

output:

909700083

result:

ok 1 number(s): "909700083"

Test #4:

score: 0
Accepted
time: 1ms
memory: 5700kb

input:

10 4 23
0.4533 0.2906 0.1618 0.0071 0.0872

output:

433575862

result:

ok 1 number(s): "433575862"

Test #5:

score: 0
Accepted
time: 1ms
memory: 5612kb

input:

1 1 1
0.0765 0.9235

output:

299972429

result:

ok 1 number(s): "299972429"

Test #6:

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

input:

1 100 1
0.0072 0.0153 0.0002 0.0067 0.0035 0.0030 0.0013 0.0025 0.0090 0.0100 0.0173 0.0018 0.0072 0.0037 0.0078 0.0060 0.0083 0.0054 0.0069 0.0002 0.0143 0.0132 0.0101 0.0027 0.0167 0.0065 0.0051 0.0001 0.0175 0.0079 0.0107 0.0018 0.0017 0.0031 0.0130 0.0108 0.0050 0.0045 0.0322 0.0040 0.0043 0.009...

output:

521482851

result:

ok 1 number(s): "521482851"

Test #7:

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

input:

1 100 100
0.0048 0.0100 0.0025 0.0254 0.0183 0.0014 0.0188 0.0019 0.0197 0.0171 0.0127 0.0052 0.0038 0.0052 0.0014 0.0016 0.0133 0.0341 0.0014 0.0234 0.0073 0.0001 0.0088 0.0304 0.0032 0.0008 0.0046 0.0236 0.0039 0.0359 0.0023 0.0096 0.0392 0.0169 0.0018 0.0184 0.0051 0.0050 0.0190 0.0053 0.0034 0.0...

output:

276513735

result:

ok 1 number(s): "276513735"

Test #8:

score: 0
Accepted
time: 1ms
memory: 5648kb

input:

1 100 50
0.0011 0.0004 0.0044 0.0005 0.0126 0.0035 0.0099 0.0012 0.0069 0.0151 0.0106 0.0136 0.0036 0.0011 0.0129 0.0056 0.0048 0.0003 0.0047 0.0038 0.0043 0.0261 0.0028 0.0135 0.0153 0.0047 0.0003 0.0195 0.0084 0.0001 0.0133 0.0010 0.0077 0.0010 0.0027 0.0009 0.0369 0.0163 0.0063 0.0047 0.0176 0.00...

output:

892729966

result:

ok 1 number(s): "892729966"

Test #9:

score: 0
Accepted
time: 193ms
memory: 9368kb

input:

1 100 500000
0.0109 0.0243 0.0069 0.0016 0.0114 0.0102 0.0004 0.0004 0.0028 0.0023 0.0327 0.0016 0.0031 0.0022 0.0121 0.0052 0.0022 0.0015 0.0017 0.0008 0.0004 0.0115 0.0027 0.0385 0.0147 0.0025 0.0269 0.0018 0.0083 0.0124 0.0025 0.0053 0.0008 0.0043 0.0122 0.0041 0.0019 0.0163 0.0042 0.0016 0.0019 ...

output:

333912792

result:

ok 1 number(s): "333912792"

Test #10:

score: 0
Accepted
time: 65ms
memory: 6984kb

input:

8 72 228189
0.0008 0.0027 0.0315 0.0128 0.0225 0.0081 0.0300 0.0196 0.0036 0.0232 0.0034 0.0180 0.0096 0.0042 0.0371 0.0170 0.0018 0.0179 0.0341 0.0032 0.0233 0.0345 0.0270 0.0048 0.0053 0.0211 0.0091 0.0124 0.0005 0.0531 0.0218 0.0239 0.0208 0.0019 0.0050 0.0011 0.0356 0.0349 0.0037 0.0079 0.0275 0...

output:

569398839

result:

ok 1 number(s): "569398839"

Test #11:

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

input:

4 19 72
0.0476 0.0007 0.0782 0.0134 0.0315 0.0557 0.0190 0.0002 0.2025 0.0286 0.0470 0.0353 0.1561 0.0025 0.0498 0.1487 0.0093 0.0008 0.0376 0.0355

output:

823827368

result:

ok 1 number(s): "823827368"

Test #12:

score: 0
Accepted
time: 49ms
memory: 6376kb

input:

47 65 187288
0.0020 0.0243 0.0276 0.0448 0.0076 0.0544 0.0145 0.0051 0.0019 0.0003 0.0048 0.0069 0.0050 0.0487 0.0403 0.0019 0.0060 0.0023 0.0017 0.0023 0.0073 0.0003 0.0029 0.0015 0.0114 0.0055 0.0020 0.0081 0.0416 0.0079 0.0085 0.0657 0.0257 0.0012 0.0539 0.0112 0.0131 0.0120 0.0177 0.0162 0.0345 ...

output:

621109149

result:

ok 1 number(s): "621109149"

Test #13:

score: 0
Accepted
time: 2ms
memory: 5576kb

input:

59 66 3151
0.0008 0.0216 0.0292 0.0429 0.0015 0.0034 0.0048 0.0212 0.0092 0.0022 0.0184 0.0034 0.0132 0.0090 0.0184 0.0149 0.0014 0.0130 0.0069 0.0482 0.0342 0.0026 0.0035 0.0033 0.0007 0.0250 0.0133 0.0341 0.0086 0.0186 0.0009 0.0354 0.0050 0.0324 0.0055 0.0148 0.0204 0.0053 0.0286 0.0207 0.0155 0....

output:

303091183

result:

ok 1 number(s): "303091183"

Test #14:

score: 0
Accepted
time: 82ms
memory: 8752kb

input:

180 32 660230
0.0030 0.0559 0.1585 0.0189 0.0250 0.0313 0.0043 0.0212 0.0238 0.0312 0.0031 0.0218 0.0530 0.0102 0.0161 0.0162 0.0008 0.0643 0.0210 0.0098 0.0018 0.0124 0.0254 0.0012 0.0358 0.0280 0.0027 0.0613 0.0669 0.0908 0.0026 0.0674 0.0143

output:

213627137

result:

ok 1 number(s): "213627137"

Test #15:

score: 0
Accepted
time: 7ms
memory: 5840kb

input:

825 97 24822
0.0007 0.0128 0.0072 0.0105 0.0015 0.0065 0.0092 0.0034 0.0616 0.0136 0.0005 0.0007 0.0289 0.0037 0.0226 0.0122 0.0028 0.0490 0.0054 0.0007 0.0024 0.0020 0.0078 0.0139 0.0285 0.0292 0.0156 0.0070 0.0054 0.0009 0.0016 0.0343 0.0032 0.0088 0.0006 0.0031 0.0013 0.0010 0.0178 0.0102 0.0077 ...

output:

751468909

result:

ok 1 number(s): "751468909"

Test #16:

score: 0
Accepted
time: 105ms
memory: 8380kb

input:

8457 70 393095
0.0086 0.0013 0.0439 0.0011 0.0031 0.0046 0.0141 0.0029 0.0072 0.0236 0.0047 0.0057 0.0125 0.0087 0.0033 0.0344 0.0194 0.0149 0.0015 0.0238 0.0060 0.0006 0.0318 0.0099 0.0039 0.0886 0.0100 0.0513 0.0008 0.0048 0.0192 0.0183 0.0329 0.0306 0.0209 0.0127 0.0011 0.0004 0.0014 0.0718 0.023...

output:

287615827

result:

ok 1 number(s): "287615827"

Test #17:

score: 0
Accepted
time: 26ms
memory: 5968kb

input:

2813 100 64953
0.0135 0.0052 0.0002 0.0199 0.0031 0.0090 0.0010 0.0019 0.0079 0.0016 0.0232 0.0095 0.0027 0.0183 0.0011 0.0049 0.0039 0.0057 0.0111 0.0088 0.0068 0.0591 0.0290 0.0011 0.0172 0.0185 0.0021 0.0093 0.0048 0.0146 0.0205 0.0174 0.0004 0.0175 0.0020 0.0279 0.0084 0.0049 0.0201 0.0025 0.000...

output:

888752966

result:

ok 1 number(s): "888752966"

Test #18:

score: 0
Accepted
time: 112ms
memory: 12248kb

input:

28076 23 1109371
0.0271 0.0007 0.0611 0.0134 0.0876 0.0115 0.0895 0.0136 0.0992 0.0761 0.0225 0.0012 0.0576 0.0397 0.0006 0.0128 0.0070 0.1054 0.0005 0.0209 0.1228 0.0670 0.0187 0.0435

output:

977815323

result:

ok 1 number(s): "977815323"

Test #19:

score: 0
Accepted
time: 93ms
memory: 8808kb

input:

11532 49 500231
0.0634 0.0079 0.0355 0.0156 0.0313 0.0148 0.0050 0.0156 0.0045 0.0155 0.0088 0.0747 0.0203 0.0453 0.0008 0.0345 0.0164 0.0191 0.0181 0.0126 0.0040 0.0135 0.0090 0.0008 0.0280 0.0060 0.0102 0.0239 0.0067 0.0002 0.0225 0.0207 0.0089 0.0578 0.0454 0.0274 0.0111 0.0287 0.0236 0.0058 0.03...

output:

765424220

result:

ok 1 number(s): "765424220"

Test #20:

score: 0
Accepted
time: 166ms
memory: 8680kb

input:

905859 82 512437
0.0046 0.0022 0.0053 0.0003 0.0034 0.0055 0.0127 0.0066 0.0091 0.0477 0.0485 0.0031 0.0079 0.0128 0.0046 0.0018 0.0253 0.0234 0.0145 0.0116 0.0112 0.0036 0.0021 0.0144 0.0257 0.0017 0.0115 0.0133 0.0370 0.0050 0.0050 0.0112 0.0151 0.0291 0.0002 0.0194 0.0026 0.0081 0.0002 0.0031 0.0...

output:

305815667

result:

ok 1 number(s): "305815667"

Test #21:

score: 0
Accepted
time: 87ms
memory: 10636kb

input:

726087 22 903003
0.0211 0.0269 0.0082 0.0049 0.0372 0.0207 0.0421 0.0592 0.0257 0.0048 0.1405 0.0722 0.2035 0.0197 0.1515 0.0085 0.0272 0.0037 0.0030 0.0288 0.0281 0.0213 0.0412

output:

165751013

result:

ok 1 number(s): "165751013"

Test #22:

score: 0
Accepted
time: 91ms
memory: 15196kb

input:

8499639 12 1484189
0.0008 0.0178 0.0426 0.1374 0.0315 0.0325 0.1429 0.1461 0.0152 0.1629 0.1879 0.0092 0.0732

output:

956102781

result:

ok 1 number(s): "956102781"

Test #23:

score: 0
Accepted
time: 26ms
memory: 5868kb

input:

7975090 80 80834
0.0503 0.0007 0.0018 0.0064 0.0451 0.0290 0.0086 0.0265 0.0225 0.0009 0.0008 0.0027 0.0116 0.0017 0.0097 0.0104 0.0055 0.0041 0.0263 0.0012 0.0069 0.0036 0.0111 0.0049 0.0141 0.0041 0.0140 0.0357 0.0008 0.0089 0.0124 0.0036 0.0009 0.0188 0.0034 0.0046 0.0078 0.0119 0.0291 0.0328 0.0...

output:

830002618

result:

ok 1 number(s): "830002618"

Test #24:

score: 0
Accepted
time: 214ms
memory: 74144kb

input:

9480464 1 9037245
0.5272 0.4728

output:

826765004

result:

ok 1 number(s): "826765004"

Test #25:

score: 0
Accepted
time: 247ms
memory: 81696kb

input:

10000000 1 10000000
0.2742 0.7258

output:

7258000

result:

ok 1 number(s): "7258000"

Test #26:

score: 0
Accepted
time: 260ms
memory: 75444kb

input:

9408749 2 9201087
0.6648 0.2247 0.1105

output:

421398208

result:

ok 1 number(s): "421398208"

Test #27:

score: 0
Accepted
time: 252ms
memory: 81676kb

input:

10000000 2 10000000
0.1573 0.7937 0.0490

output:

557818845

result:

ok 1 number(s): "557818845"

Test #28:

score: 0
Accepted
time: 256ms
memory: 74036kb

input:

9499951 3 9029606
0.0616 0.5319 0.2706 0.1359

output:

284414453

result:

ok 1 number(s): "284414453"

Test #29:

score: 0
Accepted
time: 299ms
memory: 81808kb

input:

10000000 3 10000000
0.0602 0.4809 0.1313 0.3276

output:

600502291

result:

ok 1 number(s): "600502291"

Test #30:

score: 0
Accepted
time: 320ms
memory: 75908kb

input:

9238967 4 9255431
0.3568 0.1637 0.3758 0.1036 0.0001

output:

380750818

result:

ok 1 number(s): "380750818"

Test #31:

score: 0
Accepted
time: 341ms
memory: 81708kb

input:

10000000 4 10000000
0.0806 0.3086 0.0944 0.4684 0.0480

output:

845020796

result:

ok 1 number(s): "845020796"

Test #32:

score: 0
Accepted
time: 343ms
memory: 75596kb

input:

9237551 5 9208267
0.0989 0.0964 0.2189 0.3467 0.1859 0.0532

output:

697888991

result:

ok 1 number(s): "697888991"

Test #33:

score: 0
Accepted
time: 349ms
memory: 81696kb

input:

10000000 5 10000000
0.0462 0.0281 0.0829 0.0999 0.6869 0.0560

output:

727452959

result:

ok 1 number(s): "727452959"

Test #34:

score: 0
Accepted
time: 320ms
memory: 64160kb

input:

9093059 6 7754196
0.0258 0.0217 0.1677 0.0923 0.6137 0.0603 0.0185

output:

434249728

result:

ok 1 number(s): "434249728"

Test #35:

score: 0
Accepted
time: 321ms
memory: 68680kb

input:

10000000 6 8333333
0.1267 0.0649 0.0573 0.4131 0.0151 0.0824 0.2405

output:

172212898

result:

ok 1 number(s): "172212898"

Test #36:

score: 0
Accepted
time: 293ms
memory: 50272kb

input:

9157664 8 5974939
0.0200 0.1643 0.0320 0.0376 0.1054 0.0298 0.1281 0.1269 0.3559

output:

488754805

result:

ok 1 number(s): "488754805"

Test #37:

score: 0
Accepted
time: 301ms
memory: 52480kb

input:

10000000 8 6250000
0.0007 0.3504 0.0341 0.2721 0.0347 0.0699 0.0196 0.0747 0.1438

output:

152187512

result:

ok 1 number(s): "152187512"

Test #38:

score: 0
Accepted
time: 244ms
memory: 41364kb

input:

9643755 10 4838939
0.0577 0.0128 0.0179 0.0816 0.1283 0.2276 0.0524 0.0636 0.2163 0.0764 0.0654

output:

860514323

result:

ok 1 number(s): "860514323"

Test #39:

score: 0
Accepted
time: 267ms
memory: 42712kb

input:

10000000 10 5000000
0.0462 0.0430 0.0013 0.0821 0.1555 0.0537 0.3115 0.1085 0.0693 0.0210 0.1079

output:

556648020

result:

ok 1 number(s): "556648020"

Test #40:

score: 0
Accepted
time: 230ms
memory: 31024kb

input:

9430407 13 3503480
0.0867 0.0547 0.0544 0.1939 0.0569 0.0298 0.0413 0.0210 0.0024 0.0075 0.0214 0.0575 0.1853 0.1872

output:

246746208

result:

ok 1 number(s): "246746208"

Test #41:

score: 0
Accepted
time: 245ms
memory: 33644kb

input:

10000000 13 3846153
0.0135 0.0892 0.0039 0.1196 0.0245 0.0786 0.0590 0.1186 0.1014 0.0037 0.0933 0.2125 0.0486 0.0336

output:

529062347

result:

ok 1 number(s): "529062347"

Test #42:

score: 0
Accepted
time: 211ms
memory: 20068kb

input:

9488718 23 2100474
0.0440 0.0098 0.0819 0.0003 0.0793 0.1373 0.0394 0.0442 0.0136 0.0286 0.0101 0.0313 0.1401 0.0560 0.0426 0.0162 0.0082 0.1168 0.0012 0.0382 0.0122 0.0286 0.0178 0.0023

output:

686163187

result:

ok 1 number(s): "686163187"

Test #43:

score: 0
Accepted
time: 222ms
memory: 20692kb

input:

10000000 23 2173913
0.0020 0.0382 0.0291 0.0478 0.1207 0.0255 0.0649 0.0399 0.0174 0.0243 0.0004 0.0195 0.1383 0.0398 0.0530 0.0092 0.0452 0.0503 0.0060 0.0587 0.0532 0.0968 0.0146 0.0052

output:

769614978

result:

ok 1 number(s): "769614978"

Test #44:

score: 0
Accepted
time: 198ms
memory: 12668kb

input:

9129292 42 1164096
0.0178 0.0044 0.0538 0.0015 0.0126 0.0291 0.0145 0.0052 0.0400 0.0262 0.0108 0.0056 0.0537 0.0022 0.0327 0.0180 0.0647 0.0306 0.0008 0.0453 0.0054 0.0554 0.0045 0.0031 0.0257 0.0003 0.0489 0.0466 0.0180 0.0046 0.0451 0.0175 0.0030 0.0148 0.0155 0.0052 0.0084 0.0582 0.0049 0.0201 0...

output:

131238057

result:

ok 1 number(s): "131238057"

Test #45:

score: 0
Accepted
time: 202ms
memory: 13000kb

input:

10000000 42 1190476
0.0011 0.0090 0.0645 0.0010 0.0239 0.0379 0.0098 0.0180 0.0480 0.0278 0.0083 0.0506 0.0152 0.0331 0.0038 0.0066 0.0114 0.0489 0.0155 0.0222 0.0199 0.0604 0.0091 0.0586 0.0034 0.0287 0.0018 0.0124 0.0410 0.0262 0.0202 0.0591 0.0153 0.0095 0.0034 0.0236 0.0002 0.0038 0.0367 0.0315 ...

output:

58257995

result:

ok 1 number(s): "58257995"

Test #46:

score: 0
Accepted
time: 186ms
memory: 10392kb

input:

9746215 58 816167
0.0298 0.0119 0.0009 0.0130 0.0360 0.0113 0.0057 0.0091 0.0200 0.0066 0.0281 0.0104 0.0222 0.0102 0.0144 0.0095 0.0025 0.0039 0.0098 0.0014 0.0471 0.0335 0.0012 0.0019 0.0320 0.0050 0.0054 0.0139 0.0027 0.0237 0.0474 0.0121 0.0015 0.0322 0.0049 0.0133 0.0176 0.0156 0.0394 0.0105 0....

output:

517368042

result:

ok 1 number(s): "517368042"

Test #47:

score: 0
Accepted
time: 199ms
memory: 10392kb

input:

10000000 58 862068
0.0039 0.0155 0.0022 0.0277 0.0082 0.0161 0.0120 0.0090 0.0335 0.0048 0.0288 0.0444 0.0017 0.0163 0.0073 0.0060 0.0271 0.0146 0.0106 0.0121 0.0070 0.0097 0.0033 0.0680 0.0143 0.0101 0.0164 0.0418 0.0175 0.0038 0.0134 0.0551 0.0184 0.0265 0.0318 0.0045 0.0151 0.0029 0.0056 0.0941 0...

output:

392555453

result:

ok 1 number(s): "392555453"

Test #48:

score: 0
Accepted
time: 177ms
memory: 8312kb

input:

9511592 77 599440
0.0265 0.0233 0.0064 0.0018 0.0168 0.0114 0.0144 0.0021 0.0019 0.0024 0.0235 0.0075 0.0124 0.0149 0.0237 0.0254 0.0066 0.0142 0.0036 0.0271 0.0054 0.0037 0.0039 0.0128 0.0047 0.0332 0.0188 0.0075 0.0066 0.0085 0.0153 0.0018 0.0086 0.0134 0.0447 0.0100 0.0055 0.0007 0.0096 0.0458 0....

output:

255364549

result:

ok 1 number(s): "255364549"

Test #49:

score: 0
Accepted
time: 192ms
memory: 9988kb

input:

10000000 77 649350
0.0013 0.0035 0.0045 0.0175 0.0007 0.0067 0.0117 0.0258 0.0097 0.0375 0.0193 0.0035 0.0270 0.0108 0.0049 0.0017 0.0003 0.0078 0.0530 0.0190 0.0236 0.0010 0.0311 0.0212 0.0024 0.0277 0.0111 0.0016 0.0349 0.0012 0.0014 0.0060 0.0015 0.0188 0.0136 0.0085 0.0023 0.0033 0.0036 0.0072 0...

output:

862935731

result:

ok 1 number(s): "862935731"

Test #50:

score: 0
Accepted
time: 184ms
memory: 9316kb

input:

9173503 93 520742
0.0166 0.0009 0.0067 0.0415 0.0026 0.0008 0.0018 0.0032 0.0111 0.0046 0.0224 0.0236 0.0068 0.0060 0.0021 0.0132 0.0039 0.0092 0.0081 0.0161 0.0074 0.0005 0.0208 0.0168 0.0094 0.0167 0.0391 0.0347 0.0015 0.0104 0.0011 0.0419 0.0007 0.0444 0.0006 0.0034 0.0014 0.0445 0.0103 0.0072 0....

output:

745354191

result:

ok 1 number(s): "745354191"

Test #51:

score: 0
Accepted
time: 193ms
memory: 8172kb

input:

10000000 93 537634
0.0075 0.0013 0.0192 0.0492 0.0025 0.0032 0.0068 0.0019 0.0057 0.0059 0.0009 0.0275 0.0185 0.0073 0.0009 0.0102 0.0125 0.0375 0.0458 0.0432 0.0028 0.0041 0.0057 0.0019 0.0120 0.0015 0.0036 0.0113 0.0042 0.0108 0.0002 0.0008 0.0029 0.0037 0.0054 0.0028 0.0125 0.0067 0.0019 0.0156 0...

output:

330711029

result:

ok 1 number(s): "330711029"

Test #52:

score: 0
Accepted
time: 171ms
memory: 7616kb

input:

9785931 100 450201
0.0194 0.0060 0.0097 0.0013 0.0095 0.0200 0.0008 0.0005 0.0040 0.0175 0.0115 0.0101 0.0053 0.0005 0.0077 0.0043 0.0059 0.0091 0.0092 0.0042 0.0148 0.0052 0.0105 0.0153 0.0079 0.0065 0.0098 0.0092 0.0129 0.0094 0.0421 0.0030 0.0089 0.0189 0.0161 0.0357 0.0022 0.0067 0.0026 0.0166 0...

output:

140929335

result:

ok 1 number(s): "140929335"

Test #53:

score: 0
Accepted
time: 189ms
memory: 8768kb

input:

10000000 100 500000
0.0285 0.0181 0.0006 0.0016 0.0104 0.0115 0.0119 0.0060 0.0207 0.0174 0.0337 0.0061 0.0025 0.0250 0.0022 0.0071 0.0056 0.0044 0.0251 0.0025 0.0060 0.0320 0.0027 0.0040 0.0089 0.0204 0.0047 0.0091 0.0015 0.0010 0.0030 0.0023 0.0046 0.0069 0.0065 0.0008 0.0008 0.0144 0.0165 0.0028 ...

output:

102032866

result:

ok 1 number(s): "102032866"