QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#340997#1426. ExprageOfThunder#AC ✓410ms160040kbC++142.1kb2024-02-29 14:53:552024-02-29 14:53:56

Judging History

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

  • [2024-02-29 14:53:56]
  • 评测
  • 测评结果:AC
  • 用时:410ms
  • 内存:160040kb
  • [2024-02-29 14:53:55]
  • 提交

answer

#include<bits/stdc++.h>

#define ll long long
#define mk make_pair
#define fi first
#define se second

using namespace std;

inline int read(){
	int x=0,f=1;char c=getchar();
	for(;(c<'0'||c>'9');c=getchar()){if(c=='-')f=-1;}
	for(;(c>='0'&&c<='9');c=getchar())x=x*10+(c&15);
	return x*f;
}

const int mod=998244353;
int ksm(int x,ll y,int p=mod){
	int ans=1;y%=(p-1);
	for(int i=y;i;i>>=1,x=1ll*x*x%p)if(i&1)ans=1ll*ans*x%p;
	return ans%p;
}
int inv(int x,int p=mod){return ksm(x,p-2,p)%p;}
mt19937 rnd(time(0));
int randint(int l,int r){return rnd()%(r-l+1)+l;}
void add(int &x,int v){x+=v;if(x>=mod)x-=mod;}
void Mod(int &x){if(x>=mod)x-=mod;}
int cmod(int x){if(x>=mod)x-=mod;return x;}

template<typename T>void cmax(T &x,T v){x=max(x,v);}
template<typename T>void cmin(T &x,T v){x=min(x,v);}

const int N=1e7+5;
const int K=105;
int f[K],ff[K],fn[N];
int n,k,m;

int fac[N],ifac[N],Inv[N];
void init(int V){
	fac[0]=1;for(int i=1;i<=V;i++)fac[i]=1ll*fac[i-1]*i%mod;
	ifac[V]=inv(fac[V])%mod;for(int i=V-1;i>=0;i--)ifac[i]=1ll*ifac[i+1]*(i+1)%mod;
	for(int i=1;i<=V;i++)Inv[i]=1ll*fac[i-1]*ifac[i]%mod;
}

signed main(void){

#ifndef ONLINE_JUDGE
	freopen("in.in","r",stdin);
#endif

	n=read(),k=read(),m=read();init(N-5);
	for(int i=0;i<=k;i++){f[i]=read();f[i]=1ll*read()*inv(10000)%mod;}
	for(int i=1;i<=k;i++)ff[i-1]=1ll*i*f[i]%mod;
	
//	cout<<"f = ";for(int i=0;i<=k;i++)cout<<f[i]<<" \n"[i==k];
	
	fn[0]=ksm(f[0],n);int Iv=inv(f[0]);
//	cout<<"f^n "<<0<<" = "<<fn[0]<<endl;
	for(int t=0;t<=m-1;t++){
		int res=0;
		for(int i=0;i<=min(t,k-1);i++)add(res,1ll*ff[i]*fn[t-i]%mod);
//		cout<<"res = "<<res<<endl;
		res=1ll*res*n%mod;
//		cout<<" res = "<<res<<endl;
		for(int i=1;i<=min(t,k);i++)add(res,mod-1ll*f[i]*(t-i+1)%mod*fn[t-i+1]%mod);
//		cout<<"  res = "<<res<<endl;
		res=1ll*res*Iv%mod;fn[t+1]=1ll*res*Inv[t+1]%mod;
		
//		cout<<" -> f^n "<<t+1<<" = "<<fn[t+1]<<endl;
	}
	
	int ans=0,pr=0;
	for(int i=0;i<=m;i++)add(ans,1ll*fn[i]*i%mod),add(pr,fn[i]);
	add(ans,1ll*m*(mod+1-pr)%mod);
	
	cout<<ans<<endl;

	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 96ms
memory: 121164kb

input:

2 1 2
0.5000 0.5000

output:

1

result:

ok 1 number(s): "1"

Test #2:

score: 0
Accepted
time: 97ms
memory: 121080kb

input:

2 1 1
0.5000 0.5000

output:

249561089

result:

ok 1 number(s): "249561089"

Test #3:

score: 0
Accepted
time: 94ms
memory: 121468kb

input:

4 2 5
0.2000 0.5000 0.3000

output:

909700083

result:

ok 1 number(s): "909700083"

Test #4:

score: 0
Accepted
time: 88ms
memory: 121528kb

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: 88ms
memory: 122024kb

input:

1 1 1
0.0765 0.9235

output:

299972429

result:

ok 1 number(s): "299972429"

Test #6:

score: 0
Accepted
time: 88ms
memory: 122344kb

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: 106ms
memory: 121728kb

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: 92ms
memory: 122108kb

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: 306ms
memory: 124564kb

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: 157ms
memory: 123792kb

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: 78ms
memory: 122108kb

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: 142ms
memory: 122456kb

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: 98ms
memory: 121692kb

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: 186ms
memory: 124688kb

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: 102ms
memory: 121940kb

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: 210ms
memory: 124268kb

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: 123ms
memory: 121824kb

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: 202ms
memory: 126960kb

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: 195ms
memory: 123356kb

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: 274ms
memory: 122960kb

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: 178ms
memory: 126200kb

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: 173ms
memory: 128748kb

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: 127ms
memory: 121796kb

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: 293ms
memory: 156220kb

input:

9480464 1 9037245
0.5272 0.4728

output:

826765004

result:

ok 1 number(s): "826765004"

Test #25:

score: 0
Accepted
time: 305ms
memory: 159976kb

input:

10000000 1 10000000
0.2742 0.7258

output:

7258000

result:

ok 1 number(s): "7258000"

Test #26:

score: 0
Accepted
time: 318ms
memory: 157004kb

input:

9408749 2 9201087
0.6648 0.2247 0.1105

output:

421398208

result:

ok 1 number(s): "421398208"

Test #27:

score: 0
Accepted
time: 331ms
memory: 160036kb

input:

10000000 2 10000000
0.1573 0.7937 0.0490

output:

557818845

result:

ok 1 number(s): "557818845"

Test #28:

score: 0
Accepted
time: 317ms
memory: 156192kb

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: 350ms
memory: 160040kb

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: 351ms
memory: 157072kb

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: 382ms
memory: 159976kb

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: 372ms
memory: 156888kb

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: 410ms
memory: 159976kb

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: 357ms
memory: 152096kb

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: 388ms
memory: 154716kb

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: 358ms
memory: 144376kb

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: 378ms
memory: 145724kb

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: 348ms
memory: 141304kb

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: 357ms
memory: 140720kb

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: 308ms
memory: 135440kb

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: 333ms
memory: 137356kb

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: 316ms
memory: 130444kb

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: 316ms
memory: 130488kb

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: 300ms
memory: 126528kb

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: 296ms
memory: 127616kb

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: 287ms
memory: 124396kb

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: 304ms
memory: 124352kb

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: 277ms
memory: 124100kb

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: 300ms
memory: 123860kb

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: 285ms
memory: 123964kb

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: 295ms
memory: 124552kb

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: 263ms
memory: 124076kb

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: 294ms
memory: 124052kb

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"