QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#839159#9924. ReconstructionSegmentTreeAC ✓817ms123060kbC++142.2kb2025-01-01 13:46:432025-01-01 13:46:43

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 4ms
memory: 46280kb

input:

3
1 2
2 3
2 1
1 3

output:

001

result:

ok single line: '001'

Test #2:

score: 0
Accepted
time: 4ms
memory: 46268kb

input:

6
1 3
3 4
3 6
4 5
5 2
1 3
1 4
4 5
5 2
3 6

output:

010110

result:

ok single line: '010110'

Test #3:

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

input:

1

output:

1

result:

ok single line: '1'

Test #4:

score: 0
Accepted
time: 4ms
memory: 44544kb

input:

2
1 2
1 2

output:

11

result:

ok single line: '11'

Test #5:

score: 0
Accepted
time: 746ms
memory: 97980kb

input:

500000
321614 78209
64619 204431
81539 336200
128603 201377
132521 391792
41587 137224
174146 381680
341915 451206
493371 256005
259794 168656
161914 462290
105839 333679
377214 267008
283062 457340
219692 196741
123276 321510
473789 410796
498171 203543
178249 456921
255509 449152
294196 457566
277...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #6:

score: 0
Accepted
time: 686ms
memory: 102488kb

input:

500000
36024 87195
108586 421467
431172 367732
493985 46886
213597 28307
211267 46590
362114 441339
277065 115859
103713 161698
349213 41745
185934 19274
490316 496516
475711 279386
296442 146503
89733 449936
197415 385594
325021 418416
335226 171591
201788 138457
60931 108388
58772 112816
371138 14...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #7:

score: 0
Accepted
time: 745ms
memory: 104304kb

input:

500000
310317 190907
69501 399906
150116 313251
246687 111703
184096 396547
53772 260805
227586 215088
36494 125548
378767 252795
276318 297811
427118 345684
249477 42722
228070 490399
180663 323186
354634 11504
263905 232028
236183 306162
272415 455913
375552 467155
430114 476865
461198 4954
329182...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #8:

score: 0
Accepted
time: 727ms
memory: 104756kb

input:

500000
452851 19638
27265 237427
26968 275079
452156 83840
332697 93577
466755 20005
348018 178526
64265 14018
378010 176281
388553 147130
294415 395043
143559 6383
279517 164842
96091 142314
220338 172667
5727 375365
473038 398633
93702 338887
290595 353499
228872 259575
439511 454445
437231 201278...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #9:

score: 0
Accepted
time: 730ms
memory: 105400kb

input:

500000
60928 107647
235760 497822
304252 117620
105711 179233
203340 377898
155972 416233
478313 397136
281935 101102
321117 469553
23853 66761
446952 107534
441875 265132
26312 196083
477635 287906
39638 187977
376375 334164
7510 321386
56303 439673
166824 327050
56421 464413
163256 254605
420933 4...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #10:

score: 0
Accepted
time: 656ms
memory: 123060kb

input:

500000
133454 88585
44667 353827
280459 188270
354784 26487
59928 473772
90470 153344
469518 134293
465532 367839
206155 219620
5921 261069
413040 75688
349642 314325
187507 192838
249832 392425
211451 225725
441947 29595
166233 454731
289716 486004
466294 62062
427321 130791
89032 184003
427010 462...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #11:

score: 0
Accepted
time: 535ms
memory: 96920kb

input:

500000
167897 133130
105650 167897
210511 291114
167897 462679
344180 167897
167897 458809
167897 76305
167897 124960
64535 239234
167897 286004
167897 247571
180738 244382
167897 18787
226792 167897
107623 167897
347463 38779
337154 167897
77712 167897
189184 39539
167897 102046
167897 292650
16789...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #12:

score: 0
Accepted
time: 524ms
memory: 96912kb

input:

499999
161910 405465
176243 214115
161910 393078
161910 174157
448600 112022
133961 469029
398832 161910
161910 179054
374081 266412
50467 235815
161910 200357
212580 161910
257831 188909
386115 161910
161910 259180
177533 360956
199521 210629
291927 161910
35549 161910
29040 161910
307767 161910
16...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #13:

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

input:

4
4 2
4 3
1 4
3 2
4 3
1 3

output:

0000

result:

ok single line: '0000'

Test #14:

score: 0
Accepted
time: 11ms
memory: 47252kb

input:

5
5 2
2 1
4 3
2 3
3 5
4 3
2 3
1 2

output:

00001

result:

ok single line: '00001'

Test #15:

score: 0
Accepted
time: 3ms
memory: 46016kb

input:

5
1 2
3 2
4 5
5 3
5 4
2 5
1 3
1 2

output:

00000

result:

ok single line: '00000'

Test #16:

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

input:

6
6 2
2 5
5 1
5 3
6 4
1 4
5 3
4 6
6 2
5 2

output:

100000

result:

ok single line: '100000'

Test #17:

score: 0
Accepted
time: 3ms
memory: 46120kb

input:

6
4 3
6 2
4 5
1 6
4 6
6 4
5 3
3 1
5 2
6 5

output:

000000

result:

ok single line: '000000'

Test #18:

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

input:

6
2 5
3 1
5 3
6 2
4 5
3 6
4 2
1 5
2 5
1 3

output:

000000

result:

ok single line: '000000'

Test #19:

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

input:

6
1 2
5 3
6 4
1 5
5 4
2 5
3 1
5 4
2 6
1 4

output:

000000

result:

ok single line: '000000'

Test #20:

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

input:

10
9 2
1 5
6 4
8 5
2 1
7 2
3 8
5 10
5 4
2 1
1 7
5 10
5 6
3 1
4 10
1 5
9 1
8 7

output:

0000000000

result:

ok single line: '0000000000'

Test #21:

score: 0
Accepted
time: 3ms
memory: 47128kb

input:

10
9 10
8 4
7 2
8 7
4 6
1 3
4 3
5 6
4 9
10 8
9 7
8 9
6 2
9 4
1 8
3 6
1 5
8 6

output:

0000000000

result:

ok single line: '0000000000'

Test #22:

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

input:

10
9 5
2 3
1 7
2 8
2 10
4 2
9 10
2 1
6 3
7 2
7 5
8 10
3 6
6 8
8 9
6 2
2 4
2 1

output:

0000000000

result:

ok single line: '0000000000'

Test #23:

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

input:

10
7 3
4 3
8 4
7 1
5 6
4 2
4 10
5 4
4 9
3 5
5 10
5 9
7 3
6 7
5 4
8 4
1 3
5 2

output:

0000000000

result:

ok single line: '0000000000'

Test #24:

score: 0
Accepted
time: 3ms
memory: 44304kb

input:

10
5 4
4 10
10 3
2 6
9 8
8 10
6 1
10 1
7 10
7 5
1 7
10 1
10 6
9 5
4 7
3 1
6 2
8 1

output:

0000000000

result:

ok single line: '0000000000'

Test #25:

score: 0
Accepted
time: 740ms
memory: 105244kb

input:

500000
449813 382048
267805 409476
197021 142943
96520 14286
190014 29290
99779 205030
448520 397521
268137 275440
496824 335557
16533 145194
312001 288682
216668 141561
412086 264971
8513 23395
249165 57914
236009 266421
478739 117971
378416 334959
30 103303
190090 265064
77784 425899
8527 7260
190...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #26:

score: 0
Accepted
time: 783ms
memory: 104652kb

input:

500000
436359 153184
32329 245730
128439 94252
481002 164655
417808 461117
293685 420500
194999 195958
280286 312282
446105 64214
160786 313954
441934 232342
217798 17452
381699 240754
172009 261706
138562 497017
54835 71129
260680 242928
221836 99517
319330 405859
92116 178949
348302 78763
412522 3...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #27:

score: 0
Accepted
time: 751ms
memory: 105152kb

input:

500000
383544 231141
285165 154570
122599 89711
46649 305329
398481 286225
419333 167044
266408 16517
157370 342641
172616 100599
451993 33673
159972 316911
123808 441854
48681 185685
1689 404615
25385 492198
187713 81217
18819 286913
330555 195588
395991 142350
53980 186664
349053 41494
115371 4848...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #28:

score: 0
Accepted
time: 817ms
memory: 103528kb

input:

500000
437813 323962
324213 393428
83291 203367
444398 289380
443031 481209
69006 370164
382855 266949
249819 418632
142657 198142
227961 248299
245051 260019
331799 376496
436608 352312
306698 65006
297667 209503
282247 439175
92723 132762
66063 445253
159315 61140
344595 383848
488186 111442
36311...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #29:

score: 0
Accepted
time: 648ms
memory: 108984kb

input:

500000
443481 69310
81987 31083
350373 433156
63308 244157
61628 309800
435781 107127
217715 425206
361237 429146
232558 223217
439350 90619
417524 147338
284888 67603
94896 70841
236698 425487
388632 276131
316983 51040
162034 56727
335486 77859
148246 173062
39657 436405
68722 276656
358284 69076
...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #30:

score: 0
Accepted
time: 703ms
memory: 106672kb

input:

500000
216800 474916
255518 400474
434284 115244
1985 432478
398197 184716
278162 414983
262912 427124
168526 291145
162657 405850
372423 487503
98249 412887
177396 200269
164161 200294
232588 118959
76868 1511
459335 399309
182103 360926
104187 75557
494416 168425
14894 230053
376283 372973
379449 ...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #31:

score: 0
Accepted
time: 625ms
memory: 110880kb

input:

500000
129908 181285
247972 254107
21450 32185
484769 242965
355740 188535
207085 446844
360620 29318
402339 196327
148137 482471
339184 147698
53648 245350
381348 97244
349385 423200
421510 243468
485318 297421
338674 307850
95730 316255
85531 361113
238665 217923
436371 467095
253039 496000
407840...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #32:

score: 0
Accepted
time: 790ms
memory: 101180kb

input:

500000
400687 155492
144221 323468
218204 494237
391809 256925
317411 459870
295418 336450
398270 344329
296440 113027
287397 201370
16825 495696
23487 157882
313549 276131
168897 116830
183472 454694
316758 403067
68845 495888
124531 451565
424366 248526
431464 205058
317235 494211
326062 159714
41...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #33:

score: 0
Accepted
time: 559ms
memory: 111860kb

input:

500000
203829 75411
55235 389414
316162 427357
497415 386988
473462 434719
58669 273215
123197 304988
493876 461323
116153 420890
306075 477844
31279 274564
460706 115100
360768 458006
322608 406908
38993 367071
130497 443709
248473 220283
372992 98644
44225 284213
336644 283299
346314 406997
123738...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #34:

score: 0
Accepted
time: 706ms
memory: 104628kb

input:

500000
242660 386154
211753 485343
169536 327281
23018 58601
227943 213529
397224 100882
107969 164965
30078 434321
302391 144865
489002 484336
287165 5922
433048 416246
8224 171798
400682 74417
220479 148166
396156 173297
493955 466764
408490 44671
318635 89875
128971 328174
369258 350792
415068 16...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #35:

score: 0
Accepted
time: 677ms
memory: 105636kb

input:

500000
89729 46453
89729 424405
89729 329263
199363 33750
241918 89729
218219 407035
471196 208242
89729 138544
141501 89729
357638 430194
267888 475362
22301 148916
151438 33994
89729 67567
273456 89729
295901 105524
89729 174177
386293 89729
310494 315600
413870 89729
305099 15716
172120 89729
433...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #36:

score: 0
Accepted
time: 733ms
memory: 105776kb

input:

500000
309046 252194
26438 269868
78029 71623
344570 482371
299357 422976
283413 425913
109831 237090
215143 431957
387346 175831
392962 305721
144311 447338
10433 295636
496389 82512
214301 27396
428526 256442
156885 417933
226324 467008
63772 231947
372519 315863
271722 73684
416963 144880
405132 ...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #37:

score: 0
Accepted
time: 784ms
memory: 104944kb

input:

500000
154742 362700
249796 380579
343241 430847
203442 426995
208672 476398
472634 322655
34994 138240
26094 159521
273982 230077
215552 484406
113983 402463
152320 177450
488085 161505
40897 486917
113128 377855
85153 46165
253035 378379
217427 495474
337629 394187
467754 84631
442543 170716
26872...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #38:

score: 0
Accepted
time: 799ms
memory: 103444kb

input:

500000
294939 98470
123572 226636
347853 11379
455233 202037
243638 320418
393785 331286
300769 207161
80569 282006
479859 315983
192069 348609
182404 32032
414545 86258
345510 246087
358966 307452
4760 222693
265012 237233
390449 40740
435199 428657
266940 171970
312060 149345
347938 385068
89298 2...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #39:

score: 0
Accepted
time: 792ms
memory: 101892kb

input:

500000
307432 202629
350787 400008
16883 491569
34659 238967
404678 42356
179527 197278
54900 319482
73711 188958
401250 119884
366201 245592
373181 282921
94363 370708
113082 434366
457916 426229
490815 79969
69452 441608
247966 63286
106235 479147
272332 494732
305700 324575
441227 283760
275913 2...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #40:

score: 0
Accepted
time: 751ms
memory: 106752kb

input:

500000
15441 18568
259726 366832
264928 175081
52077 145361
161351 427299
47701 28170
158914 95743
419569 40715
349110 176016
444143 94984
289536 174368
462310 68218
236049 458207
466569 400108
334015 416032
358211 211153
73614 272890
484008 158464
470082 295738
178449 440558
284236 67449
328481 243...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #41:

score: 0
Accepted
time: 592ms
memory: 111324kb

input:

500000
462511 381811
82472 81072
348472 463850
140915 156132
468971 297063
475783 39853
129712 395836
63266 22184
254250 49959
450221 449632
225968 110530
332004 6409
484358 409642
128194 495922
422963 85607
325303 35034
511 492246
371610 61593
209978 485360
265099 360956
59005 95891
104103 42673
20...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #42:

score: 0
Accepted
time: 541ms
memory: 111960kb

input:

500000
485018 15595
262485 400522
88152 202067
455312 129743
374203 458079
38223 384763
347741 375692
406410 221101
233704 352513
109719 141326
311274 263877
126979 352921
273519 177278
398198 293369
114465 472255
13912 21341
379334 32141
479475 131858
265346 331020
314130 383591
237218 213584
21863...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #43:

score: 0
Accepted
time: 760ms
memory: 101044kb

input:

500000
250235 99043
400339 110638
318866 449363
331553 188412
283626 151970
50023 326986
102521 105339
37585 465383
11291 258043
199301 388633
32019 238982
137661 246919
413511 82494
27850 99121
460066 329206
236389 439711
469446 360167
335431 36582
32263 474765
235799 168731
424190 141560
320080 23...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #44:

score: 0
Accepted
time: 751ms
memory: 104776kb

input:

500000
39428 220768
189015 353934
78186 161401
207558 214428
266690 49692
326880 331407
161173 181226
29301 497562
137803 436969
93503 400515
171816 29914
255528 141042
463121 28721
23390 160493
167767 380473
266117 248116
75642 122676
241132 313009
259850 477344
183271 288811
420313 284912
197240 1...

output:

000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #45:

score: 0
Accepted
time: 780ms
memory: 104840kb

input:

500000
332577 426401
192819 338661
20558 122387
94578 22821
493076 364911
368323 255641
275102 6358
38499 287184
95274 407987
168963 70037
477272 369464
132277 281535
402830 364033
431681 65290
604 34593
391415 7699
419824 236349
467390 171511
463333 309088
224315 60579
317782 200770
144813 130840
3...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #46:

score: 0
Accepted
time: 756ms
memory: 101844kb

input:

500000
362878 114735
240248 342000
361627 69082
276173 14336
108121 400609
242374 332580
190530 81061
497373 373049
29145 434044
273345 384588
253669 315085
100657 478968
56574 171467
231405 186027
277362 399622
177850 168677
137501 96343
428534 87805
138068 197755
309838 460717
361989 238506
116044...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #47:

score: 0
Accepted
time: 736ms
memory: 100592kb

input:

500000
141217 308222
250778 139292
4782 371766
302160 260688
173357 340792
214870 48497
216597 387073
196900 171289
183941 265915
48712 334045
131041 172651
53732 383112
321841 334406
446819 392605
122282 192692
270879 409003
31348 477356
208066 377825
170144 269037
8381 423779
172774 330394
76258 3...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #48:

score: 0
Accepted
time: 797ms
memory: 101328kb

input:

500000
159636 181518
200146 121753
898 144485
69205 406509
428051 220748
346629 209488
472125 465317
97674 362769
471110 342123
5774 89768
365165 262948
79350 140213
95977 301067
84252 345207
431358 379143
478436 177077
294884 457486
469460 404980
154895 234776
481666 163689
278434 34906
382745 2032...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #49:

score: 0
Accepted
time: 787ms
memory: 101232kb

input:

500000
355722 188817
227041 14392
352879 309125
453647 110163
263695 325865
101910 62436
276193 411997
243244 360164
216490 32788
282624 71159
104358 213329
386983 486189
189806 80801
349577 293458
222450 107972
157046 231996
201019 310199
450557 31128
496918 376942
186180 109174
412405 144942
19191...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #50:

score: 0
Accepted
time: 741ms
memory: 101264kb

input:

500000
432826 214768
156504 61815
365647 302181
314788 432909
200799 389496
305131 364634
446089 153594
56632 285077
40732 393339
81824 487290
165272 120414
314059 435005
203862 403394
450085 491715
77511 398124
20732 451245
235685 176538
39405 228082
325576 268480
314203 341691
83922 38110
330495 1...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #51:

score: 0
Accepted
time: 804ms
memory: 101820kb

input:

500000
381566 188928
197453 181104
472696 213433
124749 220771
58328 319626
34444 433380
340490 84119
485667 39842
71627 261695
3393 388988
404487 87277
338005 304286
337774 299304
259757 444254
438815 415490
299722 101846
285445 196164
142707 429460
240118 180097
309910 84234
253244 339842
478783 1...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #52:

score: 0
Accepted
time: 791ms
memory: 101292kb

input:

500000
29670 90845
292476 457435
1812 248775
56746 35644
90721 78120
171401 393218
280567 348023
262466 388560
156219 55921
118626 486576
171619 397465
445839 389408
208328 313511
85618 183403
473442 430498
286203 34901
309236 300275
323510 486591
152247 68030
69983 266681
339743 381641
326458 10796...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #53:

score: 0
Accepted
time: 760ms
memory: 104872kb

input:

500000
314207 298991
115915 128373
344110 447347
335663 247774
99223 491077
429109 428162
378740 64913
296354 404895
72694 66223
476945 59644
36297 346669
461727 219463
482491 174825
232966 78393
304459 178811
409666 310524
433202 421426
487581 161420
12739 175984
459624 62960
254334 453554
10234 37...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #54:

score: 0
Accepted
time: 773ms
memory: 106712kb

input:

500000
494220 44897
351375 210922
108194 31736
109836 145437
284435 92420
197599 31664
398728 83768
316130 161457
244040 271488
208664 39826
149052 234342
442005 275307
11832 450067
16165 293910
465790 204455
349285 377399
124111 298628
251883 12457
441911 47829
274419 4509
473484 119140
53733 32306...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #55:

score: 0
Accepted
time: 648ms
memory: 108800kb

input:

500000
306730 6836
179555 174629
230737 430910
475093 456318
345169 264000
171451 315855
121961 242703
425787 4897
264364 284961
444004 404451
230646 19351
498763 170595
139880 302997
83972 203824
6790 14141
451327 337745
281163 441258
147910 429812
69097 151170
454702 456299
430691 28316
102926 125...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #56:

score: 0
Accepted
time: 667ms
memory: 110444kb

input:

499988
387621 111519
272494 313144
235482 281936
216306 411621
189499 43854
243757 12441
91328 208739
326766 273436
404313 1705
56468 347997
2040 280868
295943 426695
352805 20039
399460 224185
38831 135968
292883 342212
217265 420990
303132 213913
63546 199234
56214 494058
191927 337729
211680 9292...

output:

111010111111011101111110111111110110000111111111101111111111011111011011111111011111111111110101111010011111101011111111111111111101111111111110111110011110111111111111100111111111101111111111111111111111111110110110111111110111100111111010111111101111111111111001111111110100101110110110100111111101...

result:

ok single line: '111010111111011101111110111111...1100101101011111101101101110101'

Test #57:

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

input:

500000
22449 41720
55635 275185
281523 163690
193173 404956
331918 176019
109563 470220
204477 281393
82422 300660
187763 245838
480169 251007
103442 378533
2773 216773
47740 135571
383951 4156
269874 418625
368937 261502
71744 68153
267587 214357
408802 105357
201546 230606
124009 215573
412196 356...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110111111111111111111111111110111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110111111111111101111111111111111111111111111110111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Test #58:

score: 0
Accepted
time: 657ms
memory: 105368kb

input:

500000
30056 101713
375042 311732
143113 68275
344886 224943
208248 88159
302233 427581
289749 36883
231810 270849
231050 312025
140673 442169
193298 296015
172854 456678
142272 443983
349899 93787
389177 490443
355849 117415
454989 490267
474386 76345
125051 12353
300972 302640
227147 414518
101476...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #59:

score: 0
Accepted
time: 524ms
memory: 111340kb

input:

500000
113309 72508
390403 120955
269616 306472
42932 308197
150963 11273
360103 473883
124251 331998
24986 49652
25223 120207
88049 412789
412044 8345
17338 234454
12386 237311
249428 380516
418155 3714
289208 287911
47330 275862
266804 315950
389316 277095
465778 227186
86215 156164
238196 53119
4...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #60:

score: 0
Accepted
time: 550ms
memory: 111836kb

input:

500000
396897 348370
251702 183790
136483 293644
267209 62570
443127 271767
62401 269912
372169 274969
376279 204415
182636 419941
4314 373618
97967 464256
167582 319155
432878 242759
482099 463006
62954 73697
785 467966
194792 320050
489082 15234
40077 224347
345012 221887
203706 388232
5305 61283
...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #61:

score: 0
Accepted
time: 550ms
memory: 111672kb

input:

500000
335833 352904
355493 330443
375674 143465
106942 357292
26286 478206
415162 326517
107941 215926
265573 52492
80605 264985
281568 395097
49079 262051
113467 244477
299239 300240
273159 474579
25781 343993
8099 325234
268543 165282
459341 125105
236501 476213
114717 233087
57181 4849
426558 27...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111011111111111111111111111111111111111111111111111111111110111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111101'

Test #62:

score: 0
Accepted
time: 723ms
memory: 99956kb

input:

500000
317886 63841
409560 244385
42397 130543
125804 499977
448482 341535
359965 443120
170656 283061
359488 96775
490888 54661
281729 83102
235729 238427
185762 5390
491463 178330
362649 180451
372558 278603
160425 233368
168180 316541
470574 206089
20059 362819
97411 423504
293597 427638
62376 11...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #63:

score: 0
Accepted
time: 783ms
memory: 98080kb

input:

500000
352488 101054
280926 203015
392984 105040
369793 73336
352895 328132
380988 265905
472175 489968
191510 364642
137393 30426
401331 483351
11744 325305
400223 194679
293501 221668
375162 19085
459373 322626
490162 53791
107557 279031
295166 381373
144179 398360
119260 369182
184364 92391
4772 ...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #64:

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

input:

500000
362944 278045
274171 333394
83850 35871
51750 449632
344613 121576
147081 418330
308975 111412
21144 385192
357987 160512
442631 239364
226445 215367
346410 363728
488364 346857
256362 101777
499940 478137
333181 197903
104331 334246
113907 319084
266185 456272
147804 151338
245567 420096
170...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #65:

score: 0
Accepted
time: 777ms
memory: 102420kb

input:

500000
198523 190964
277123 391930
346471 405922
17122 139447
431813 485838
219348 261683
116039 334038
476149 424501
162909 482058
74735 484852
279613 147924
224117 69332
4572 248214
393652 146467
100415 400867
95907 176331
14134 119082
6988 40824
368918 292859
24145 26647
114070 237964
360337 2441...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #66:

score: 0
Accepted
time: 579ms
memory: 97520kb

input:

500000
348954 229176
372930 470694
377257 415766
469213 497227
71013 248434
469213 432420
469213 443320
135549 469213
334586 474996
43704 274895
193980 446449
20787 485378
252740 273354
270639 461999
142624 469213
104223 492881
469213 367420
469213 406637
65957 54782
469213 320717
89362 24707
469213...

output:

100110110110111010100111111111100111011111001101000001110110100111011101111100010001110010111011010111100111100000101011110111001111110101011101000001111111110010011000011111101110100110111110111101101110111010110101010101010111111011101011110111111101011001110001111110110011010111011110111010011011...

result:

ok single line: '100110110110111010100111111111...1111011010111111010111110010001'

Test #67:

score: 0
Accepted
time: 570ms
memory: 97172kb

input:

500000
61595 301409
265689 409756
193019 255403
1530 299644
9097 265689
176901 351310
329289 294835
160532 282203
127999 265689
129388 106714
118203 262542
8353 47957
265689 230799
323196 265689
452482 300385
265689 396077
265689 288786
207051 265689
34169 309082
265689 445742
367878 25967
265689 83...

output:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok single line: '000000000000000000000000000000...0000000000000000000000000000000'

Test #68:

score: 0
Accepted
time: 542ms
memory: 97060kb

input:

500000
113002 386607
250773 170055
43518 339481
85430 288682
248634 409861
83541 371725
386607 233070
178773 386607
185003 456782
135439 386607
318391 453876
252335 388354
225915 12652
386607 304928
186277 233922
386607 304940
471393 248082
143425 386607
492575 428081
101384 386607
386607 285533
339...

output:

011111111111111111111111111111101111111111111110111111111110111111101111101111111111111011111111111111111111111111111111111111111111110111111111111111111101110111111111111111111111111111111111111111111111111111111111110111110111111111111111011111101111111011111110111111111111111111110111111111111111...

result:

ok single line: '011111111111111111111111111111...1111111111111111111111111111111'

Test #69:

score: 0
Accepted
time: 575ms
memory: 96968kb

input:

500000
32852 91684
91684 258120
103830 91684
154007 294482
262023 329088
91684 182293
138586 91684
91684 183323
414855 196306
6640 307572
350311 91684
241794 51080
91684 105232
51165 218126
91684 69262
173355 91684
314301 91684
91684 405309
300266 91684
27359 473622
91684 84530
7499 173430
91684 302...

output:

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101111111111111111111111111111111111111111111111111...

result:

ok single line: '111111111111111111111111111111...1111111111111111111111111111111'

Extra Test:

score: 0
Extra Test Passed