QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#523350#2673. Broken linehyforces100 ✓0ms0kb/11238.6kb2024-08-18 08:44:342024-08-18 08:44:34

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 10
Accepted

input:

20
80 32
59 15
54 47
22 84
53 28
68 40
60 11
61 100
16 83
64 20
20 6
32 2
50 98
72 37
66 4
18 94
41 25
97 99
30 86
74 49

output:

23
0 100
97 100
97 2
16 2
16 98
80 98
80 4
20 4
20 86
74 86
74 11
41 11
41 47
72 47
72 15
59 15
64 15
64 40
68 40
68 28
22 28
22 94
18 94

result:

ok segments used: 23

Test #2:

score: 10
Accepted

input:

600
4181 5934
8269 1910
1135 1042
9056 967
9334 777
587 9419
4146 4174
369 272
9559 565
2673 7390
697 690
1809 1825
5163 4888
5710 4595
3923 6309
407 369
8401 8308
137 9849
375 9666
1993 8075
3950 6262
153 98
5631 4650
423 379
6854 6677
8078 8019
1122 1001
3172 6890
1415 8551
16 13
5617 4680
6986 34...

output:

603
0 9977
10001 9977
9979 9977
9979 9948
9956 9948
9956 9922
9915 9922
9915 9810
9896 9810
9896 9785
9859 9785
9859 9750
9830 9750
9830 9706
9765 9706
9765 9617
9612 9617
9612 9496
9564 9496
9564 9468
9526 9468
9526 9412
9468 9412
9468 9293
9353 9293
9353 9157
9240 9157
9240 9137
9144 9137
9144 904...

result:

ok segments used: 603

Test #3:

score: 10
Accepted

input:

5000
13658 21072
18042 16630
16975 1038
16296 20322
11761 2316
20514 23077
11142 24113
18422 5030
22188 1285
17681 12204
23233 1605
14421 5888
19084 4247
18299 4730
15406 14956
12457 1426
16156 18818
22831 15053
17882 13003
8985 6711
5700 20794
15895 1223
1701 11992
17803 9445
3276 24814
20014 8453
...

output:

5003
0 24989
24994 24989
24994 3
7 3
7 24987
24991 24987
24991 14
14 14
14 24973
24980 24973
24980 22
17 22
17 24972
24971 24972
24971 23
25 23
25 24970
24970 24970
24970 25
27 25
27 24962
24965 24962
24965 27
28 27
28 24957
24963 24957
24963 28
33 28
33 24943
24962 24943
24962 31
36 31
36 24940
249...

result:

ok segments used: 5003

Test #4:

score: 10
Accepted

input:

50000
162810254 173542044
131806536 134868801
177983821 182195530
77989137 79420333
230712167 232149508
70033502 73036822
258790836 256512150
191152483 198173959
131095846 136355055
210183460 211985186
69165837 71549040
216870421 217340827
217576066 223002330
269827556 267414548
265332385 263332102
...

output:

50003
0 304025617
305963023 304025617
305963023 1149185
720494 1149185
720494 303861904
305259016 303861904
305259016 1577559
986089 1577559
986089 303632395
305063617 303632395
305063617 1714171
1213235 1714171
1213235 303587124
304749757 303587124
304749757 2238123
1479937 2238123
1479937 30282584...

result:

ok segments used: 50003

Test #5:

score: 10
Accepted

input:

72018
585207703 454678775
135340011 90012744
427410227 285279812
277034947 815479924
767889223 650391414
56776800 38343603
159321350 894034265
263456785 825208174
551836065 517720477
816752958 367095052
824851014 587012194
944495617 528295070
164775515 110129806
481851040 674469677
977596437 3815814...

output:

72021
0 662860761
999997719 662860761
999997719 332957944
499824810 332957944
499824810 662852594
999982763 662852594
999982763 332958788
499832495 332958788
499832495 662851816
999927506 662851816
999927506 332961940
499832672 332961940
499832672 662837812
999900517 662837812
999900517 332995585
49...

result:

ok segments used: 72021

Test #6:

score: 10
Accepted

input:

91891
1681280 920391
1669721 3112421
893461 3347872
609889 3333832
370989 1661130
2521939 4182782
3886747 1655823
3028709 1680669
3964652 3327701
1148111 3336594
1662231 1800194
1578700 1672400
2953781 4614099
761784 904441
1654436 4771411
2968381 3667422
341147 331333
1073625 597971
1684123 1277656...

output:

91894
0 5015100
5017676 5015100
5017676 1
1 1
1 5010186
5011995 5010186
5011995 359
877 359
877 5009548
5010874 5009548
5010874 711
1309 711
1309 5008676
5009990 5008676
5009990 972
1598 972
1598 5008251
5009986 5008251
5009986 1212
1928 1212
1928 5008232
5008458 5008232
5008458 1335
1940 1335
1940 ...

result:

ok segments used: 91894

Test #7:

score: 10
Accepted

input:

100000
877729287 123463230
628455599 371844753
611771025 388513638
708809868 292324833
475108975 524961002
213166965 785202191
159892464 839177581
212255706 786206822
771947165 228921776
940603148 61395788
617544549 382868151
264052193 735515281
64537051 933848048
947225573 54088126
467538673 532253...

output:

100002
0 999994682
17961 999994682
18511 999994682
18511 999971212
85131 999971212
85131 999961491
96359 999961491
96359 999944342
131314 999944342
131314 999927788
158381 999927788
158381 999884401
166088 999884401
166088 999860589
191500 999860589
191500 999848308
202812 999848308
202812 999832446...

result:

ok segments used: 100002

Test #8:

score: 10
Accepted

input:

100000
644647646 355384235
499961492 820258740
854367055 145679950
440333659 440291336
103639655 103600748
679986923 500013922
778834283 221144159
498680582 499981349
545104742 545044158
500006728 852969852
792154968 500024348
500000582 71514436
500008278 731076094
988482174 500022671
434278846 5657...

output:

100003
499987570 0
499987570 500031913
500032586 500031913
500032586 499979181
499938327 499979181
499938327 500075781
500038019 500075781
500038019 499965729
499928809 499965729
499928809 500094641
500075111 500094641
500075111 499910766
499915324 499910766
499915324 500099655
500104541 500099655
5...

result:

ok segments used: 100003

Test #9:

score: 10
Accepted

input:

100000
15391657 11517327
22446258 23189274
19859219 20717066
8745117 18357408
21652244 22278026
18047032 18694605
15207726 11617020
20312790 20824193
5392565 5660262
10093834 10286142
7929401 8220312
22911363 24063518
9793591 10384421
22860663 4239417
22287877 23325924
10730706 16276730
8868268 9459...

output:

100003
0 27066203
26985929 27066203
26985929 12276
66576 12276
66576 27003976
26930136 27003976
26930136 23801
70808 23801
70808 26981522
26915086 26981522
26915086 25511
75340 25511
75340 26973422
26901572 26973422
26901572 27784
96798 27784
96798 26969746
26876793 26969746
26876793 34024
114127 34...

result:

ok segments used: 100003

Test #10:

score: 10
Accepted

input:

100000
871580431 324339465
608832723 608974179
497110076 673260310
821626947 917523551
303888339 950303328
118051514 68977600
473669236 453262278
190232534 106370468
471887368 106325912
319197352 952628544
869147922 333299412
762747332 707558080
403322594 965438401
784161605 68499270
364913453 69164...

output:

100003
0 999994682
999995247 999994682
999995247 1762
17961 1762
17961 999980588
999995127 999980588
999995127 2158
18511 2158
18511 999971212
999978824 999971212
999978824 17147
24682 17147
24682 999966497
999974796 999966497
999974796 21894
85131 21894
85131 999961491
999933132 999961491
999933132...

result:

ok segments used: 100003