QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#369966#7791. 通道建设 Passage Constructiontxl1621128 39ms57828kbC++175.0kb2024-03-28 20:19:152024-03-28 20:19:17

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 3
Accepted
time: 5ms
memory: 13408kb

input:

1
1872884041
100 100 10000 10000
1
2294931821 2294931820

output:

Succeeded
0 1 0 0
2 1

result:

ok Accepted with 0+1 operations,sum of size(s)=0+0

Test #2:

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

input:

1
1977600624
100 100 10000 10000
5
621522394 621522399
2231003352 2231003338
464307841 464307837
1851407771 1851407768
2780336863 2780336849
314073909 314073902
1173467454 1173467430
4215033871 4215033843
2620057116 2620057098

output:

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

result:

ok Accepted with 4+9 operations,sum of size(s)=10+8

Test #3:

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

input:

1
1314992723
100 100 10000 10000
2
1174248192 1174248188
4206147071 4206147069
2894997654 2894997645

output:

Succeeded
0 3 0 0
4 2
3 1

result:

ok Accepted with 0+3 operations,sum of size(s)=0+0

Test #4:

score: 3
Accepted
time: 6ms
memory: 13380kb

input:

1
1466488642
100 100 10000 10000
3
1959342134 1959342129
3976386946 3976386946
1293201451 1293201449
4016912388 4016912383
46728190 46728181

output:

Succeeded
1 5 1 2
3 2
6 4
5 1

result:

ok Accepted with 1+5 operations,sum of size(s)=1+2

Test #5:

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

input:

1
1733551538
100 100 10000 10000
4
4255320958 4255320951
1233889267 1233889267
2022156010 2022156014
1746602236 1746602223
1796304111 1796304099
154520793 154520786
799267407 799267389

output:

Succeeded
2 7 3 4
5 2
7 3
8 4
6 1

result:

ok Accepted with 2+7 operations,sum of size(s)=3+4

Test #6:

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

input:

1
1103590331
100 100 10000 10000
4
3735090189 3735090176
179620503 179620501
1550955883 1550955882
3533004575 3533004552
2159969243 2159969227
2549716219 2549716202
1755562372 1755562356

output:

Succeeded
1 7 2 2
6 5
7 8
2 4
3 1

result:

ok Accepted with 1+7 operations,sum of size(s)=2+2

Test #7:

score: 0
Wrong Answer
time: 0ms
memory: 13360kb

input:

1
1007922703
100 100 10000 10000
5
3347355425 3347355424
924935451 924935434
3554593528 3554593525
2830078883 2830078872
3185621515 3185621508
32902500 32902483
1057526055 1057526035
3737430162 3737430144
106424402 106424399

output:

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

result:

wrong answer Condition not satisfied

Subtask #2:

score: 0
Wrong Answer

Test #11:

score: 0
Wrong Answer
time: 20ms
memory: 31464kb

input:

2
755640766
20000 10000 200000 200000
100
4287951944 4287951892
218593589 218593610
2907028702 2907028595
100123056 100122959
3149201405 3149201229
3454414687 3454414608
1901257489 1901257490
1532337798 1532337686
836222214 836222227
187381584 187381446
1847826999 1847827071
2868544732 2868544653
41...

output:

Failed
Limit of C1 exceeded

result:

wrong answer Limit of C1 exceeded

Subtask #3:

score: 8
Accepted

Test #19:

score: 8
Accepted
time: 19ms
memory: 14196kb

input:

3
397960972
100000 4000 200000 200000
1000
3136131587 3136131078
3887641427 3887642253
280951546 280951198
124187343 124186744
3948118891 3948118785
2174920490 2174920140
3041102338 3041103477
489656932 489656480
3093689453 3093690199
3027233105 3027233261
967551350 967551424
215138938 215138436
251...

output:

Succeeded
493 1999 584 986
1740 1003
1560 1938
1246 1780
1573 1476
1826 1535
1031 1618
1661 1100
1527 1892
1660 1591
1354 1792
1594 1117
1097 1519
1919 1341
1846 1160
1853 1548
1863 1016
1445 1241
1481 1207
1371 1103
1646 1779
1329 1435
1162 1515
1342 1464
1756 1040
1383 1416
1724 1301
1061 1382
119...

result:

ok Accepted with 493+1999 operations,sum of size(s)=584+986

Test #20:

score: 8
Accepted
time: 14ms
memory: 14204kb

input:

3
755523510
100000 4000 200000 200000
999
837610461 837610217
209552123 209552158
2202987134 2202987346
3933843218 3933843131
2783546817 2783547323
415275024 415276142
13876082 13876176
448702939 448703028
1294393612 1294394136
3910397405 3910397094
3416630484 3416630700
3215888394 3215888948
124509...

output:

Succeeded
19 1997 20 38
198 827
112 795
703 616
809 427
584 743
818 611
649 805
42 438
1863 330
1562 251
922 322
1460 130
723 928
868 579
606 701
641 761
711 339
60 786
581 237
759 256
502 651
634 368
1878 340
491 118
1638 924
6 411
437 224
529 484
728 346
13 1690
49 468
103 745
485 897
149 86
913 8...

result:

ok Accepted with 19+1997 operations,sum of size(s)=20+38

Test #21:

score: 8
Accepted
time: 19ms
memory: 14156kb

input:

3
2042812129
100000 4000 200000 200000
998
3075748308 3075748844
1569673104 1569672823
3968525693 3968524672
2108387096 2108386924
3356390455 3356391094
3372812724 3372813320
3904961007 3904958854
4029621824 4029621345
4114486509 4114486281
1387138301 1387138067
124292409 124292880
3935517019 393551...

output:

Succeeded
558 1995 645 1116
1947 1484
1581 1267
1561 1375
1992 1379
1868 1655
1545 1678
1945 1279
1478 1065
1965 1553
1953 1368
1682 1835
1823 1176
1376 1063
1411 1073
1284 1816
1912 1362
1165 1483
1815 1640
1177 1703
1534 1230
1185 1338
1742 1322
1957 1936
1528 1594
1693 1210
1764 1852
1071 1979
10...

result:

ok Accepted with 558+1995 operations,sum of size(s)=645+1116

Test #22:

score: 8
Accepted
time: 15ms
memory: 14424kb

input:

3
1597029305
100000 4000 200000 200000
998
2980500284 2980500361
2247716226 2247714887
988714926 988714253
1734063960 1734064121
2359409219 2359409008
411968449 411968499
155449826 155451318
555582797 555582911
45071917 45071590
1460631113 1460629818
3059213925 3059213709
2094519932 2094519250
38721...

output:

Succeeded
205 1995 332 410
1767 345
262 528
580 38
1719 910
1612 226
1391 1016
1557 719
431 130
1537 941
1894 322
1572 1024
1713 1082
1539 697
846 1712
1100 1898
293 1595
1970 1512
119 685
748 1521
282 245
551 419
1301 1688
857 774
488 1177
1854 1558
1950 1579
1136 576
1600 219
760 1643
167 887
1717...

result:

ok Accepted with 205+1995 operations,sum of size(s)=332+410

Test #23:

score: 8
Accepted
time: 19ms
memory: 14248kb

input:

3
1564467111
100000 4000 200000 200000
1000
1236547222 1236547523
2135786902 2135787064
2523622442 2523622714
1532839693 1532838477
818219113 818220033
676117995 676118414
570037547 570036834
514220702 514220842
3399494183 3399495268
2654728241 2654729498
1495037081 1495037412
2062047312 2062048382
...

output:

Succeeded
264 1999 426 528
1367 1276
340 489
1496 602
783 21
1597 1715
994 1344
298 11
1693 1003
1737 643
709 268
552 237
1974 1391
1055 878
852 796
1345 371
209 1289
813 164
1840 1499
1960 1936
357 1188
137 1491
1488 873
279 537
724 151
1950 696
291 521
424 1920
1798 260
1166 711
1429 1638
53 280
1...

result:

ok Accepted with 264+1999 operations,sum of size(s)=426+528

Test #24:

score: 8
Accepted
time: 17ms
memory: 14200kb

input:

3
213138336
100000 4000 200000 200000
999
1130123143 1130122958
687694550 687694095
929485247 929484829
3680984473 3680983776
3074105335 3074104892
1342732123 1342731927
1364720805 1364720672
2077428724 2077428538
28510235 28511166
937776441 937776505
3414480885 3414480666
3148182306 3148181509
3485...

output:

Succeeded
162 1997 180 324
837 581
427 276
84 423
90 646
277 760
687 28
530 444
5 895
21 141
497 458
564 381
237 27
271 465
293 231
808 524
79 104
301 755
596 482
390 998
147 498
351 951
283 580
754 246
60 884
647 412
402 398
817 1356
258 1915
363 645
138 662
967 953
379 324
543 567
492 494
961 556
...

result:

ok Accepted with 162+1997 operations,sum of size(s)=180+324

Test #25:

score: 8
Accepted
time: 17ms
memory: 14272kb

input:

3
924980045
100000 4000 200000 200000
998
1666991999 1666991279
148686690 148685590
324531768 324531788
2043725358 2043725640
1133184972 1133184631
853139746 853139683
1770837584 1770837761
1481554510 1481554714
1372084869 1372084950
1756084441 1756085236
2107756067 2107756010
3377586774 3377586312
...

output:

Succeeded
9 1995 9 18
702 874
78 412
551 608
661 662
1099 473
745 406
1850 447
28 481
746 714
411 511
738 317
949 582
825 1464
890 664
670 407
358 674
445 423
534 808
327 1963
549 360
878 219
851 860
623 665
419 533
1161 141
356 59
244 575
986 232
726 384
127 1373
915 364
806 353
654 463
785 333
75 ...

result:

ok Accepted with 9+1995 operations,sum of size(s)=9+18

Test #26:

score: 8
Accepted
time: 23ms
memory: 14336kb

input:

3
774146483
100000 4000 200000 200000
999
3478842381 3478843345
606332045 606332562
2701123033 2701123563
3216754910 3216755036
1217043418 1217043429
1501603802 1501603474
1778234551 1778234769
1444790432 1444791022
2502984240 2502984288
856947428 856947122
1363006586 1363006323
1995567044 199556642...

output:

Succeeded
623 1997 952 1246
233 436
55 112
711 125
874 394
419 462
171 1792
184 552
271 927
608 160
470 764
397 611
165 705
819 172
978 174
153 633
937 57
128 482
971 508
940 894
1740 34
835 314
720 261
868 801
322 751
816 628
1659 717
325 961
590 51
203 760
623 339
1905 9
120 447
181 375
880 575
86...

result:

ok Accepted with 623+1997 operations,sum of size(s)=952+1246

Test #27:

score: 8
Accepted
time: 17ms
memory: 14248kb

input:

3
82266506
100000 4000 200000 200000
999
3056998601 3056998876
1887811910 1887812134
1616045105 1616045172
1784967209 1784967615
650919784 650918837
4290024152 4290024396
154133667 154133653
754913686 754913998
3014551042 3014550770
3332698384 3332698431
304657473 304657856
1466514044 1466515029
313...

output:

Succeeded
51 1997 55 102
96 486
1192 715
312 589
107 967
316 566
1406 1741
758 276
1743 283
449 762
466 189
72 30
428 376
596 26
868 235
430 208
152 638
612 341
1629 1289
1249 893
698 198
77 574
919 981
147 711
739 491
1910 773
229 1475
1960 584
274 1345
658 369
382 587
313 945
937 957
130 468
645 6...

result:

ok Accepted with 51+1997 operations,sum of size(s)=55+102

Test #28:

score: 8
Accepted
time: 23ms
memory: 14216kb

input:

3
1746021239
100000 4000 200000 200000
1000
3649747382 3649747015
3895797253 3895797184
4001365723 4001365122
564220364 564220085
362710516 362710456
2800243662 2800243024
2073687310 2073687797
145701776 145700951
492159209 492159366
3076148714 3076148148
1548738755 1548739322
3580263095 3580262700
...

output:

Succeeded
159 1999 176 318
707 272
433 532
900 503
486 769
264 508
252 1196
108 696
656 874
924 755
1299 878
307 439
717 17
531 89
392 247
233 987
314 719
79 47
217 660
784 151
713 669
187 615
783 73
941 633
356 908
880 789
722 378
971 26
326 241
352 69
584 683
330 1202
1729 708
447 139
760 435
860 ...

result:

ok Accepted with 159+1999 operations,sum of size(s)=176+318

Subtask #4:

score: 9
Accepted

Test #29:

score: 9
Accepted
time: 4ms
memory: 13964kb

input:

4
1084797752
100000 4000 200000 200000
1000
3456536122 3456534568
249115651 249115791
3576312078 3576312237
1880897416 1880895547
1944688480 1944688327
248846397 248847256
3567405828 3567405196
1084965392 1084965206
1435956247 1435955729
3887033767 3887032464
307260230 307260472
1476733874 147673312...

output:

Succeeded
1483 1999 6784 6553
1946 1397
1598 872
1087 1988
1436 1911
324 715
917 548
1920 156
1142 1625
1744 1169
924 268
1304 1180
1028 1346
1637 492
1295 517
1313 1274
1990 1855
614 940
1675 1273
1268 474
1435 54
804 507
1582 228
384 886
1915 435
1993 397
1471 1623
1510 28
171 909
1319 1256
1561 8...

result:

ok Accepted with 1483+1999 operations,sum of size(s)=6784+6553

Test #30:

score: 9
Accepted
time: 8ms
memory: 13912kb

input:

4
583125216
100000 4000 200000 200000
1000
1729488108 1729488695
2234303914 2234304325
546617298 546616102
842050918 842051470
1951502077 1951501331
4271815110 4271815116
761587681 761586756
2172224244 2172223957
2934428060 2934428507
1919912734 1919912263
1067575137 1067574604
3411448089 3411447166...

output:

Succeeded
1197 1999 4677 3919
1880 1985
1797 1199
1811 1790
1172 1772
1752 1980
1022 1384
1243 1322
1019 1428
1263 1182
1078 1928
1443 1465
1439 1984
1982 1518
1184 1936
1260 1542
1143 1463
1450 1055
1391 1642
1498 1442
240 301
339 619
679 866
34 865
631 99
634 414
50 15
85 629
520 317
277 49
656 99...

result:

ok Accepted with 1197+1999 operations,sum of size(s)=4677+3919

Test #31:

score: 9
Accepted
time: 6ms
memory: 13916kb

input:

4
1854731567
100000 4000 200000 200000
998
946750857 946749479
898868556 898868101
2271278746 2271277916
1796596168 1796596321
161487283 161486866
1033814116 1033814195
2395521961 2395522326
1468519383 1468519080
2816096970 2816096367
1556209002 1556208501
3292442187 3292440851
1135140030 1135140110...

output:

Succeeded
1478 1995 6901 6607
222 292
1761 187
1749 1329
1091 1501
1634 1311
718 984
1745 1479
131 146
1864 298
1146 1847
1510 1802
915 321
1144 778
1606 1055
1547 1671
345 391
1572 1681
360 894
1715 1796
1866 1349
884 663
918 625
1231 251
1932 830
715 238
630 435
1277 77
927 343
1814 193
677 244
11...

result:

ok Accepted with 1478+1995 operations,sum of size(s)=6901+6607

Test #32:

score: 9
Accepted
time: 4ms
memory: 13964kb

input:

4
2073988041
100000 4000 200000 200000
998
3168161931 3168162584
641363905 641362895
3784715137 3784714618
3548409026 3548409673
2737710699 2737710016
3324804481 3324803425
60841104 60840338
2010919705 2010919496
2362840315 2362840326
369236350 369237998
3600238093 3600237006
75182169 75182747
23418...

output:

Succeeded
1508 1995 7205 6911
1364 152
1706 49
1453 1016
1100 137
783 63
1444 1099
1944 1883
1575 864
1789 1935
1617 991
1422 1194
988 698
1654 1166
1757 1532
1223 915
1529 849
1965 1670
1587 1466
1888 1391
1718 1185
1804 342
114 239
419 468
574 657
404 376
1728 561
1762 1626
11 89
1180 316
763 67
1...

result:

ok Accepted with 1508+1995 operations,sum of size(s)=7205+6911

Test #33:

score: 9
Accepted
time: 4ms
memory: 13976kb

input:

4
1770340944
100000 4000 200000 200000
998
619870796 619870703
3121053787 3121054050
4195183636 4195182734
3139119614 3139119172
3634777517 3634777854
3433281440 3433281395
1485638549 1485638667
1231357421 1231357552
1705009906 1705010057
3514693637 3514694012
4265358236 4265358262
964902776 9649023...

output:

Succeeded
1484 1995 6872 6478
1934 1140
1651 1429
475 510
1712 1991
1968 1805
186 463
1568 1086
1824 577
1728 1720
1620 643
593 533
1866 650
10 683
1986 1320
5 159
1246 1133
1852 437
1386 1856
213 705
1496 1964
1306 1599
957 150
1606 1354
1138 1221
1463 148
985 53
1452 1206
1446 1694
1451 623
562 33...

result:

ok Accepted with 1484+1995 operations,sum of size(s)=6872+6478

Test #34:

score: 9
Accepted
time: 4ms
memory: 14136kb

input:

4
402901589
100000 4000 200000 200000
1000
1228378193 1228378597
1873458243 1873458214
2590411172 2590411391
3596693908 3596693672
442343415 442341879
1371534355 1371535333
1713867379 1713867258
2725534246 2725534433
3960722519 3960721503
1846001052 1846001387
2925453274 2925452776
1709191822 170919...

output:

Succeeded
1241 1999 7604 6192
1930 92
1972 1682
1652 1866
1885 1285
1551 465
323 819
1943 703
1241 1030
1738 8
1586 1809
310 662
765 883
1877 1587
1283 1633
583 355
1436 1095
1798 418
667 28
593 350
1409 1153
1491 1818
1745 402
157 219
1929 368
1783 153
488 423
1944 915
1251 1224
275 481
1264 1343
1...

result:

ok Accepted with 1241+1999 operations,sum of size(s)=7604+6192

Test #35:

score: 9
Accepted
time: 4ms
memory: 14204kb

input:

4
816997292
100000 4000 200000 200000
1000
3528745308 3528745448
2554369604 2554370028
2428697713 2428697760
2283123422 2283123636
2317970372 2317971439
3486243575 3486243354
914803066 914803223
3870938133 3870937913
833775363 833775109
133819724 133819108
4164722879 4164723079
4283955483 4283956051...

output:

Succeeded
1233 1999 7733 6319
1140 461
1814 1796
138 246
1799 1423
359 497
1306 513
1549 1228
121 60
82 822
1657 1515
1363 379
1498 1631
518 724
1470 1347
1210 594
982 101
932 188
1071 1206
1239 1623
1949 1876
962 207
1914 1186
488 458
27 228
1135 887
673 268
1993 1395
658 64
405 729
455 31
479 255
...

result:

ok Accepted with 1233+1999 operations,sum of size(s)=7733+6319

Test #36:

score: 9
Accepted
time: 4ms
memory: 13960kb

input:

4
448483706
100000 4000 200000 200000
1000
3294405857 3294406138
1334269388 1334268750
3218236158 3218236229
1172020015 1172020961
4267095542 4267095785
884218942 884218794
2727697704 2727696787
4040088499 4040088016
3925649252 3925648708
3602778930 3602778977
25062275 25062940
782102904 782103485
4...

output:

Succeeded
1237 1999 7644 6122
1582 1627
1206 687
1493 501
1289 351
1144 128
714 11
1974 1187
1691 1681
307 313
1384 1298
1880 1639
84 872
346 69
837 235
1244 1257
1031 1197
1677 1209
1019 1446
1926 1798
1811 1251
1045 807
702 532
1075 1519
1709 322
1095 589
452 62
1040 1760
1598 1889
1527 83
51 586
...

result:

ok Accepted with 1237+1999 operations,sum of size(s)=7644+6122

Test #37:

score: 9
Accepted
time: 6ms
memory: 14288kb

input:

4
1345753551
100000 4000 200000 200000
1000
2505101245 2505099844
1064732384 1064732096
3514288208 3514289196
4285598713 4285598588
289512304 289512216
961277738 961276571
270988037 270987782
351038556 351038779
2313748299 2313748400
3024327557 3024327268
1007549868 1007549449
3171882049 3171882337
...

output:

Succeeded
1037 1999 1642 2095
1330 80
1515 629
1966 996
1255 1257
1995 1572
1542 222
861 148
1718 844
1224 1129
1734 357
1236 1720
1375 1357
609 950
1806 1880
1210 250
1749 1144
1514 759
1699 198
1417 351
1431 1291
665 445
1820 1434
1837 1222
1519 531
794 939
1044 1597
1414 59
1465 438
508 314
1910 ...

result:

ok Accepted with 1037+1999 operations,sum of size(s)=1642+2095

Test #38:

score: 9
Accepted
time: 9ms
memory: 14024kb

input:

4
163480472
100000 4000 200000 200000
998
2002085756 2002085748
2640607139 2640605823
836452341 836452238
179712028 179712352
1546416317 1546416341
3648734029 3648733547
4142213872 4142214412
711606286 711606592
1732581221 1732580465
2405962256 2405961750
1644716795 1644717277
589785362 589783494
12...

output:

Succeeded
1112 1995 1805 2263
1030 56
1282 1407
1120 458
1946 955
1881 488
1781 1635
1735 1507
1681 303
1415 1852
1899 626
1869 646
1314 1026
1078 7
1445 574
1936 1313
1673 164
1095 505
840 680
1414 1596
1983 1559
1767 1456
1783 938
1506 306
1024 848
1019 648
1037 1250
1591 1473
1570 1371
1861 635
1...

result:

ok Accepted with 1112+1995 operations,sum of size(s)=1805+2263

Subtask #5:

score: 11
Accepted

Test #39:

score: 11
Accepted
time: 8ms
memory: 13944kb

input:

5
1720909858
50000 4000 200000 100000
998
195378529 195378218
2138942224 2138942028
2421726252 2421725316
2614111628 2614111784
3778296551 3778295886
3346314089 3346313971
701234060 701233448
279201944 279202119
69826850 69826766
2173156660 2173157126
2982274003 2982273048
2306106121 2306107345
2808...

output:

Succeeded
1539 1995 8151 6707
1603 463
656 296
1774 971
1699 986
1965 864
1428 1568
834 1497
1381 492
545 282
600 844
440 13
1747 314
484 559
173 126
1740 1964
1094 1199
383 198
897 58
1701 202
81 1562
925 7
747 707
125 1748
231 1314
781 767
185 390
1229 1434
438 308
1974 1030
1245 1861
165 1520
172...

result:

ok Accepted with 1539+1995 operations,sum of size(s)=8151+6707

Test #40:

score: 11
Accepted
time: 8ms
memory: 13928kb

input:

5
1942257410
50000 4000 200000 100000
999
164109252 164108690
821766476 821766590
800182177 800180581
3645999838 3646000976
4086503876 4086505410
2171679381 2171678745
2952329225 2952330453
1354218636 1354219071
1174819694 1174820521
2253012620 2253012650
1329779110 1329779087
2814346065 2814346500
...

output:

Succeeded
1790 1997 6449 5107
312 740
472 747
538 720
34 1056
1735 90
331 282
1605 1775
102 301
31 1024
322 414
708 1371
62 859
1063 104
1662 1535
935 1787
8 604
510 10
1017 1621
1769 1526
1589 788
1570 251
793 981
1857 1422
483 726
1933 1246
1843 1670
138 882
938 154
1935 255
1777 1774
666 81
387 1...

result:

ok Accepted with 1790+1997 operations,sum of size(s)=6449+5107

Test #41:

score: 11
Accepted
time: 13ms
memory: 14208kb

input:

5
161065852
50000 4000 200000 100000
1000
2966551129 2966552287
2856618787 2856618848
3795294524 3795295808
2757765097 2757764165
676105640 676105847
570204851 570205160
511088706 511090077
3497329264 3497329269
3725322378 3725322886
527017111 527016211
4071607765 4071607337
2817593784 2817593642
15...

output:

Succeeded
1250 1999 2208 2563
1362 432
1985 1208
98 1697
1083 215
1130 1585
1646 1274
1328 1351
1397 444
1812 220
1440 954
1875 410
1058 1198
1197 612
1017 986
664 660
1548 904
1358 768
1809 1651
1574 1587
39 105
1290 814
1747 108
1834 1320
1319 833
1244 492
1980 313
323 510
769 613
289 629
1879 527...

result:

ok Accepted with 1250+1999 operations,sum of size(s)=2208+2563

Test #42:

score: 11
Accepted
time: 5ms
memory: 14192kb

input:

5
777230405
50000 4000 200000 100000
999
3830467265 3830466694
1849159126 1849158949
2825053043 2825052212
2761591040 2761591070
939276197 939275664
3367167096 3367167288
3727731406 3727730932
406701926 406701618
530187802 530186715
3962995171 3962996546
1787609584 1787609620
993000803 993000542
158...

output:

Succeeded
1566 1997 8163 6987
1958 1062
1649 1189
1976 792
560 130
1297 1223
501 975
1305 706
1151 632
739 1619
1205 189
1969 671
1398 498
1957 376
1214 781
1980 1715
1298 1548
393 957
1504 497
855 794
1950 1403
262 768
875 922
588 422
1639 1037
1884 333
195 911
1240 744
222 896
416 656
472 1406
136...

result:

ok Accepted with 1566+1997 operations,sum of size(s)=8163+6987

Test #43:

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

input:

5
97972513
50000 4000 200000 100000
999
654921388 654921281
3336987454 3336987177
439399097 439398662
1551555981 1551555288
3555879532 3555880729
2903638861 2903639277
257794283 257794433
3826111358 3826111966
1708274143 1708274017
3746235685 3746236123
907908447 907908765
4116365217 4116364822
1582...

output:

Succeeded
1572 1997 8087 6709
1270 167
1816 1442
1174 1028
171 155
1440 785
1173 11
1196 126
1135 395
321 631
1220 1062
1672 188
757 417
1927 1379
1848 946
261 125
1447 1942
460 1029
412 80
452 370
487 1793
918 1824
1065 63
1692 1087
645 1867
1561 1897
1277 1054
1001 1582
1458 469
1973 426
612 526
7...

result:

ok Accepted with 1572+1997 operations,sum of size(s)=8087+6709

Test #44:

score: 11
Accepted
time: 4ms
memory: 14212kb

input:

5
397162223
50000 4000 200000 100000
1000
2103775764 2103775539
3507938589 3507938863
4080657108 4080657210
2492592687 2492593001
111756474 111755329
3545417212 3545415789
3115563885 3115563458
2404092040 2404092248
1717324095 1717323827
2910355772 2910355898
40550063 40549395
1332934233 1332933830
...

output:

Succeeded
1542 1999 8004 6613
935 33
275 922
481 972
1653 1013
451 587
1367 292
551 531
35 867
1862 762
1001 1229
1391 1166
1272 1248
722 729
446 177
224 870
1565 995
389 773
348 1507
1057 845
1980 1425
466 1002
1053 1115
338 384
1487 915
182 826
216 1232
1262 199
1715 1913
337 374
1730 321
1806 877...

result:

ok Accepted with 1542+1999 operations,sum of size(s)=8004+6613

Test #45:

score: 11
Accepted
time: 19ms
memory: 14332kb

input:

5
1695502059
50000 4000 200000 100000
1000
700852541 700853138
286392703 286393228
862046288 862047179
1594299681 1594299408
3210366802 3210366961
1413959809 1413960445
3698437765 3698437869
1377184122 1377184197
281217513 281217619
145372596 145373148
502398350 502398463
2741843047 2741843594
34564...

output:

Succeeded
537 1999 621 1074
1551 1171
1879 1323
1027 1452
1185 1414
1513 1943
1794 1775
1356 1799
1703 1803
1476 1228
1041 1327
1853 1674
1366 1595
1809 1326
1539 1899
1549 1436
1813 1328
1723 1147
1747 1206
1804 1043
1375 1756
1462 1096
1573 1529
1754 1307
1428 1415
1504 1969
1710 1220
1240 1212
11...

result:

ok Accepted with 537+1999 operations,sum of size(s)=621+1074

Test #46:

score: 11
Accepted
time: 19ms
memory: 14076kb

input:

5
1256148136
50000 4000 200000 100000
999
2016310630 2016310917
2107471344 2107470258
3472709132 3472709188
289824693 289824187
968116627 968117102
254957789 254959335
3918543752 3918543310
3679196968 3679195694
2994473794 2994473552
4244660702 4244660526
1565613257 1565613765
4153244320 4153244472
...

output:

Succeeded
883 1997 1406 1766
1083 91
1061 1097
770 36
1756 727
263 1594
1413 1941
790 1335
1014 1585
754 299
518 1988
1712 611
726 1017
1508 1330
372 987
1141 903
586 1885
1071 1533
1823 23
1672 111
334 967
1305 693
1476 936
1446 1750
612 1293
167 864
1130 759
856 465
1324 1110
1644 1603
69 1657
159...

result:

ok Accepted with 883+1997 operations,sum of size(s)=1406+1766

Test #47:

score: 11
Accepted
time: 14ms
memory: 14272kb

input:

5
174080677
50000 4000 200000 100000
1000
3686639308 3686638800
2896535064 2896534994
942582287 942582342
1036404485 1036404700
2240524876 2240525002
885623407 885623800
2908065975 2908066813
132144926 132144327
4212166510 4212165968
2576925241 2576925211
2854923688 2854924082
4019207120 4019206802
...

output:

Succeeded
5 1999 6 10
826 15
722 1642
700 588
170 383
827 63
622 480
245 87
894 392
777 893
1295 354
364 682
365 729
519 471
780 1905
528 586
806 306
246 937
410 872
96 264
183 548
376 786
229 317
19 415
860 982
986 116
598 808
418 745
212 862
214 201
581 854
730 497
422 393
458 483
635 571
1699 204...

result:

ok Accepted with 5+1999 operations,sum of size(s)=6+10

Test #48:

score: 11
Accepted
time: 8ms
memory: 14208kb

input:

5
1245824305
50000 4000 200000 100000
1000
3667004853 3667004169
2287697139 2287696730
2209822990 2209823892
4121239467 4121237803
1095196087 1095194911
1774546551 1774545134
1362722072 1362721338
1986032138 1986033160
3134483043 3134484458
3770232965 3770233774
4150800332 4150798469
444018341 44401...

output:

Succeeded
1488 1999 13061 6016
146 1067
102 1574
95 1528
927 1387
461 1621
439 1638
489 1353
328 1043
173 1217
536 1358
789 1562
677 1987
486 1499
831 1594
147 1516
23 1154
479 1864
476 1686
447 1400
50 1886
38 1809
445 1009
438 1207
675 1373
141 1413
652 1025
259 1783
814 1695
185 1304
125 1522
360...

result:

ok Accepted with 1488+1999 operations,sum of size(s)=13061+6016

Test #49:

score: 11
Accepted
time: 3ms
memory: 13972kb

input:

5
1416201142
50000 4000 200000 100000
999
2694326229 2694325190
3006267026 3006266271
3590771525 3590772511
382357401 382355920
3477874958 3477875914
653232151 653234151
4226125318 4226123972
2278771395 2278772384
2110222591 2110223909
3320640593 3320639898
2013976833 2013977782
2032673776 203267476...

output:

Succeeded
1487 1997 13290 6084
730 1137
216 1398
56 1007
831 1399
452 1695
288 1070
573 1331
379 1700
727 1966
256 1050
986 1612
267 1677
408 1199
918 1494
243 1342
669 1330
302 1712
446 1351
748 1367
500 1507
677 1871
839 1384
125 1536
953 1785
713 1760
51 1276
430 1433
104 1884
604 1992
808 1894
4...

result:

ok Accepted with 1487+1997 operations,sum of size(s)=13290+6084

Subtask #6:

score: 0
Wrong Answer

Test #50:

score: 0
Wrong Answer
time: 12ms
memory: 21792kb

input:

6
889180297
25000 4000 200000 100000
998
3680334935 3680334330
2957217208 2957215867
3096097757 3096097331
2843029536 2843030717
2270437916 2270437982
1841161075 1841160444
3671823118 3671823208
2166904224 2166903071
2760262295 2760263328
880472976 880472564
3147819342 3147820514
3366602035 33666019...

output:

Failed
Limit of S2 exceeded

result:

wrong answer Limit of S2 exceeded

Subtask #7:

score: 0
Wrong Answer

Test #59:

score: 0
Wrong Answer
time: 20ms
memory: 33660kb

input:

7
1561772597
25000 4000 200000 100000
1000
834919143 834919090
162625904 162627303
1067517190 1067517712
3410644901 3410644677
2728503196 2728502622
4133685425 4133685598
976760503 976760426
2101358026 2101358499
3583017242 3583017016
1743218912 1743220527
2609984627 2609985177
3915259025 3915259188...

output:

Failed
Limit of S1 exceeded

result:

wrong answer Limit of S1 exceeded

Subtask #8:

score: 0
Wrong Answer

Test #70:

score: 0
Wrong Answer
time: 39ms
memory: 57828kb

input:

8
1311447458
50000 100000 500000 200000
4999
173190562 173182163
1078196947 1078197142
1215565665 1215571165
1186082670 1186081354
2422459084 2422459806
2626070241 2626074599
207492448 207494582
2266700305 2266695214
1679673055 1679672568
3879988278 3879982030
254940475 254941572
3919251618 39192495...

output:

Failed
Limit of C1 exceeded

result:

wrong answer Limit of C1 exceeded

Subtask #9:

score: 0
Wrong Answer

Test #81:

score: 0
Wrong Answer
time: 14ms
memory: 28292kb

input:

9
574951428
15000 10000 200000 50000
5000
1781472251 1781466624
803445324 803444785
3544280892 3544283003
3151400420 3151403948
3250864128 3250871501
4189507543 4189510374
3483519516 3483520446
1003612935 1003617460
1101934749 1101931586
1948046579 1948042301
4151407804 4151401951
424123439 42412196...

output:

Failed
Limit of C1 exceeded

result:

wrong answer Limit of C1 exceeded