QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#276252#6416. Classical Scheduling Problemucup-team2262AC ✓3398ms30140kbC++234.3kb2023-12-05 18:47:382023-12-05 18:47:39

详细

Test #1:

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

input:

2
4 100
20 1
40 4
60 3
30 3
1 5
10 1

output:

2
3
1 4 2 
0
0


result:

ok ok, 2 test cases (2 test cases)

Test #2:

score: 0
Accepted
time: 174ms
memory: 7688kb

input:

10000
21 1892
174 13
604 15
170 2
413 11
899 2
531 12
651 17
553 9
429 8
837 14
937 12
577 7
532 11
19 2
173 10
165 6
762 15
221 6
945 13
302 19
7 3
54 26066
812 31
432 24
240 37
171 39
204 47
174 30
569 1
467 5
624 42
734 35
907 3
568 23
802 40
991 32
119 13
187 27
739 42
891 14
550 44
374 16
483 1...

output:

7
8
14 3 21 16 18 12 9 15 
53
53
54 7 11 8 38 51 25 53 15 43 18 49 20 21 24 40 36 12 31 2 35 48 16 26 42 44 52 6 47 1 46 45 32 34 10 22 3 33 4 13 23 37 9 17 41 27 30 19 39 5 50 29 28 
12
12
8 1 7 6 5 4 14 15 12 2 13 16 
7
14
40 1 41 14 8 13 28 38 21 37 24 11 43 33 
10
10
7 28 10 22 12 29 9 19 15 5 
...

result:

ok ok, 10000 test cases (10000 test cases)

Test #3:

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

input:

10000
31 13863446
88657 7
999554 9
118529 26
847277 28
370661 19
261018 28
635679 10
228483 3
645280 9
476021 13
778546 23
325779 9
833392 1
328146 30
873417 6
327100 31
9792 26
327533 31
361518 30
74201 17
220223 12
395716 28
92721 14
296968 27
177176 14
698707 6
130653 14
639654 14
883578 27
94779...

output:

29
30
31 13 8 26 15 1 12 9 2 7 21 10 23 27 25 28 20 5 11 30 17 3 24 29 6 22 4 14 19 16 
4
4
2 4 3 5 
2
2
2 3 
6
7
10 25 18 13 3 17 4 
6
6
10 12 2 8 9 5 
0
0

13
13
8 5 11 1 10 4 7 15 13 9 2 14 6 
7
7
6 3 5 7 1 8 10 
12
15
8 7 18 15 16 6 10 9 21 12 5 20 14 3 19 
21
24
12 14 11 17 23 19 20 16 15 3 21 ...

result:

ok ok, 10000 test cases (10000 test cases)

Test #4:

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

input:

10000
1 148649924
152343597 1
23 2873231053
341227727 2
97244309 22
382344096 18
92079917 18
716353906 4
963429195 14
131618841 1
637584871 10
210001357 11
578579097 4
246465963 6
968391199 2
950133297 8
509339869 18
427327942 11
542440792 6
451945776 11
62800058 4
275583515 14
347078482 12
49062133...

output:

0
0

7
7
7 1 18 10 5 11 16 
58
59
50 11 5 10 38 40 20 54 3 1 21 58 51 39 28 42 35 9 8 49 59 31 22 60 27 48 12 37 56 23 52 16 41 55 43 46 24 47 62 2 7 19 61 15 36 25 45 14 34 30 4 17 53 33 26 29 44 6 32 
6
7
8 1 2 4 9 14 10 
0
0

0
0

8
8
1 7 3 9 8 4 6 2 
9
11
11 9 16 4 15 24 10 12 26 21 18 
12
12
10...

result:

ok ok, 10000 test cases (10000 test cases)

Test #5:

score: 0
Accepted
time: 351ms
memory: 7740kb

input:

1000
82 7692098567
820091633 60
355742811 58
33274857 31
608429291 33
997797811 20
467502732 30
853286378 8
652795874 46
342018780 22
758395270 23
273397259 44
363579524 49
911951022 78
19637469 55
648691248 73
289596934 53
538807472 31
612554087 13
925583232 12
934115550 2
348467623 19
793103161 30...

output:

22
31
70 39 78 44 23 24 73 72 18 56 21 9 76 79 55 30 46 65 6 3 38 17 14 81 48 50 69 59 36 33 41 
333
336
304 337 43 206 306 236 221 320 327 350 4 195 254 135 48 280 310 237 233 348 118 311 224 7 57 158 259 2 73 22 139 50 338 278 231 30 146 276 133 232 239 263 124 47 35 16 66 228 252 6 308 328 344 16...

result:

ok ok, 1000 test cases (1000 test cases)

Test #6:

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

input:

100
1903 595649261976
242016788 1493
744829262 608
858593044 1816
156659209 1534
114991300 737
762579703 695
727190226 706
259042985 1281
43413203 314
845442517 462
566008000 1873
396423639 557
642518388 234
224641323 1517
952294191 985
706509300 1598
600896534 1474
40659577 676
385404080 236
626269...

output:

1277
1425
1303 1691 532 1399 1568 1364 1446 132 1845 700 906 389 1205 408 697 417 560 884 162 1546 1283 687 1634 788 1488 1789 139 563 1153 379 881 1737 525 755 855 637 1207 530 1297 242 887 1092 1432 1684 1158 1843 110 1888 294 566 238 276 1415 858 247 1654 938 156 424 725 1343 968 191 1036 60 452 ...

result:

ok ok, 100 test cases (100 test cases)

Test #7:

score: 0
Accepted
time: 1285ms
memory: 12996kb

input:

10
44263 8178145065835
144776695 4988
633784692 681
124897155 10140
486257408 37126
851769386 39526
842969054 41273
255566344 35680
453250390 22330
451088941 12204
619362016 38143
532744479 19473
674895021 28375
9336149 42718
66645534 4600
788583869 43466
74789962 44203
394416695 18040
400692349 209...

output:

18932
24297
1651 31784 23731 33707 7459 38020 17690 24971 43775 2579 42269 12345 40818 5106 41370 9571 1136 20734 33320 2378 43792 22839 31672 42393 3552 1415 28931 40212 9922 16202 12209 36838 37967 14196 40541 42044 22396 17369 1824 28241 9108 30968 15746 42842 39111 26693 37877 9039 33454 5516 37...

result:

ok ok, 10 test cases (10 test cases)

Test #8:

score: 0
Accepted
time: 3066ms
memory: 28696kb

input:

1
200000 57702603292869
895088145 19931
718152698 145634
769081244 195129
55087510 17432
215103308 38922
856865039 8045
427652731 169525
293884192 171894
21414244 46946
623839144 178383
12560296 182397
24930343 41111
35462858 35129
835318852 151986
599094451 25610
510310473 182086
13017134 125354
31...

output:

125582
143872
58272 48041 58912 108762 186431 170011 24249 20016 54332 21961 29406 177414 103401 153330 155058 134288 9592 69727 154243 109875 178882 150454 188454 31779 151806 40292 180266 120240 158148 142886 133093 1318 59171 87854 112060 115352 193962 6507 127330 189209 178039 133979 101197 1402...

result:

ok ok, 1 test cases (1 test case)

Test #9:

score: 0
Accepted
time: 2331ms
memory: 26900kb

input:

1
200000 12588150171192
697033205 186664
970477791 19327
89605019 14812
737206044 50478
873649284 20706
932998866 56365
904409119 123817
622032436 43875
690673101 87090
321866772 190284
480046085 18004
398840764 188598
65227144 174007
747187240 89799
347289225 42777
525044511 113973
443965741 85452
...

output:

35303
58673
103910 5514 83226 157434 18328 1676 67771 115655 188335 61635 57020 42871 18919 179171 71742 73571 19954 23413 162446 117575 162751 138306 168976 145649 53152 187393 12587 148450 139043 157018 358 28224 132730 148102 120954 94213 14884 104534 53995 168261 136633 90257 182268 78489 149362...

result:

ok ok, 1 test cases (1 test case)

Test #10:

score: 0
Accepted
time: 2084ms
memory: 27156kb

input:

1
200000 10006366792128
443157143 37820
891603781 189849
777301083 136035
751373772 66490
129295230 83820
856462092 153518
90933608 121576
985421539 171766
894499409 15340
504842122 150235
220633943 37522
599038908 146919
95632289 63799
846784841 64938
366209521 142907
786525536 3703
811575655 14202...

output:

29564
51591
49228 140105 117187 79909 59080 129575 179458 35997 92636 78963 191954 47476 166602 67610 68443 162132 188013 93482 130556 174065 176931 79202 70638 109430 36979 52181 117196 154549 31824 61046 196633 78583 149608 163037 48416 114099 171937 161169 179680 96970 85728 35896 184119 52832 19...

result:

ok ok, 1 test cases (1 test case)

Test #11:

score: 0
Accepted
time: 2936ms
memory: 28608kb

input:

1
200000 59325562957383
597693992 88976
705975556 136180
769285809 57258
925484458 82502
934515757 179637
34493116 193774
292497126 127847
927349507 123849
421832595 135078
86561264 85994
324999063 89744
343030484 72536
478691338 120886
821844439 48589
559996659 43036
315388256 117624
403103475 1985...

output:

128371
145900
7593 113727 176694 174499 181924 199182 127221 87496 141206 102926 98504 187542 120685 98688 11176 103184 102187 134223 113958 109372 66792 168864 54835 66821 14038 30578 150085 46907 59257 52037 45608 100945 164279 124778 25573 111217 127755 73791 167111 36387 8969 94077 9954 2976 119...

result:

ok ok, 1 test cases (1 test case)

Test #12:

score: 0
Accepted
time: 2665ms
memory: 26340kb

input:

1
200000 31416577732624
340512981 172835
292213892 73998
597003807 154289
318028093 98514
699376263 108159
718827833 34030
170900966 125605
621404415 43228
741228044 63328
772056878 189049
376794916 166159
867292793 30857
509371589 34870
262300647 191024
885419246 143166
285220760 7354
455026503 551...

output:

75413
101049
105028 155824 66004 82280 48294 18952 21805 186643 62337 16616 157677 164173 5816 96387 199972 62910 22664 5913 160771 99559 30427 1792 173428 14914 58377 32784 36584 178442 132426 155100 111533 97082 73810 70232 105538 12598 91108 185651 128587 153821 146418 142343 66396 114131 115591 ...

result:

ok ok, 1 test cases (1 test case)

Test #13:

score: 0
Accepted
time: 3029ms
memory: 28932kb

input:

1
200000 77196200005652
81679500 15479
628507583 44521
548869801 108216
202160806 81822
13811372 171273
182622346 74287
999301204 131876
340742380 195311
535907253 183066
856296272 149001
972508704 18381
165273242 132281
159309262 124662
873186151 141971
205568022 108704
407608325 121275
550726777 7...

output:

160837
171651
159502 179857 22832 78421 114371 7298 35723 175323 123370 13685 129827 57192 13511 174587 54546 142321 57825 163655 105297 73357 78132 190136 48404 55375 10930 108886 192456 62805 118237 178429 76241 41946 106066 18543 63645 10049 170477 139000 60594 76970 115099 197512 188988 86116 13...

result:

ok ok, 1 test cases (1 test case)

Test #14:

score: 0
Accepted
time: 1628ms
memory: 26000kb

input:

1
200000 1429350937284
526226223 66634
289923614 182339
134908142 29440
973080309 130538
582853772 67091
195951976 147247
137707811 162339
365463069 147394
380937199 144019
634246766 52056
307148783 70603
942004511 57898
3571365 14454
359533636 117110
505575330 33026
877559277 43709
315326693 135586...

output:

6240
16911
111987 193805 25491 110447 155766 31269 187426 52349 137469 187594 85437 83574 87759 123058 194720 98682 182644 162592 158480 147893 24815 128806 150110 159248 116753 187857 12812 55667 79898 102795 70735 85402 167329 127272 126668 89902 22058 124574 182590 90237 34464 132938 126012 26937...

result:

ok ok, 1 test cases (1 test case)

Test #15:

score: 0
Accepted
time: 2711ms
memory: 26260kb

input:

1
200000 39468068349617
969120466 150494
24726062 152861
521763411 159175
558919972 113846
111536151 195612
168882091 11695
701218828 135906
443830562 75285
737929800 63757
515973716 179303
214070560 147017
369040750 16219
495454680 95733
311277733 92249
952085762 133155
118363682 124927
505405455 1...

output:

91018
113879
24449 185807 150869 166964 54964 100933 148696 132253 45967 163576 62142 79343 28709 30683 83191 146549 158192 129656 30134 566 70461 106652 190872 103266 22579 186320 147973 106621 45748 75583 99715 97844 70315 158578 184388 191737 26755 198356 151834 144666 112521 165800 182425 153991...

result:

ok ok, 1 test cases (1 test case)

Test #16:

score: 0
Accepted
time: 2795ms
memory: 26224kb

input:

1
200000 31680217124307
410362237 1650
769634917 66488
96046721 80398
716530488 129858
253073129 58726
691347343 84656
984801589 166368
217597531 27368
698528858 192007
386379101 82358
959877570 199240
764803504 141836
339991881 152821
433451122 43196
931710433 33285
806690407 14656
444294191 16018
...

output:

75884
100960
117506 57521 192476 121537 136754 159098 49798 130761 26849 9338 20778 42279 54020 92876 10328 97264 171560 146910 75587 34260 28513 58902 33316 55884 186505 52236 64914 33877 117772 80037 65242 64579 157261 150164 16460 87624 98297 156014 72512 104725 42479 171757 9563 37209 183461 107...

result:

ok ok, 1 test cases (1 test case)

Test #17:

score: 0
Accepted
time: 2958ms
memory: 26920kb

input:

1
200000 50189655538839
144918862 85509
874582319 37010
622923939 1621
680745970 178574
362565239 154544
173413093 124912
283423444 107231
626630752 179450
162775379 111745
65593607 18117
954635150 51462
934284433 100157
127117617 42613
431086468 185631
504582560 166119
807664334 161282
542058258 39...

output:

111328
132020
65239 74810 25962 30880 13270 117993 37166 155274 111474 198726 21710 156515 119066 186499 140318 16899 170836 58998 184695 76244 158560 146851 152678 11302 176485 110392 117527 24706 91795 77167 149964 102405 7441 129247 94760 53101 188030 148103 146404 185851 116171 14225 80493 11751...

result:

ok ok, 1 test cases (1 test case)

Test #18:

score: 0
Accepted
time: 2188ms
memory: 27104kb

input:

1
200000 27981446446585
582855670 103961
141413192 7533
273949246 131356
958444006 161882
431697304 83066
615079319 165168
918652616 113502
177807831 98829
514133749 7290
232048977 178069
876775045 127876
877483551 168877
266897215 132405
894118428 160771
163824546 66248
614407879 51011
300135242 96...

output:

68351
93640
127992 123989 76425 136721 186678 130915 103303 173295 13765 15140 162821 25675 41194 8080 33973 99344 41752 37881 93478 8384 165952 98603 182180 33386 140033 191686 139795 48585 81560 2763 28966 38209 7618 195413 176301 50450 187497 149393 185965 173999 50402 47319 92386 23783 75827 198...

result:

ok ok, 1 test cases (1 test case)

Test #19:

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

input:

1
1 1
1 1

output:

1
1
1 

result:

ok ok, 1 test cases (1 test case)

Test #20:

score: 0
Accepted
time: 1770ms
memory: 28456kb

input:

1
200000 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1...

output:

1
1
1 

result:

ok ok, 1 test cases (1 test case)

Test #21:

score: 0
Accepted
time: 1585ms
memory: 28444kb

input:

1
200000 1
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1...

output:

0
0


result:

ok ok, 1 test cases (1 test case)

Test #22:

score: 0
Accepted
time: 1659ms
memory: 28440kb

input:

1
200000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
100...

output:

0
0


result:

ok ok, 1 test cases (1 test case)

Test #23:

score: 0
Accepted
time: 1606ms
memory: 28488kb

input:

1
200000 1
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1...

output:

0
0


result:

ok ok, 1 test cases (1 test case)

Test #24:

score: 0
Accepted
time: 1264ms
memory: 30140kb

input:

1
200000 200000000000000
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1...

output:

200000
200000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...

result:

ok ok, 1 test cases (1 test case)

Test #25:

score: 0
Accepted
time: 1252ms
memory: 29984kb

input:

1
200000 200000000000000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200000
1 200...

output:

200000
200000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...

result:

ok ok, 1 test cases (1 test case)

Test #26:

score: 0
Accepted
time: 1218ms
memory: 27908kb

input:

1
200000 200000000000000
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
1000000000 1
10...

output:

200000
200000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...

result:

ok ok, 1 test cases (1 test case)

Test #27:

score: 0
Accepted
time: 1273ms
memory: 29908kb

input:

1
200000 200000000000000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
10000...

output:

200000
200000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9...

result:

ok ok, 1 test cases (1 test case)

Test #28:

score: 0
Accepted
time: 1535ms
memory: 28644kb

input:

1
200000 100000000000000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
1000000000 200000
10000...

output:

0
0


result:

ok ok, 1 test cases (1 test case)

Test #29:

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

input:

1
10 299
10 2
53 7
83 9
15 3
28 4
47 9
75 2
62 9
23 5
8 4

output:

7
7
1 7 4 10 5 9 2 

result:

ok ok, 1 test cases (1 test case)

Test #30:

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

input:

1
1000 1841609
5209 422
7129 618
893 700
8231 647
9844 314
6789 347
3968 711
5864 416
9564 190
7357 874
530 87
7935 754
3475 772
2898 206
9252 717
6604 686
7451 188
9366 977
6294 618
3919 454
8164 232
8617 403
5257 191
8554 626
1727 952
205 759
3312 453
4798 387
7005 774
3570 892
3034 45
5101 466
59...

output:

447
546
553 118 153 207 877 548 999 359 328 899 83 791 373 427 348 733 276 576 198 559 227 369 254 590 231 734 120 850 906 248 888 212 638 488 848 432 881 336 245 31 226 333 302 980 124 372 619 697 320 286 275 474 838 829 631 357 235 290 106 957 518 577 831 433 201 846 377 404 477 764 988 692 11 374...

result:

ok ok, 1 test cases (1 test case)

Test #31:

score: 0
Accepted
time: 2391ms
memory: 27100kb

input:

1
200000 24577580970703
656715015 199803
956780431 189922
293564365 139627
914941210 61288
941205521 178624
674601481 87247
173334239 146057
362284792 31141
248508805 184184
947672840 51295
400265751 140002
24148576 188821
351568365 57409
787832999 113156
743686688 21173
841349516 186123
902806032 1...

output:

61504
87275
90035 6414 46243 136769 129409 32603 39500 142246 178515 32483 35602 168691 151109 199413 839 189101 191870 71958 164613 137923 173585 58440 15263 63552 29310 133364 126344 102270 183536 190119 39090 35830 58793 31972 148357 136736 91258 58915 106800 198320 174703 47934 72408 168682 1328...

result:

ok ok, 1 test cases (1 test case)

Test #32:

score: 0
Accepted
time: 2279ms
memory: 24352kb

input:

1
200000 1623
691944610 133408
244110549 35622
820275739 179459
22018946 195637
22760475 51629
637640711 69587
123326171 136444
892528944 106021
356879446 183488
912241290 119398
275436827 84437
453945181 70240
947197540 100566
283979992 64330
473324390 69248
312572302 43326
652302826 107367
1211581...

output:

0
0


result:

ok ok, 1 test cases (1 test case)

Test #33:

score: 0
Accepted
time: 2086ms
memory: 27220kb

input:

1
200000 33514678169931
121677529 31920
777971499 187969
617049720 137098
419390184 75721
955778107 128696
17132807 165192
553423875 166900
689515597 177311
658315212 123015
948476705 37132
651978953 125843
605923663 59539
199020236 165777
475699208 189135
559018475 136876
469474861 91887
376859744 ...

output:

52536
108148
46914 173555 128598 23319 149880 102365 186335 14080 75362 198926 5263 98870 69688 95616 102345 156430 149149 68199 108180 93737 122023 32330 91938 73469 27102 55900 23607 123745 70015 96193 5835 155523 154909 28943 147150 153874 95846 180050 93382 99380 167088 196360 183166 70924 19724...

result:

ok ok, 1 test cases (1 test case)

Test #34:

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

input:

1
5 455
70 2
90 5
69 3
93 1
98 3

output:

5
5
4 1 3 5 2 

result:

ok ok, 1 test cases (1 test case)

Test #35:

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

input:

1
100 23591
888 17
792 51
685 47
182 3
102 61
555 48
771 56
712 1
580 78
342 31
285 33
525 99
537 25
929 18
84 53
104 88
624 55
253 3
201 53
536 95
65 84
540 5
549 52
248 77
677 5
431 50
600 80
328 46
134 29
526 83
500 3
400 63
276 23
570 4
410 57
507 58
984 20
486 44
802 54
985 11
635 3
96 83
855 9...

output:

54
63
8 4 18 31 41 92 74 34 22 25 55 71 59 50 94 61 33 13 60 69 29 10 63 11 62 52 79 96 58 90 38 88 28 3 80 6 26 2 85 23 82 15 19 54 98 67 51 17 7 35 36 5 46 32 95 49 21 42 16 44 87 81 78 

result:

ok ok, 1 test cases (1 test case)

Test #36:

score: 0
Accepted
time: 55ms
memory: 8744kb

input:

1
10000 60845880
2292 5988
3420 4026
5243 3246
4223 41
682 468
1497 5008
1573 584
5848 7049
5555 4129
9311 9957
6065 7225
3569 9498
717 1695
9690 1968
8700 7557
5142 9427
8788 371
9576 2260
4322 2674
5829 7448
982 9123
438 7591
9459 1590
5002 5982
4144 243
9585 4254
6745 9988
9602 3691
9518 2297
981...

output:

10000
10000
6991 5637 225 8167 6555 4332 8283 5834 5134 5417 2966 6177 4166 1101 525 9820 5998 7433 4361 82 395 3127 655 7422 7597 2543 6516 4923 1290 1967 6821 3716 2225 6338 4918 7420 6970 3190 4701 7217 7806 3336 4861 4381 4 7098 9046 5315 9653 2359 6888 7418 1670 4058 6861 5686 3376 8546 6250 79...

result:

ok ok, 1 test cases (1 test case)

Test #37:

score: 0
Accepted
time: 1524ms
memory: 29976kb

input:

1
200000 196479508615078
28295282 200000
911267508 200000
236024810 200000
513346768 200000
741720858 200000
685888445 200000
495085242 200000
953023631 200000
348674792 200000
523272031 200000
459044409 200000
210045061 200000
88248849 200000
259363079 200000
418405428 200000
100223051 200000
93933...

output:

200000
200000
27338 95756 43135 179802 111202 113455 30845 56161 26981 49543 157756 122640 59071 146999 139480 62571 26206 188516 40408 72255 19776 10737 172448 64993 148173 141675 108352 82558 141489 62095 128715 70007 52416 135040 165524 19712 96071 128250 16352 173535 134760 175484 102922 178922 ...

result:

ok ok, 1 test cases (1 test case)

Test #38:

score: 0
Accepted
time: 3341ms
memory: 30012kb

input:

1
200000 135707572511546
494679362 71529
380066098 40582
143567817 95803
319571661 41447
140442890 109991
585350811 68216
440239975 61921
37969390 100431
367093317 172161
544275807 38054
156617869 107523
391904071 32538
621381932 113096
385142855 166446
176514963 101396
26497984 84041
930946615 1459...

output:

200000
200000
110063 133436 102372 182253 174912 117142 35210 114777 167151 127764 71612 132567 162091 79173 6675 169771 122476 69923 175010 174606 5153 156335 80668 40681 4302 22321 144416 112721 174589 117824 60729 155749 77975 197721 92971 127451 167297 191860 175445 129059 43274 113343 12100 108...

result:

ok ok, 1 test cases (1 test case)

Test #39:

score: 0
Accepted
time: 3244ms
memory: 29928kb

input:

1
200000 161950750594970
793492620 20373
359415351 102763
18563992 141876
540505816 25435
519736034 181469
228183605 27960
807434490 121058
171474009 172540
535491335 19719
691339555 102294
376758082 22597
119250632 74217
629443449 23304
263632975 158603
944034189 1266
870807571 2823
341748724 89430...

output:

200000
200000
182129 83380 181373 181773 128925 12235 145410 189501 90431 66779 135109 164591 1988 101381 62433 29310 16514 59382 98556 48774 60823 100579 149592 80947 111947 125800 150605 186809 130913 15247 91827 84447 52200 111394 23024 109889 195747 43164 59232 75603 32503 24851 107255 64998 799...

result:

ok ok, 1 test cases (1 test case)

Test #40:

score: 0
Accepted
time: 3398ms
memory: 29864kb

input:

1
200000 188193928678394
532497366 169218
193540413 99537
748335976 20653
171505380 42127
193996474 85651
165983695 155000
324372109 90595
159754435 20457
408922057 124173
838403304 199239
746641400 3079
141564489 148600
342537670 133513
582314583 40360
856777607 101136
569892967 113094
752550833 65...

output:

200000
200000
106427 53255 149225 184323 163588 36845 181885 111313 172094 111877 34807 143157 101046 31152 170293 112335 34176 167539 179358 880 137766 136856 115280 151971 83710 9829 67377 168579 199579 32920 73644 73308 192289 58628 127619 80324 109807 141361 100817 8190 17367 180933 77018 23015 ...

result:

ok ok, 1 test cases (1 test case)

Test #41:

score: 0
Accepted
time: 2186ms
memory: 25092kb

input:

1
200000 14432811794522
126277919 118062
172889666 129014
623332151 123621
392439535 193411
868256913 22538
958559593 90551
691566624 117029
443002158 68374
577320075 171732
130691244 39288
261748909 126665
163878346 190280
55631891 52233
165837408 65221
329329537 1006
119235258 23364
308577134 1762...

output:

39637
64015
161583 146058 121995 118200 136330 173006 19136 187861 20889 68848 147798 177160 67770 10687 2197 163141 176431 32645 44629 75960 195811 10808 97509 155959 178751 126903 69940 65769 53304 188559 49928 148598 113382 148359 34758 90942 171946 192470 165618 133807 148275 57212 128221 153296...

result:

ok ok, 1 test cases (1 test case)

Test #42:

score: 0
Accepted
time: 2097ms
memory: 26088kb

input:

1
200000 40671694910650
865282665 66906
152238920 15388
58136838 169694
613373691 177399
542517353 94016
601392388 17591
913536947 86566
871474072 148996
745718094 51994
982787697 136233
776856418 74442
891224907 88855
63693408 162441
189551720 81570
391816059 11277
963544845 76738
424411946 152431
...

output:

93719
116281
175727 42702 49152 108057 115446 181828 9370 23737 131550 32572 190369 133495 128942 163371 150451 93358 195580 148525 67652 77374 131844 17339 790 36220 66670 188222 16164 133703 79108 25645 191239 87620 135070 63927 154401 123795 38147 21277 196133 93090 198807 101309 112714 9632 1456...

result:

ok ok, 1 test cases (1 test case)

Test #43:

score: 0
Accepted
time: 3017ms
memory: 27740kb

input:

1
200000 66919167961370
164095923 183047
281331278 44866
82876118 48471
539340550 194091
216777792 198198
539192478 10039
135507270 112999
154721794 196913
619148816 123744
129851445 33178
586931224 22220
913538764 130534
776787630 72649
363009136 139135
304559478 111147
807854432 19713
540246759 95...

output:

142487
157397
168622 155807 104484 188012 68559 109494 163026 189129 622 156912 178756 99710 101158 175756 55723 166712 26919 78459 148309 30982 74604 139367 122696 42523 9743 108774 82422 102226 121656 1533 82713 173192 75637 189933 128070 188819 85939 110209 143152 193062 112957 184974 196561 1534...

result:

ok ok, 1 test cases (1 test case)

Test #44:

score: 0
Accepted
time: 2912ms
memory: 29612kb

input:

1
200000 93158051077498
462909180 107699
260680531 107047
662904997 118736
760274706 145375
596070936 135084
771959864 137078
502701786 82536
288226413 69022
492579538 171302
422139386 105930
956814541 145806
935852621 37621
194914555 191370
386723449 163996
72078704 11017
917005235 105791
96273060 ...

output:

188497
191721
146734 102576 53089 18106 34363 145695 13075 182054 83700 106406 95985 1059 22376 116519 60748 58629 135606 88486 52216 169765 51215 159224 176429 20159 91392 148398 95517 128450 64633 73974 19556 6569 73724 55476 178276 93577 85214 150779 166112 66027 131789 189024 162574 91047 45225 ...

result:

ok ok, 1 test cases (1 test case)

Test #45:

score: 0
Accepted
time: 3069ms
memory: 30072kb

input:

1
200000 119401229160922
201913926 56544
94805593 136525
392676980 30217
981208861 162067
125107184 6563
414792658 72630
724672109 108970
276506839 116939
660977556 75757
569203134 170171
471922050 126288
368231886 79301
202976072 134282
410437761 13049
839597930 110888
761314822 183358
507075169 15...

output:

200000
200000
96121 74614 81421 53337 67744 4632 78703 154904 101973 48540 142925 123252 5651 171154 173136 46624 179540 147669 18699 117106 62496 117973 155013 24610 184555 58788 64420 90565 129530 39432 151701 127964 67872 190206 86570 102204 112371 75267 76106 193140 127545 27859 52505 40117 6027...

result:

ok ok, 1 test cases (1 test case)

Test #46:

score: 0
Accepted
time: 3143ms
memory: 29960kb

input:

1
200000 145644407244346
795694480 5388
74154846 198707
562640451 108993
907175721 146055
799367623 110745
352592749 199670
91866624 111211
704978754 164856
534408278 123315
716266883 10220
987029559 41361
535769935 153684
916070293 44490
288927881 37910
752341348 178054
310657113 69436
622909981 19...

output:

200000
200000
143988 30594 17700 61240 12955 51742 186241 112045 31889 24907 161804 25234 138657 174154 115998 32949 14198 95428 876 91362 174185 33906 13770 165808 130197 50298 63563 97042 185671 162476 182754 65061 148074 129154 164876 6026 35477 38673 113619 167269 43845 111908 130347 78863 2475 ...

result:

ok ok, 1 test cases (1 test case)

Test #47:

score: 0
Accepted
time: 2831ms
memory: 27700kb

input:

1
200000 70911083548450
803317251 75107
716223859 91630
836314626 44291
950150561 11320
159203924 64308
417716260 8836
730647129 115695
30845928 90055
195585834 108993
899509967 67400
485422609 168141
703377963 82018
186329868 39752
538996040 28550
549807438 31612
111637472 136119
686751167 145605
2...

output:

149582
162664
41164 31378 69345 178917 149933 115530 153016 189473 163334 91315 187332 191803 141194 11422 195544 149092 61492 61209 191531 155096 29386 151364 16342 184285 184091 164362 112296 1009 120292 62030 42117 183698 43929 25769 1055 37720 160186 157421 74372 114878 106432 62092 63761 184502...

result:

ok ok, 1 test cases (1 test case)

Test #48:

score: 0
Accepted
time: 2372ms
memory: 25712kb

input:

1
200000 11360
913315249 43565
482085213 37293
624340207 36798
745451871 183459
676955650 133760
364482503 43870
969041965 117574
679238595 95441
151880822 56729
548261894 140810
849277252 170062
755114771 116498
89493571 78714
574692282 88032
221846155 195147
806241251 109535
594765056 2956
4951136...

output:

0
0


result:

ok ok, 1 test cases (1 test case)

Test #49:

score: 0
Accepted
time: 2422ms
memory: 24260kb

input:

1
200000 22057
817744879 522
279910080 20466
720059878 51052
578147780 126966
614108988 3870
771342312 5819
241067400 173391
814757759 176733
320724054 18903
506690710 73674
744091010 23797
277893485 65103
351251657 147112
526756898 140587
305596060 50683
380433327 66459
744620599 61420
832194582 11...

output:

0
0


result:

ok ok, 1 test cases (1 test case)

Test #50:

score: 0
Accepted
time: 2499ms
memory: 25468kb

input:

1
200000 41991
185376951 32853
525753515 139495
714258535 160467
32235492 22387
736714032 129895
579085796 93386
238420038 52863
594584767 143769
868407430 29936
97019056 10203
100734210 26736
726872636 166566
986851260 91051
968537240 196451
700028592 182836
127512647 145357
647382295 47550
2624619...

output:

0
0


result:

ok ok, 1 test cases (1 test case)

Test #51:

score: 0
Accepted
time: 2312ms
memory: 25332kb

input:

1
200000 278761
270401298 116411
803977226 82172
925001500 117672
771348781 120446
445917696 41946
906589065 166103
877658779 2490
451343889 142015
897365148 38230
367773917 133006
908215418 150765
933052481 172079
957470887 100667
100844316 92515
685491717 115743
568787565 172881
392298393 150629
3...

output:

0
0


result:

ok ok, 1 test cases (1 test case)

Test #52:

score: 0
Accepted
time: 2304ms
memory: 25532kb

input:

1
200000 875961
477330789 143280
566368964 197380
409118948 104462
602792093 179489
67207345 199011
412135470 99361
664050053 158528
117732825 192271
220877150 164719
900923064 53370
426114744 93801
368468210 98293
306700026 111404
353883983 133878
547444275 46604
600050701 199862
288884741 155793
2...

output:

0
0


result:

ok ok, 1 test cases (1 test case)

Test #53:

score: 0
Accepted
time: 2224ms
memory: 25324kb

input:

1
200000 26989091
142491241 192440
133740164 91209
140503616 64618
624125392 3911
570737552 64257
358765959 49878
973592203 67220
434759007 57616
688893781 32485
342883108 191785
761605150 20824
398726892 73615
933133938 168688
660201614 66145
664162255 35715
957044820 24229
856874359 52925
21445707...

output:

2
71
88688 78418 112816 81878 99477 82591 117944 149773 52816 107175 181509 101051 104628 19566 165419 121203 53809 197552 163617 102329 17212 131517 16401 22273 78040 33508 186540 92082 90076 197978 197040 143185 135882 120823 108081 39467 99317 198819 149154 110831 122165 102471 79027 29495 73184 ...

result:

ok ok, 1 test cases (1 test case)

Test #54:

score: 0
Accepted
time: 2146ms
memory: 26364kb

input:

1
200000 2307468389
368690769 79954
301310184 62051
799462027 128213
666250281 127024
204339284 108604
432905504 36943
98301318 81947
255928495 80585
936711119 86165
166997880 45889
949890962 172040
59538778 29696
837571343 96453
491176763 79720
299019200 17687
982845704 121709
547159046 179950
7833...

output:

51
658
127377 195610 163071 29504 41853 103833 56429 40307 26256 26584 172376 185527 155739 132436 182574 127624 11692 83989 16020 182990 145518 86987 151529 152426 1036 28411 69644 44758 92332 19901 195429 185487 43180 55340 36628 14991 22877 158203 165570 77717 46552 81686 58373 163736 19923 14618...

result:

ok ok, 1 test cases (1 test case)

Test #55:

score: 0
Accepted
time: 1939ms
memory: 25944kb

input:

1
200000 1114224814709
346611495 35774
763677620 44175
107970730 121372
592886991 116342
89606402 175383
247300880 128149
785251923 14933
352476948 127625
87806404 59621
798814088 28830
796402602 157465
758904303 68951
804510694 92819
488083874 25744
896820362 169155
646066968 178846
202555586 18456...

output:

4863
14586
158209 137455 163261 148122 8888 127625 116407 25384 115042 91823 97754 88486 90766 69085 131152 79403 127555 10405 109155 65485 53184 122740 126966 59407 176868 113762 64895 33234 56246 137119 170596 186328 44883 153766 156329 108150 176625 177704 160143 128156 178661 191074 128050 17288...

result:

ok ok, 1 test cases (1 test case)

Test #56:

score: 0
Accepted
time: 1891ms
memory: 25936kb

input:

1
200000 1761362182256
503223959 171153
215525286 7256
469093377 63904
782919806 155261
497124834 37241
699484821 54263
523186287 149133
435528064 186763
650356977 19300
2967414 115966
881081068 163860
856142098 139427
354956675 105996
635095895 51036
335875866 33481
340424181 32273
113478973 60107
...

output:

6602
19253
72683 66225 181374 131809 121376 195299 168705 92592 180105 25265 182439 96000 150231 149500 171682 194334 102851 86973 105838 82031 118317 47517 12810 26336 43160 82066 150719 554 62318 91922 155832 71604 44861 109173 132166 2347 107573 111573 71441 66651 66289 94049 142039 42298 191946 ...

result:

ok ok, 1 test cases (1 test case)

Test #57:

score: 0
Accepted
time: 1861ms
memory: 26972kb

input:

1
200000 7695007124066
935103045 188716
189579994 105773
948721909 41728
645118111 109034
957534856 110290
889194851 104306
420203907 62914
66581709 183967
255985718 131452
514694498 55823
401590830 62014
597257496 105222
979588845 117646
516799272 67038
195365852 161807
223068968 114544
870882688 6...

output:

19856
43216
107447 66403 137326 125114 110238 75834 44472 159094 109258 190493 146337 106642 69769 7124 80440 79838 145842 80894 71150 60698 26066 114983 194667 58001 186498 14614 55503 63228 103956 195327 90708 49592 115711 22163 178389 173994 74829 143260 20827 63935 116030 104860 152555 56428 523...

result:

ok ok, 1 test cases (1 test case)

Test #58:

score: 0
Accepted
time: 2142ms
memory: 27088kb

input:

1
200000 33495073817765
454980889 51436
94554428 191084
104734346 199599
863177547 110765
854565444 158490
142159530 144841
47845415 163698
449215542 195047
40270172 157069
901593599 106755
420673009 66212
277396723 119994
719153064 130192
440107995 1948
29522955 154337
206042507 40606
711612356 203...

output:

52632
108588
89976 176673 69406 105822 23634 52096 100897 38252 36942 138432 157495 173678 43957 162336 126332 4133 37167 58804 7502 183734 120719 150152 37155 128926 31509 162691 19468 40712 63300 165571 12457 192433 48954 94789 96386 101694 88760 160366 56913 151616 169204 166255 44466 98054 4820 ...

result:

ok ok, 1 test cases (1 test case)

Test #59:

score: 0
Accepted
time: 2093ms
memory: 27052kb

input:

1
200000 33248633143054
379350144 43429
543594548 12331
359652193 173215
877003263 157474
485706837 3469
513776846 146166
682619899 63950
862848600 66703
489876630 187591
44325485 133236
999368520 108311
82125642 168467
248115839 132600
188411182 98732
489732526 139650
929253677 155278
202430528 119...

output:

51949
108653
62592 182146 108969 120552 114731 155903 29018 172187 82409 170461 156862 191389 13452 137308 83040 41114 173216 5590 170785 196721 58858 119939 131501 116181 174734 113912 99380 133993 115802 159937 19629 107151 82749 56114 189701 75213 173086 21971 67439 90484 23902 126919 157976 4649...

result:

ok ok, 1 test cases (1 test case)

Test #60:

score: 0
Accepted
time: 1888ms
memory: 27056kb

input:

1
200000 7840004973944
272179144 63395
739529760 57242
991181645 156702
926915784 131396
674683907 121506
488044461 140657
440568399 155556
766599873 133660
932517959 20473
862692698 68290
584213348 101064
440083200 28562
660632950 55534
114251144 137570
459542743 195446
67618913 101913
246107619 66...

output:

20003
43569
189205 169577 96425 13866 80403 34523 43365 184194 141947 54949 46803 160906 173795 11054 31497 50761 157775 16287 123356 198987 105354 1586 29202 116065 130919 147889 17166 2025 39341 114889 81672 184233 146414 157334 131212 116004 195845 87335 181835 108805 79223 41371 18182 159840 183...

result:

ok ok, 1 test cases (1 test case)

Test #61:

score: 0
Accepted
time: 2148ms
memory: 26748kb

input:

1
200000 69378166199815
692028815 153591
329100409 178473
499445063 196668
787295778 166812
371331886 162029
732938525 48366
400756611 175483
559678110 150415
627194489 127242
252052361 94399
215724348 48136
964771603 187204
799581494 169751
521922473 185738
640770445 156133
781067280 182599
3081945...

output:

82224
164357
198520 113204 149267 85792 94618 84963 95853 199544 84506 62280 196496 127900 187016 60099 184041 189843 16071 40491 33308 115036 15668 155773 16199 181901 141107 97572 96583 165304 33816 161958 14843 39917 48954 182070 21650 94847 14431 15155 169384 70 172648 140494 71068 164240 190720...

result:

ok ok, 1 test cases (1 test case)

Test #62:

score: 0
Accepted
time: 2254ms
memory: 26800kb

input:

1
200000 88847647606645
224827254 180718
548127243 187454
142965123 197147
476186922 172169
633291203 198183
927788453 182480
99455134 196100
164023873 194878
44863563 197078
586600515 199405
742908549 192478
634451018 194422
400819069 180491
143142488 181228
54304786 130904
990096689 184091
1278528...

output:

94450
188419
190120 178337 34691 8642 100080 151392 142123 25214 64032 91330 115561 166728 92855 110702 127097 180431 196131 7081 131425 182379 22896 17615 50699 76417 47287 187231 27562 92815 37233 51813 111775 98401 148235 129162 78937 15053 164828 101399 144109 186158 143315 128991 160930 17357 6...

result:

ok ok, 1 test cases (1 test case)

Test #63:

score: 0
Accepted
time: 1783ms
memory: 29988kb

input:

1
200000 105532502563483
191875168 199999
151276607 199999
780146920 200000
551353217 200000
402552682 200000
244198364 199999
931903113 199999
839940757 199999
804822642 200000
357392986 200000
330756728 199999
776374531 199999
282527199 199999
999817849 199999
570233335 199999
404177654 199999
574...

output:

200000
200000
129512 182309 120848 140866 63706 82555 106137 92895 34634 23275 65720 194287 158360 148616 73666 73341 184833 184331 185970 159078 185373 155472 60661 156866 13798 67288 67423 160513 4007 130843 100547 57944 140085 177383 53631 165248 166554 108959 140053 121987 134056 83611 34177 198...

result:

ok ok, 1 test cases (1 test case)