QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#72293#4401. Prizechenshi100 ✓998ms195116kbC++1.9kb2023-01-15 12:40:122023-01-15 12:40:14

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-15 12:40:14]
  • 评测
  • 测评结果:100
  • 用时:998ms
  • 内存:195116kb
  • [2023-01-15 12:40:12]
  • 提交

answer

#include<iostream>
#include<algorithm>
using namespace std;
const int o=1e6+10;
int n,K,q,T,ax[o],ay[o];
struct Edge{int v,p,w;};
struct Tree{
	int rt,fa[o],h[o],cnt,H[o],Cnt,tp[o],seq[o],dfn[o],s[o],hs[o],d[o],dep[o];bool vis[o];Edge e[o],E[o*4];
	inline void ad(int U,int V){e[++cnt].v=V;e[cnt].p=h[U];h[U]=cnt;}
	inline void Ad(int U,int V,int W){E[++Cnt].v=V;E[Cnt].p=H[U];E[H[U]=Cnt].w=W;}
	inline void add(int U,int V,int W){Ad(U,V,W);Ad(V,U,-W);}
	void Dfs(int nw){
		s[nw]=1;
		for(int i=h[nw];i;i=e[i].p)
			d[e[i].v]=d[nw]+1,Dfs(e[i].v),s[nw]+=s[e[i].v],hs[nw]=(s[hs[nw]]>s[e[i].v]?hs[nw]:e[i].v);
	}
	void dfs(int nw,int ld){
		tp[nw]=ld;seq[dfn[nw]=++cnt]=nw;
		if(hs[nw]) dfs(hs[nw],ld);
		for(int i=h[nw];i;i=e[i].p) if(e[i].v^hs[nw]) dfs(e[i].v,e[i].v);
	}
	inline void init(){
		for(int i=1;i<=n;++i){
			cin>>fa[i];
			if(fa[i]>0) ad(fa[i],i);
			else rt=i;
		}
		Dfs(rt);cnt=0;dfs(rt,rt);
	}
	inline int lca(int x,int y){
		for(;tp[x]^tp[y];x=fa[tp[x]]) if(d[tp[x]]<d[tp[y]]) swap(x,y);
		return (d[x]<d[y])?x:y;
	}
	void ddfs(int nw){vis[nw]=1;for(int i=H[nw];i;i=E[i].p) if(!vis[E[i].v]) dep[E[i].v]=dep[nw]+E[i].w,ddfs(E[i].v);}
	inline int dis(int x,int y){return dep[x]+dep[y]-dep[lca(x,y)]*2;}
}T1,T2;
inline bool cmp(int A,int B){return T2.dfn[A]<T2.dfn[B];}
int main(){
	ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	cin>>n>>K>>q>>T;T1.init();T2.init();
	for(int i=1;i<=K;++i) cout<<T1.seq[i]<<" ";
	cout<<endl;
	sort(T1.seq+1,T1.seq+K+1,cmp);
	for(int i=1;i<K;++i) cout<<"? "<<T1.seq[i]<<" "<<T1.seq[i+1]<<"\n";
	cout<<"!"<<endl;
	for(int i=1,x,y,l1,l2,w;i<K;++i)
		x=T1.seq[i],y=T1.seq[i+1],l1=T1.lca(x,y),l2=T2.lca(x,y),
		cin>>w,T1.add(l1,x,w),cin>>w,T1.add(l1,y,w),cin>>w,T2.add(l2,x,w),cin>>w,T2.add(l2,y,w);
	T1.ddfs(T1.seq[1]);T2.ddfs(T1.seq[1]);
	for(int i=1;i<=T;++i) cin>>ax[i]>>ay[i];
	for(int i=1;i<=T;++i) cout<<T1.dis(ax[i],ay[i])<<" "<<T2.dis(ax[i],ay[i])<<"\n";
	cout<<endl;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 438ms
memory: 143236kb

input:

500000 64682 64681 100000
46115
470589
209303
2979
473162
343535
79503
299539
404621
102085
237721
279170
392890
165201
441593
456314
218991
358478
86614
410800
159785
169761
95368
285837
297549
370283
378974
26449
444381
39320
149913
404523
144109
174828
263837
49847
468694
478535
152644
216598
301...

output:

422989 414496 290928 388223 160563 301045 470257 259625 222733 231286 345214 169817 435263 277447 386014 210139 455433 225855 264772 199736 355788 288506 233893 146148 454958 267562 498596 183745 352665 151125 266374 43142 9414 204593 212097 311775 25324 300764 6643 94847 396968 428563 311355 255767...

result:

ok good job!

Test #2:

score: 0
Accepted
time: 438ms
memory: 140748kb

input:

500000 90967 90966 100000
122547
312039
290084
118442
352297
175176
294396
496975
127062
90539
132654
408480
493670
419897
53432
141795
264165
60368
473480
5634
253119
64236
85346
422987
28583
262389
111931
271291
13577
415079
132797
256502
76402
265607
11274
289667
398726
32021
302401
410650
369760...

output:

3090 193269 3028 186608 498475 64618 82114 231445 7541 329983 134623 235591 70401 18906 403427 280451 146897 355174 160090 144279 193430 332022 488244 228900 80781 84465 218682 27818 6035 368489 155673 440755 443926 241570 193717 143661 374105 56616 323329 95909 337798 20531 236329 28564 437244 4969...

result:

ok good job!

Test #3:

score: 0
Accepted
time: 432ms
memory: 94540kb

input:

500000 68287 68286 100000
273928
229768
65518
144983
311611
494773
489379
439644
467893
456131
430188
247387
485565
272285
474827
476962
338340
365804
344570
390867
390170
456217
43185
447057
385874
305750
107742
230530
259907
252254
280920
16831
45761
185191
117450
55891
175190
255615
35904
14855
2...

output:

242387 339454 497922 201163 474669 26464 481148 316750 450339 21547 419006 345058 85434 22138 317872 165853 423690 413507 470866 445053 471167 370637 457924 456466 227392 10605 209779 117822 188485 440967 431972 82148 180932 384936 409699 116022 262898 483926 202498 422821 376604 343665 434926 32197...

result:

ok good job!

Test #4:

score: 0
Accepted
time: 413ms
memory: 93356kb

input:

500000 63976 63975 100000
230132
63748
303785
13497
431672
370351
360004
412191
378555
409703
485802
218204
475692
27602
220794
398856
89157
166559
116145
350738
277404
196706
40307
118602
171802
378360
389092
485168
224465
383516
33147
322617
254917
274019
57283
272241
216098
421952
489927
75641
40...

output:

210552 1449 320642 372383 262729 281250 39370 30507 7571 32979 107 69216 303978 8420 124374 467448 269357 232509 496783 288663 459729 302050 172868 424536 230951 280026 395414 183022 403261 157066 473330 379135 381718 227946 276281 45521 415003 168156 150631 243148 301260 195630 1352 129462 197961 1...

result:

ok good job!

Test #5:

score: 0
Accepted
time: 424ms
memory: 93224kb

input:

500000 87673 87672 100000
151599
456749
347511
703
348209
260440
488627
416030
419890
408089
83617
120781
133411
374231
460689
211838
137587
252914
392401
321583
55161
335205
334340
4527
14086
142229
197076
17695
262896
258702
273353
51181
10968
366799
324067
299421
281975
7236
420627
92324
299845
1...

output:

51300 74889 382285 63865 132781 53691 488798 168564 224453 362423 119973 22799 414679 196987 452355 299553 250068 233210 172748 5621 274694 463465 248488 150320 333855 158357 156472 382284 217187 465047 280100 23928 337004 313309 238165 471339 273051 451756 157213 135155 303241 99898 310337 472255 3...

result:

ok good job!

Test #6:

score: 0
Accepted
time: 426ms
memory: 108292kb

input:

500000 77912 77911 100000
270576
129318
366297
25873
179787
473782
221947
331327
209469
412992
410608
286179
37554
355546
297085
420463
496948
223036
122019
151250
478469
468136
19073
318549
398897
364415
23730
407160
26064
436939
30150
336421
375149
131841
58480
259944
117641
414831
64311
336164
31...

output:

210887 450513 372367 243217 17878 393825 463407 324697 246607 415699 193455 464346 34314 337722 389758 398573 961 150261 11366 431566 348482 426544 62168 402483 378539 193152 58656 464684 494519 390067 339840 385119 273679 473724 265624 54661 280376 405045 456676 370595 196033 263134 190021 243754 2...

result:

ok good job!

Test #7:

score: 0
Accepted
time: 360ms
memory: 112120kb

input:

500000 77688 77687 100000
433011
472346
395389
187114
436024
138403
189990
398859
136147
195283
331183
46789
19828
335128
387768
442181
65556
72327
318927
462834
421288
227912
37067
387794
145879
258896
185861
356020
202881
490952
443694
95413
137215
137239
112863
481338
167802
304239
309781
391976
...

output:

176419 131882 35390 373863 204978 443479 492305 157831 85371 217598 310810 104348 344506 18218 34919 284048 375157 93215 437374 179027 246201 105486 90705 261692 432138 60063 214041 101698 415529 126781 367122 36224 346513 351518 104123 456286 93719 361257 433265 427613 233241 73489 455345 86243 286...

result:

ok good job!

Test #8:

score: 0
Accepted
time: 418ms
memory: 100084kb

input:

500000 70973 70972 100000
449081
8094
7358
89457
426121
454508
470543
485236
63347
441977
422774
88672
243638
499709
170209
157788
229166
106888
228931
289706
435222
496384
381579
323479
499140
1511
385050
44171
413854
248273
352221
305112
24289
277461
391744
395003
85800
396455
355110
186446
285096...

output:

449195 359470 62857 516 49116 212775 238351 344036 287306 191612 27113 107127 151520 273425 250496 60335 369915 324800 64090 294847 116290 472262 346162 294387 394563 459841 489754 10232 282110 452952 212602 190468 18187 304310 65407 436452 81924 67075 130414 319607 304506 80799 215666 222467 329086...

result:

ok good job!

Test #9:

score: 0
Accepted
time: 383ms
memory: 93568kb

input:

500000 66403 66402 100000
297237
432967
138046
88503
315699
372893
55309
335404
127581
165919
247543
254268
285147
289728
275281
44427
94393
302830
489861
429097
425153
11083
439096
414157
386411
152968
394984
46119
149177
369378
413029
198215
134317
366218
281170
465540
39702
367778
247925
64320
86...

output:

294428 473786 295516 356041 418380 409382 484446 470069 426742 451557 333426 76010 26162 217029 199747 158527 56693 127686 458269 268432 3097 450062 17124 95072 49754 380988 452454 28056 397880 488017 263664 336427 334011 215673 114352 243554 35183 17487 437665 64642 436053 365629 395161 318241 4363...

result:

ok good job!

Test #10:

score: 0
Accepted
time: 407ms
memory: 98692kb

input:

500000 82328 82327 100000
280281
366446
183709
14447
442815
440473
121531
103568
472324
479656
337467
424742
474404
340302
269686
457628
230012
484228
422877
10759
156759
66102
130428
307888
123685
460634
235321
98667
93133
489886
479420
34961
352500
322001
129001
121871
135775
235639
100221
221760
...

output:

185494 187429 377218 243873 267775 178621 184766 4349 195440 465216 493888 59837 492409 22119 296383 439761 227299 182158 289180 431722 209705 314005 454482 353551 499618 396603 245525 104974 434770 192984 248421 482977 283671 95646 489750 240157 449388 468195 484685 464080 406086 313584 481109 1409...

result:

ok good job!

Test #11:

score: 0
Accepted
time: 375ms
memory: 102380kb

input:

500000 53948 53947 100000
287984
258934
272973
481182
131565
217198
34714
463056
337977
495727
310042
26372
320480
231799
249741
340990
365501
267377
460708
248843
285777
172137
492784
201463
213559
259528
461602
235849
398717
25475
241699
451061
188952
251790
83551
169967
335575
209367
55705
6381
2...

output:

490646 220299 110592 14671 171220 242764 176269 161808 463889 328060 432595 16152 170752 57934 356770 375971 256037 111598 453045 174234 100365 351281 259794 414103 190140 151855 110182 24374 395359 418294 384901 217198 81725 318333 446147 15096 181082 6 128876 142594 52422 437445 263821 166250 3573...

result:

ok good job!

Test #12:

score: 0
Accepted
time: 406ms
memory: 101940kb

input:

500000 77935 77934 100000
38748
422564
39441
105430
38474
225464
237519
121832
72613
477531
321661
29181
307418
314049
120252
261006
88761
17726
492112
460837
55199
354114
417097
133271
231933
436973
110894
478550
291976
50101
38774
316091
306160
121826
315769
361823
82990
188508
124574
13093
235123...

output:

423149 432427 271601 403524 194295 171107 323540 222391 289224 289983 437127 346762 296242 442430 254232 229891 40286 216206 222693 324588 77610 399666 132814 148661 227933 464084 443510 482242 404501 316458 207124 298396 2976 333929 421259 215487 116145 286999 202135 241824 184783 29644 92601 99085...

result:

ok good job!

Subtask #2:

score: 25
Accepted

Test #13:

score: 25
Accepted
time: 463ms
memory: 134912kb

input:

500000 88721 177440 100000
30974
23891
211201
125199
180489
387190
218020
498838
230147
307989
484136
257785
353027
304420
311738
169842
334090
486070
126212
328609
174959
368840
238722
418092
488389
226349
427271
457322
332454
12958
197530
264474
355717
482774
221286
282148
216441
266659
213750
628...

output:

63742 11431 300071 157785 268420 71772 84553 267656 174540 21500 451751 82419 58833 165916 94199 78203 263216 146169 306934 50728 338250 199716 469441 135516 133967 123248 375309 17045 459156 413018 49645 73720 188292 322328 493921 152164 219927 140202 236207 266137 180568 32077 371348 66876 354136 ...

result:

ok good job!

Test #14:

score: 0
Accepted
time: 424ms
memory: 131020kb

input:

500000 50267 100532 100000
68723
142685
445548
215087
478634
201362
177405
373123
227456
161487
276716
452818
230715
466238
250886
368974
77152
493722
129115
154402
319190
170867
27898
338290
170229
428001
62611
19188
164329
435154
128
358453
137653
430592
160391
407392
125236
320137
27945
393135
17...

output:

71019 495557 31730 116065 88378 303281 100690 375513 399886 191425 467776 333920 329290 14772 76952 27872 409419 154816 362396 408615 364034 455915 146139 56273 450037 424683 327232 385588 134811 499210 495342 81995 301341 243738 7518 121857 431344 232635 155628 226209 161465 497460 38422 126619 489...

result:

ok good job!

Test #15:

score: 0
Accepted
time: 446ms
memory: 93636kb

input:

500000 67604 135206 100000
269046
235003
144646
314602
323547
204450
484229
26672
78499
602
110738
117079
125630
408912
188317
256853
71590
365703
370008
194267
342683
400737
369194
127912
96314
269751
219125
431887
398790
200053
279314
365797
187505
75025
48264
492515
387506
13267
80948
378737
1106...

output:

304557 146621 341214 51954 218727 121437 210598 129338 351121 163289 274286 237357 296451 176615 249889 295107 77205 149704 481183 348866 393180 175691 466669 361520 216086 3056 474316 277908 487833 329296 394997 220659 466424 433291 420562 62748 386251 243050 404315 193249 137323 302723 371806 1247...

result:

ok good job!

Test #16:

score: 0
Accepted
time: 436ms
memory: 97916kb

input:

500000 90109 180216 100000
153893
273609
184853
157428
466683
457867
343783
259618
87262
260826
466902
41972
482221
496695
293976
300490
455874
320279
314574
128316
280220
2566
383716
351629
219577
29212
26631
73182
458601
318651
105942
60715
392339
265615
387177
110713
319395
336826
483543
70790
36...

output:

215050 78956 350916 261156 43035 440125 66101 67211 61320 256226 208109 499983 112986 25267 434801 25987 482451 164082 327352 220303 167621 265823 344801 31132 462754 249586 246604 20132 205928 434622 399205 250649 192179 32757 399810 458750 446813 44877 459898 343178 37046 278831 90629 219941 41089...

result:

ok good job!

Test #17:

score: 0
Accepted
time: 427ms
memory: 98052kb

input:

500000 74321 148640 100000
477030
412534
57969
357009
116485
327483
437765
67781
471780
418080
308252
138279
338053
95055
275789
97204
386829
122048
57181
436136
222481
395950
352928
73438
250800
184259
16097
398913
456107
105407
39764
116186
80552
65160
316601
284871
313136
414498
414938
343247
310...

output:

85810 322066 182101 441124 475359 330210 304463 156644 279717 53596 21360 29054 72991 460190 458529 189816 240410 379449 190111 227392 405427 205047 322440 344268 65647 104388 77945 380169 442041 328613 430979 219530 65559 103989 209995 226709 326561 125073 148436 56767 290194 454509 14517 461817 37...

result:

ok good job!

Test #18:

score: 0
Accepted
time: 394ms
memory: 98004kb

input:

500000 54262 108522 100000
150680
169780
208423
114492
398775
47217
58682
258733
452080
54148
451364
196867
75350
134397
51280
339529
475503
166592
224426
358444
423175
366761
49422
400504
398619
18773
429051
59685
291626
145365
261042
445752
234123
21931
318295
94503
388014
414710
346782
466751
205...

output:

348556 492809 319077 140953 216732 25291 398951 152208 97123 498700 229251 217436 8410 159171 419614 390158 195320 480694 9215 220404 481680 445485 357385 118787 65492 310972 393574 8902 481292 139024 205095 473355 50946 390152 399097 431599 12577 482561 419353 397314 219145 228703 362575 339792 432...

result:

ok good job!

Test #19:

score: 0
Accepted
time: 381ms
memory: 102360kb

input:

500000 81364 162726 100000
321857
75911
117294
148668
322025
103777
419430
187082
374875
230927
338513
433399
305556
363405
457801
70917
297078
386374
322110
76493
189187
21851
453679
296595
389232
386129
310835
432013
450769
74142
284176
90713
430145
142503
212302
384600
157386
490862
201498
415387...

output:

170008 379154 297454 155114 491157 260044 2631 157019 147678 465263 291392 304251 307213 221959 338100 108780 24730 389843 215244 425117 118352 126873 163253 104988 481051 147503 430810 201750 189106 208026 298257 475108 9315 285509 322538 121841 384383 290248 102921 138839 344859 372434 418449 4446...

result:

ok good job!

Test #20:

score: 0
Accepted
time: 405ms
memory: 116208kb

input:

500000 84343 168684 100000
92159
3025
19095
171545
269452
230103
428411
105653
130154
107687
352956
242321
444883
277419
59579
326919
4318
292812
326242
108917
253600
261383
320680
353469
283662
437811
470379
170617
46289
454830
253014
4165
381169
328908
493243
143442
265851
59330
347945
264421
2460...

output:

17746 262116 326573 230546 117212 297546 62953 12308 439659 447244 264559 225392 237532 447469 331672 53586 473315 329903 474842 57117 139927 464683 254527 5779 420424 299863 378436 28221 337732 236844 272306 144734 316173 290559 478801 229561 397397 355294 364989 109631 148615 85753 206798 409666 1...

result:

ok good job!

Test #21:

score: 0
Accepted
time: 468ms
memory: 110104kb

input:

500000 88757 177512 100000
445069
77200
391318
333565
435416
362966
141662
45522
355791
256039
214614
450379
170016
467327
282215
243533
183175
463770
163579
461662
317411
261187
253905
468654
231023
3749
90566
45210
343865
165800
136852
383910
367984
413623
325053
41177
298566
351228
15540
262375
2...

output:

2084 450288 380893 484871 185307 268511 120535 250210 64001 45515 474213 355266 242137 406681 159914 225659 185262 295159 73916 56877 495000 123153 315348 365339 133322 187244 95970 422265 249935 125877 371699 2889 386311 185339 464981 207333 306139 359201 116462 101326 212703 343285 233155 397786 3...

result:

ok good job!

Test #22:

score: 0
Accepted
time: 459ms
memory: 102932kb

input:

500000 96344 192686 100000
195205
422258
407338
9779
476600
35329
336839
237680
366318
378932
386654
353800
118734
312717
156858
133692
72221
189109
391324
145763
38629
330117
404936
68820
255606
431020
392503
176884
178395
275064
488090
130311
314587
217628
462496
28966
425413
116762
437176
468713
...

output:

198418 362251 493350 267260 243167 48314 495259 429731 119295 243337 256604 190035 62043 334548 469948 177417 250565 111822 258561 476145 149466 259193 300123 243204 472130 180011 298771 224055 131118 447683 424014 348865 387395 106076 17066 433560 294750 238461 193765 33122 273937 360582 385394 175...

result:

ok good job!

Test #23:

score: 0
Accepted
time: 423ms
memory: 104420kb

input:

500000 62967 125932 100000
228958
294130
161634
80333
361275
345422
393334
286611
311452
453264
275215
289266
452502
447517
458518
295775
420774
426985
410788
79249
309720
61573
250760
5587
481312
161015
303445
8961
463259
24340
331413
237498
488929
475822
425952
251105
487129
230062
368282
264038
1...

output:

385478 166724 179989 326802 134811 429511 260925 294291 108480 453903 62396 42722 12308 53343 428065 415241 452849 184076 145693 239119 152232 260614 333576 222170 162456 258288 176662 466642 376042 93115 492979 188449 498390 123915 14666 343652 58601 136601 202945 262304 441531 310399 383818 95233 ...

result:

ok good job!

Test #24:

score: 0
Accepted
time: 438ms
memory: 117180kb

input:

500000 94830 189658 100000
104237
453576
334546
43320
88991
174623
80118
405142
341990
225030
164655
136865
106241
208562
67332
289772
379828
245569
190369
136859
196296
376390
298773
202031
129266
220643
477229
76909
267607
412545
178338
100575
280161
390719
280691
294766
490870
175723
312546
47683...

output:

468866 139670 204347 30124 388589 293970 163018 135994 398492 56373 185029 76061 477075 442432 107829 25815 175498 121826 484334 327682 15124 222937 169852 260277 121778 396778 230940 470063 154930 293233 349569 335298 287463 56582 265956 306971 98347 259926 201504 427278 147024 196575 184774 409926...

result:

ok good job!

Subtask #3:

score: 19
Accepted

Test #25:

score: 19
Accepted
time: 332ms
memory: 125400kb

input:

500000 200 199 40000
76296
130139
291501
292412
139543
433345
372726
451574
18315
465578
324564
477223
237354
81532
65170
465332
342130
9670
193303
193680
129668
149532
268907
89969
398275
356210
324593
433492
482232
466692
135343
433758
102545
287283
432859
351864
305769
489532
101532
450535
295762...

output:

20242 414878 185020 125537 353357 496468 308518 188057 254952 120898 414314 11748 435424 326112 345902 271794 473882 337923 135188 438050 45188 88306 260313 116954 457474 435919 366460 431766 397351 392326 178950 199724 227083 282259 70917 121346 109196 193669 242154 12225 466790 155481 287973 15749...

result:

ok good job!

Test #26:

score: 0
Accepted
time: 302ms
memory: 125128kb

input:

500000 200 199 40000
83785
150667
304961
267635
97760
385201
77226
6522
352645
72592
427133
30755
100574
359648
403948
394809
425453
115868
11287
351385
494434
245106
58157
395180
326236
277135
359592
13569
76251
45366
172378
122783
216597
466130
284420
342613
471698
380682
92490
79264
241049
54038
...

output:

107095 98656 106791 304190 196877 423284 60540 204253 341441 59196 240332 29151 433366 290562 22079 64655 213528 72009 364851 443801 202553 8696 9763 456384 397249 125804 414847 223082 446791 174 461813 451655 292806 308476 264153 244973 167889 101629 244034 183440 234960 246613 494471 130935 20773 ...

result:

ok good job!

Test #27:

score: 0
Accepted
time: 283ms
memory: 81488kb

input:

500000 200 199 40000
94863
498513
460682
411416
360517
309831
253717
325019
496632
255803
130770
289206
181204
74729
481723
293737
94126
307214
342974
448321
17084
433126
387809
279606
251781
65795
125269
129465
433572
219622
11806
179248
367117
84640
114067
122590
4140
116015
77759
392439
408930
10...

output:

290210 343625 416794 242885 184350 128184 462412 58672 245422 66834 441003 418116 309091 247712 71260 312317 325221 448888 41394 25453 112601 274934 453368 18392 330638 335092 114166 319970 110864 31688 380102 378344 241504 276509 169855 69503 43446 68447 404429 102692 47542 29894 85100 208445 42557...

result:

ok good job!

Test #28:

score: 0
Accepted
time: 254ms
memory: 92616kb

input:

500000 200 199 40000
460896
356428
214577
150748
16877
1635
258267
370689
262538
369939
466845
415822
304104
329494
6035
489031
48344
181107
61121
4048
156120
273134
234110
418870
101454
330401
45460
74853
175589
44170
192108
214802
482345
120910
76381
307448
204387
170471
187255
20694
494550
351800...

output:

262885 239523 101559 179196 240426 268667 390009 222665 423811 273506 167712 69031 22371 230506 18554 280409 302823 164050 26873 472449 356653 216386 383773 490410 388758 235901 477586 65344 208176 143110 177303 310401 121037 109511 35203 98093 468331 188458 370814 496960 264846 426542 12116 426578 ...

result:

ok good job!

Test #29:

score: 0
Accepted
time: 261ms
memory: 85280kb

input:

500000 200 199 40000
472275
149661
377034
488618
186507
171592
345983
124571
76807
5855
300138
80553
340257
185587
378146
311401
334561
194922
182638
104826
420776
448537
393232
195734
347470
219413
82586
185915
58528
404731
329285
300479
342445
115864
230618
360114
281628
86760
203158
212935
376440...

output:

356081 207040 200630 333181 114431 196004 270580 182608 377494 323491 230474 401506 356498 376940 420501 311444 90874 333187 50183 476575 473140 419823 214333 307653 154855 209492 206732 119729 406083 419385 270321 37871 284658 405176 395512 70141 202159 162971 297995 264681 434383 363354 418084 124...

result:

ok good job!

Test #30:

score: 0
Accepted
time: 284ms
memory: 92672kb

input:

500000 200 199 40000
457235
436089
312892
490957
247950
207946
50653
437012
325088
141386
319878
207087
398253
383132
11996
402164
409233
443227
294400
242006
327126
10129
244769
232885
165818
291514
332036
352883
406737
63191
380159
208131
327008
61194
18237
223687
413010
160943
426911
162568
18875...

output:

35725 156748 154434 462630 171959 372225 166544 485597 434764 109652 81987 413205 341567 477324 251825 394795 254024 368057 173540 324681 471908 288089 224353 419115 288034 63978 219800 173527 226574 130574 169384 95746 301412 367037 465464 144249 94095 40223 128661 470697 206279 452421 476028 77907...

result:

ok good job!

Test #31:

score: 0
Accepted
time: 285ms
memory: 94104kb

input:

500000 200 199 40000
498222
451076
484997
74171
344510
119552
181399
378715
468521
103237
143923
10760
103036
353626
331913
232159
181090
14984
85005
467731
200014
74750
304897
488094
80862
428792
303440
325833
70112
301252
111208
109820
23216
97480
361786
424164
357979
22040
249278
329701
472798
13...

output:

352301 356177 242991 284118 440527 473379 386968 243324 450735 426071 92799 325652 284852 347115 415670 207147 366569 429609 493856 111690 242576 63067 51504 327697 142615 8577 187912 32300 245860 152561 25339 29892 150719 459680 459357 128423 235122 172790 50812 127460 338361 458062 347310 267003 4...

result:

ok good job!

Test #32:

score: 0
Accepted
time: 313ms
memory: 90300kb

input:

500000 200 199 40000
235229
335906
185851
155252
476682
68595
44502
499901
403010
120212
365527
365904
165512
445297
44401
416812
282314
301556
484290
469265
250037
184042
387456
226812
371932
410610
263086
279108
442354
371814
37100
77190
202799
118817
250469
478086
307786
11617
132836
304380
25170...

output:

457551 292076 256615 199707 411774 39651 236892 240655 483798 108546 252344 344927 359074 443208 28064 98595 431845 420741 347996 305703 80583 84512 233166 111628 406203 470608 294845 125844 245866 369 345805 247538 120530 143326 464630 137987 148373 421466 110408 300189 468867 448401 158285 361772 ...

result:

ok good job!

Test #33:

score: 0
Accepted
time: 282ms
memory: 97148kb

input:

500000 200 199 40000
27113
326978
70968
474916
390195
217639
467929
292659
58323
454399
169213
185253
114409
287912
251420
281315
94695
326310
237316
424237
79688
285918
43312
65978
450176
255930
425562
242907
198847
77977
135410
122795
349710
416624
428899
314932
135513
464911
286182
28508
268649
1...

output:

99685 156418 358487 40565 124973 473862 299255 260184 242122 60491 419943 80161 179165 178097 369556 247680 310803 326819 356847 234479 451162 356406 466312 155862 345530 188230 390877 417972 38260 282903 157369 172239 80322 78173 285888 24856 374494 440564 470491 122285 34974 484194 136779 239931 2...

result:

ok good job!

Test #34:

score: 0
Accepted
time: 261ms
memory: 96264kb

input:

500000 200 199 40000
158367
3349
98725
462635
71709
384166
328253
132679
334131
433401
352051
9045
188775
366068
218093
90403
193264
359869
432442
263881
154277
470908
470355
200679
36628
399310
359036
163322
404722
42891
12614
147023
421373
479199
71619
182994
443724
120532
217367
134309
221302
310...

output:

184569 107853 498428 305576 229898 373600 287002 328633 316511 332656 424589 316805 379505 382963 215923 14980 265529 73366 22307 412121 218826 96176 16651 349904 345684 89943 153111 163877 491754 449443 111701 403799 3561 150370 359234 489684 403897 158401 368005 407668 355645 168675 166673 336148 ...

result:

ok good job!

Test #35:

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

input:

500000 200 199 40000
487441
36354
395955
6882
385179
368092
7896
377902
329818
287628
224290
27427
439352
326593
43030
180557
361665
163
8128
233496
22632
367138
126510
64436
351877
190302
145137
17783
209795
411209
255585
72497
161599
407307
216969
128706
67358
261184
268088
304573
63115
386332
827...

output:

485685 351439 323550 44279 316903 185027 134311 245911 234668 318232 24805 157261 246651 220041 312084 329659 26228 314269 125863 241118 368333 153870 291789 474232 231387 357723 344449 50028 49724 418189 151211 243979 231368 454627 429986 28664 471763 355585 111947 390439 152197 471481 468932 17147...

result:

ok good job!

Test #36:

score: 0
Accepted
time: 243ms
memory: 96364kb

input:

500000 200 199 40000
234051
59729
19849
414190
183195
238559
189881
256369
97803
379735
363604
391055
490274
186114
46653
230044
14075
437112
279313
141334
478372
146753
310018
305921
464449
475813
132149
290804
21707
51493
249658
15019
151386
494305
468781
444714
318658
179510
283604
351846
110675
...

output:

410090 38497 368057 414937 353244 277302 267180 174245 58771 155451 334212 73750 123166 219445 478501 63501 169278 396969 113243 108073 31638 358367 215313 74210 148965 421048 191613 425044 147237 309977 271509 434836 94846 444491 405199 110880 318333 491885 30248 248430 321025 434227 359398 324177 ...

result:

ok good job!

Subtask #4:

score: 22
Accepted

Test #37:

score: 22
Accepted
time: 775ms
memory: 188936kb

input:

1000000 1000 999 100000
678746
439069
32542
85937
936926
284219
461661
203235
533462
940676
230275
621140
780674
254931
562355
229273
201341
493976
358955
963527
880412
91220
474599
160086
698841
591551
718276
844558
39859
765917
34722
401724
219774
443004
682244
545401
968419
968020
354030
411187
1...

output:

545967 706162 53597 107558 776536 230611 572458 293457 390487 241653 638541 42868 433774 438059 293014 739962 25440 503383 628342 573629 887812 909797 805385 862282 382785 706534 190319 439139 648412 626240 131005 848982 269684 840650 376086 933701 18720 749474 336321 160119 795534 671698 201133 610...

result:

ok good job!

Test #38:

score: 0
Accepted
time: 768ms
memory: 190816kb

input:

1000000 1000 999 100000
530144
36744
762893
712555
181981
816257
634992
419372
362279
817260
80801
697008
163211
900947
207310
862766
871091
388529
304808
574011
609949
509094
682125
781230
431445
517909
578411
288003
874415
410542
327673
607230
278208
956997
60166
842448
708661
562761
996349
382922...

output:

95498 889615 960323 436119 268907 878076 506332 704874 156497 67827 745845 203785 930852 891171 111021 389493 512868 480450 704804 985356 427544 771792 987920 534755 390890 820863 819565 664577 291796 963733 65362 76637 833989 747732 553794 727554 980477 63319 4035 692108 638253 898078 315136 558195...

result:

ok good job!

Test #39:

score: 0
Accepted
time: 671ms
memory: 111528kb

input:

1000000 1000 999 100000
184414
849676
938006
927343
390133
327580
229110
507237
712311
8816
414520
114671
637641
82050
586607
523821
775429
139792
129360
175687
202474
801377
53523
281419
268534
488983
371227
294280
754555
448802
474939
391153
68307
762784
972243
245396
471656
982894
891252
945526
5...

output:

277025 967051 659495 162805 359235 728882 780116 607743 459934 163034 941641 343303 100958 522324 640877 915589 366252 994755 772360 656632 537633 625055 983916 960437 928856 153719 465067 234833 919993 890979 781174 892428 151554 574627 481243 407288 195742 325309 632498 71801 653298 302898 454486 ...

result:

ok good job!

Test #40:

score: 0
Accepted
time: 628ms
memory: 113992kb

input:

1000000 1000 999 100000
279950
249721
597292
449885
16559
173928
771422
461514
392390
935006
401814
270115
877076
38286
665465
238399
632929
179581
685305
910549
211998
608701
352060
872741
888320
701449
144650
551823
899287
53420
994085
608934
941044
730655
818001
379877
176374
592364
165476
704855...

output:

842070 61244 572241 139275 767427 119456 588810 677007 330871 548152 374105 404136 52357 302785 238917 382797 234392 56806 386995 392158 567386 792286 695648 277016 294700 257008 165778 263470 791479 697041 709574 83029 290713 509704 780069 482388 267642 209715 128476 953823 723448 848997 615858 294...

result:

ok good job!

Test #41:

score: 0
Accepted
time: 697ms
memory: 114272kb

input:

1000000 1000 999 100000
20291
14699
561360
480484
286821
851537
642046
340254
362763
85475
567413
791788
145352
893579
253840
568256
281056
600506
834619
722257
570033
739505
158527
142792
475867
834583
85573
692242
107763
238427
749609
945275
238413
468714
75532
903433
452471
189579
134021
196949
2...

output:

831483 369772 717373 488661 132474 624882 7306 383367 259694 979665 630142 640097 32434 73523 425945 604954 658328 488583 679664 336982 565538 120126 875018 301500 899128 292657 377686 186527 404564 343275 169471 36658 906230 548318 634733 869562 747335 593158 335258 450839 626387 571878 828958 3964...

result:

ok good job!

Test #42:

score: 0
Accepted
time: 747ms
memory: 130508kb

input:

1000000 1000 999 100000
79586
680985
105418
485822
250996
367398
927624
781485
911744
133593
352104
588258
914821
421528
538901
315958
275633
856427
5509
935195
913751
92920
619111
848814
663965
45219
344279
165968
865619
154854
900710
774023
872807
340764
497215
631438
911663
879056
918477
890010
3...

output:

74982 84832 135723 847384 814166 973353 453198 722422 234148 893507 359256 7185 53109 238081 850019 550198 62098 701870 61381 976934 604118 556382 472114 183452 561048 993360 646500 272827 733330 283710 96267 176229 863224 664733 938185 198386 528029 381898 793809 265611 892435 59312 224629 398481 2...

result:

ok good job!

Test #43:

score: 0
Accepted
time: 735ms
memory: 124612kb

input:

1000000 1000 999 100000
864268
381722
137834
585983
418961
493735
111546
74594
3531
508504
383125
609419
708077
928352
762197
141167
174341
418962
107812
631708
84967
770802
568509
276991
376328
909246
85244
453348
203444
298108
478742
824330
149959
297025
840543
296938
691263
894733
491791
319919
8...

output:

664618 37707 985622 434810 589742 395552 478017 212703 150499 96555 645714 94960 179691 515261 318278 28251 870701 835728 174277 222933 382972 171717 637183 28306 293945 77915 479072 134137 872122 992418 828674 630552 8666 933528 666573 45280 35641 792771 403532 30179 551083 651977 115108 719419 770...

result:

ok good job!

Test #44:

score: 0
Accepted
time: 700ms
memory: 125604kb

input:

1000000 1000 999 100000
845169
885017
493118
865999
3330
999692
653381
608408
419452
799529
98306
295418
755923
442503
85146
52116
980435
452773
633069
998249
788034
527181
418057
380217
158464
23015
364569
275325
675030
381121
889352
891866
203541
14657
69958
428476
4927
853670
908949
664221
936648...

output:

498695 971471 63490 523261 614244 324672 593769 45803 707767 422122 733594 932015 486909 580544 247487 209605 412438 966665 312073 653238 876672 152067 266785 806243 8061 673366 884017 507499 596011 243493 707198 673627 582970 10692 217101 776751 967445 725764 47333 304654 970052 925219 511383 98565...

result:

ok good job!

Test #45:

score: 0
Accepted
time: 738ms
memory: 128528kb

input:

1000000 1000 999 100000
582602
618937
427880
217239
896256
608317
42018
91716
145269
277504
94008
601157
503365
892936
294525
477654
286441
721652
14541
805171
315688
615193
950960
232416
430226
299443
690527
317106
303199
277200
283069
268869
650167
725195
788623
817992
647261
671722
426903
453937
...

output:

389549 998885 868881 826690 875689 122630 569068 453709 323123 519092 496745 442376 851257 861963 8374 823356 872724 898279 719594 620608 877195 251366 308966 480932 855309 81565 298860 444175 218685 314988 190117 688248 887805 624190 957404 245314 193853 253859 955605 89847 753025 13558 215419 3775...

result:

ok good job!

Test #46:

score: 0
Accepted
time: 661ms
memory: 127372kb

input:

1000000 1000 999 100000
761086
125560
807519
496861
197173
671162
286468
361527
420830
337089
99902
928320
527383
162932
540385
255275
952224
668471
897966
186547
575192
315130
399856
441499
876295
462690
556218
167574
711101
146911
914260
296451
432034
722939
27102
687771
200204
636114
525983
59197...

output:

380028 424400 467521 360792 709387 41063 687718 767909 463517 215637 933415 651525 544068 811423 203599 347347 249991 503398 906344 924100 174909 742344 806033 802309 482074 573606 196451 860547 677194 103694 425919 86083 657300 59775 183612 927594 946599 659 841397 794064 99589 863644 700510 350698...

result:

ok good job!

Test #47:

score: 0
Accepted
time: 739ms
memory: 125340kb

input:

1000000 1000 999 100000
700422
705984
742655
297368
991331
273447
971924
235042
288410
226105
751213
71757
552545
234328
777224
460184
747354
483278
77275
960232
145343
677496
979573
598317
294693
762557
214101
155814
368037
345816
214266
272277
6667
461234
109578
330628
355557
16281
696921
633114
6...

output:

507406 384022 425007 730325 432156 201845 661174 352169 588936 235167 335934 739385 202157 506010 735375 710000 603522 430356 281057 652857 41289 598690 63500 851416 138940 410832 678330 316133 780578 458636 127608 739842 458477 42523 205093 885035 938057 817988 660963 358453 595509 157630 995376 20...

result:

ok good job!

Test #48:

score: 0
Accepted
time: 644ms
memory: 127732kb

input:

1000000 1000 999 100000
294979
912636
954626
984835
432393
676651
323592
496950
442003
287176
988897
310588
517194
868410
42913
165122
231552
13998
103334
502710
396538
590023
630061
530055
980426
628250
446184
451072
276133
424200
328584
26687
392134
766381
197139
174221
564083
149136
481705
457343...

output:

628359 723049 56730 891888 457756 780509 790913 256834 487895 472820 278945 153674 384373 437867 88131 370383 874705 561760 5778 813158 543142 200644 434431 608270 156952 781746 22960 158760 135607 101193 40205 941325 838675 832624 592628 816154 548419 368076 571520 699956 959353 753347 897781 85978...

result:

ok good job!

Subtask #5:

score: 24
Accepted

Dependency #4:

100%
Accepted

Test #49:

score: 24
Accepted
time: 929ms
memory: 194728kb

input:

1000000 91074 91073 100000
844855
360256
604500
520288
3402
603913
199722
732526
574997
429775
182518
190073
386932
693624
254661
333433
557929
350362
247817
201441
960948
519977
461212
493412
852908
455639
732827
432452
320916
223796
413293
969300
617038
438432
2369
51283
908991
374139
410798
19612...

output:

827995 196444 835457 100266 922715 142913 297340 524911 950490 582786 741644 863505 805244 984882 24755 930891 884867 861271 531596 648132 338218 46845 847717 595175 12717 326481 377840 588017 813334 995758 603487 25306 578153 332196 711148 800636 39897 846372 614206 907492 415320 957601 361674 2575...

result:

ok good job!

Test #50:

score: 0
Accepted
time: 843ms
memory: 195116kb

input:

1000000 85406 85405 100000
243967
952129
483179
427670
241063
673465
936850
819488
932267
432087
168570
75516
427761
708350
579841
56944
327580
291932
619630
977053
424711
862203
360360
723933
64552
550800
399697
549936
425473
413499
431310
248361
149311
199196
247552
227202
676100
694069
347994
988...

output:

817772 657031 55207 421261 893501 135937 750393 440629 311734 700739 420833 514845 773485 235162 434337 863985 194772 516431 556822 285605 430380 294378 871757 809646 399453 929706 390314 165599 628640 110756 872436 719112 744549 97663 634614 689982 998575 157296 636440 644369 82641 825277 301856 24...

result:

ok good job!

Test #51:

score: 0
Accepted
time: 847ms
memory: 114308kb

input:

1000000 62028 62027 100000
354774
944572
228278
449941
359325
57969
43031
616490
898916
61312
768136
892022
42765
227563
373737
241400
671641
155600
137082
803792
95473
30579
438130
496747
204238
57940
100124
47370
141803
745731
687568
952816
518284
677981
803613
28392
918299
517226
69867
69501
8590...

output:

139210 327494 800590 781324 683433 612838 865433 359740 546506 764434 215390 107583 83312 205599 111269 165809 426746 573198 713246 574395 47027 652377 33675 558945 890664 993894 597337 404609 432175 431143 284725 460165 581545 817980 228543 916635 10291 337598 155101 963750 367137 796998 597914 843...

result:

ok good job!

Test #52:

score: 0
Accepted
time: 951ms
memory: 118412kb

input:

1000000 97415 97414 100000
453981
477203
689925
857434
241949
91494
993077
34954
605245
874902
893112
881129
576016
404784
870963
602740
1572
569897
624684
792962
189914
558522
191463
49120
326617
360379
162970
903046
277880
985508
419832
756246
978897
958038
74713
370260
67182
710992
829080
535448
...

output:

349880 801696 441388 314878 225040 706822 574497 804104 96773 193847 746518 16888 776665 376855 232003 31052 406394 361213 469395 308138 10106 57431 76623 704539 778313 730867 979406 615613 641850 466219 701955 795700 515194 36566 10841 602912 189750 961561 361100 565734 339758 120675 856014 542750 ...

result:

ok good job!

Test #53:

score: 0
Accepted
time: 793ms
memory: 114160kb

input:

1000000 54975 54974 100000
96952
319199
205229
785476
392425
909864
205985
81504
109636
164519
589106
373513
308062
898520
41603
88922
939415
189814
67267
237546
983306
247777
949797
339161
315551
248540
137128
344060
336465
199815
730843
44931
403415
657739
689755
660391
67077
940902
804294
104482
...

output:

386504 310119 82753 899750 761008 869076 528640 206195 468972 380349 13271 93375 212375 765058 934636 912101 48453 438338 856888 312337 34640 889243 231978 787656 544365 71673 919952 391110 630160 872459 485308 347935 721103 374961 266451 629719 519 15860 601160 829556 47211 578816 448741 798182 462...

result:

ok good job!

Test #54:

score: 0
Accepted
time: 944ms
memory: 134288kb

input:

1000000 93603 93602 100000
590581
384770
986471
380567
941542
676443
800265
713198
618948
485196
793122
992449
102071
504074
882555
246256
810300
783699
191498
938198
981235
862324
82689
856318
830003
553359
194501
448504
13262
81426
659762
358904
334920
884736
624654
360241
520224
491932
756589
684...

output:

148349 229041 384634 319752 274093 446324 449026 879307 326189 628068 1342 805420 619813 418921 724309 933108 50210 181465 230780 560783 295404 2537 336541 240545 485009 829869 959578 592025 767342 825388 885690 164975 435449 231037 362693 833058 692110 594603 575245 760865 890382 941556 710542 7712...

result:

ok good job!

Test #55:

score: 0
Accepted
time: 856ms
memory: 127448kb

input:

1000000 56476 56475 100000
321806
617064
56801
469913
349501
226853
982685
953768
950260
773865
850920
494648
347845
472357
967459
307312
410773
669459
406948
398239
680315
58721
209614
422608
265050
904778
804303
548987
718504
941419
213137
647451
595973
781907
716699
248913
465529
100816
289739
43...

output:

377649 601911 80563 935059 792757 751731 130700 946594 254132 824813 332860 440954 622975 869977 898463 788551 605833 710698 75936 653911 249140 66603 406140 592698 585925 917608 882847 574303 812804 763439 605930 226697 321819 828758 903202 639575 110632 520126 519937 166734 51761 589233 680562 405...

result:

ok good job!

Test #56:

score: 0
Accepted
time: 998ms
memory: 130116kb

input:

1000000 77761 77760 100000
102141
89521
32208
995357
946428
638388
994079
200096
759506
415117
989818
157285
145299
619468
947456
343707
49714
479293
934090
399241
209616
459583
232400
34280
269169
429394
513182
447184
603
473746
92149
723284
310077
518197
800474
506674
796719
151664
380675
374791
4...

output:

422996 620619 535225 253377 495601 754994 925481 115932 567757 955523 396274 663494 177411 10567 532290 781057 153614 186783 703349 144786 266969 311086 576199 203879 959413 635784 519123 976062 55695 17705 941651 768870 137238 235414 831151 446219 36004 540618 258634 911240 393250 946770 990872 370...

result:

ok good job!

Test #57:

score: 0
Accepted
time: 890ms
memory: 131388kb

input:

1000000 74966 74965 100000
683534
239091
842267
16017
468005
568280
573610
693011
161069
706082
795227
151601
934006
479774
513858
109101
851525
331377
875016
70381
299813
706417
753015
505672
720335
650876
915187
738727
132896
784656
425639
867644
376143
733308
245383
783527
550113
526907
856694
48...

output:

622629 774210 490038 650007 440377 384087 107309 422164 236891 454053 906650 240901 546798 67542 624198 51172 628284 995188 331241 969850 780147 255212 82777 752793 146609 161090 43824 897568 245407 808047 374438 362979 170495 210264 143026 30652 113491 859822 642251 629724 129877 547065 332706 3489...

result:

ok good job!

Test #58:

score: 0
Accepted
time: 841ms
memory: 129040kb

input:

1000000 65730 65729 100000
389535
782666
938044
721678
849220
701060
181030
52406
234247
790969
174777
437888
55263
195566
435426
928800
69026
168462
766751
672961
454375
175149
710125
383627
736135
711434
433482
836973
541367
953192
986804
693441
444489
287176
517890
131648
879596
119420
264712
351...

output:

109338 411252 416153 859024 213839 72300 213418 413826 308938 210110 631751 37974 324814 550874 785623 964842 120856 866952 438527 235756 268279 650025 489633 461729 112493 730826 744531 980710 718087 235091 146705 385589 889504 578054 486510 314978 469071 96300 985939 908342 899378 641527 687279 60...

result:

ok good job!

Test #59:

score: 0
Accepted
time: 845ms
memory: 128508kb

input:

1000000 65817 65816 100000
51488
844164
68841
411983
904138
407472
718044
583532
651150
806564
830599
283691
887913
521795
183797
959816
140200
768090
936924
842275
478523
522794
333465
184430
825549
711686
617264
901453
971141
487698
621032
169621
843824
122780
528194
237041
140546
980298
46138
984...

output:

562168 593372 814019 277360 564938 783997 679912 875028 242586 251515 843122 659481 568008 672446 292727 870131 107506 760883 969252 152002 987767 571421 172566 603819 616658 220692 252874 46195 388633 41979 833088 858916 880119 131681 155173 931871 838142 809796 927492 348459 143618 46847 219870 89...

result:

ok good job!

Test #60:

score: 0
Accepted
time: 906ms
memory: 131920kb

input:

1000000 84524 84523 100000
518841
510059
160070
674927
130615
180721
695363
700479
501744
933738
820766
543469
600830
488190
995734
515877
169413
488120
455582
27902
410480
323699
99289
522373
351735
903291
250384
153
678098
186046
396071
639296
608479
651025
672719
494101
85372
331436
954731
79292
...

output:

861270 708942 738708 293070 546532 598269 124610 947231 975506 928622 128203 684619 965185 491203 878688 182072 117242 675070 529969 353660 405216 564175 919133 256341 713067 587918 96776 562125 736537 486653 321328 408862 479679 624029 666600 546795 377215 728690 249873 869936 601014 680125 901075 ...

result:

ok good job!

Extra Test:

score: 0
Extra Test Passed