QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#483019#6342. Security GuardMilmon26 265ms40768kbC++141.3kb2024-07-18 09:49:582024-07-18 09:49:59

詳細信息

Subtask #1:

score: 0
Time Limit Exceeded

Test #1:

score: 0
Time Limit Exceeded

input:

200000 199999 0
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:


result:


Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Skipped

Dependency #3:

0%

Subtask #5:

score: 8
Accepted

Test #85:

score: 8
Accepted
time: 10ms
memory: 12164kb

input:

16 15 200000
692461146 622302385 805066691 422290641 600839873 940930580 873147413 489653843 239129952 383473127 21389393 913787109 856138328 859082963 262475462 327598064
6 13
6 9
6 15
6 14
6 16
6 8
5 6
1 6
4 6
3 6
6 11
6 7
6 10
2 6
6 12

output:

14113958700
13194417513
12274876326
11355335139
10435793952
9516252765
8596711578
7677170391
6757629204
5838088017
4918546830
3999005643
3079464456
2159923269
1240382082
1240382082
1240382082
1240382082
1240382082
1240382082
1240382082
1240382082
1240382082
1240382082
1240382082
1240382082
124038208...

result:

ok 200001 numbers

Test #86:

score: 0
Accepted
time: 8ms
memory: 12116kb

input:

16 30 200000
598416543 514756774 234373059 730937929 122327909 710993525 792876211 799558122 542631332 104191856 970044163 3056707 549900459 673639701 722811840 543231107
3 8
1 11
11 15
6 11
8 9
11 16
3 9
11 14
1 14
4 10
5 13
2 7
6 14
6 16
8 11
4 7
9 11
1 12
7 11
2 8
4 11
10 15
7 15
7 9
4 13
4 8
8 1...

output:

9458406784
8049967296
6774121792
5618668020
4780322608
3983821193
3388461357
2848286957
2308712332
1797012265
1565695913
1334379561
1215108359
1113973210
1012838061
1012838061
1012838061
1012838061
1012838061
1012838061
1012838061
1012838061
1012838061
1012838061
1012838061
1012838061
1012838061
101...

result:

ok 200001 numbers

Test #87:

score: 0
Accepted
time: 12ms
memory: 11188kb

input:

16 30 200000
774601616 692485693 967189834 429259832 296426891 316821928 86524126 747982494 512308631 846796963 29105202 820501606 172881883 311680540 1017592 456179547
10 12
9 15
2 3
3 9
3 12
7 10
4 10
2 4
8 12
1 8
8 11
6 12
8 13
2 12
5 12
5 8
5 13
9 16
1 13
3 7
1 10
3 10
3 8
5 11
2 8
4 14
8 10
1 3...

output:

7806648343
6357272672
5004346203
4040987540
3221503526
2710212487
2281970247
1971307299
1675898000
1380488701
1208624410
1123117876
1037611342
1009523732
981436122
981436122
981436122
981436122
981436122
981436122
981436122
981436122
981436122
981436122
981436122
981436122
981436122
981436122
981436...

result:

ok 200001 numbers

Test #88:

score: 0
Accepted
time: 12ms
memory: 11132kb

input:

16 30 200000
778371010 767069427 941062305 89063818 711136260 375917573 291138067 818518266 339489675 650318923 825989668 527404124 765656766 680039114 528016099 175440720
2 8
12 13
9 16
2 14
5 8
4 6
8 10
3 11
6 8
9 10
2 13
7 8
2 12
1 3
1 5
6 12
8 13
8 12
6 13
1 14
8 11
2 6
8 14
8 15
3 8
1 2
1 13
1 ...

output:

9184548157
7980215506
7250761058
6521306610
5831999418
5142692226
4464686617
3941566805
3502614524
3215760769
2928907014
2678481157
2476406908
2274332659
2187955757
2187955757
2187955757
2187955757
2187955757
2187955757
2187955757
2187955757
2187955757
2187955757
2187955757
2187955757
2187955757
218...

result:

ok 200001 numbers

Test #89:

score: 0
Accepted
time: 9ms
memory: 12060kb

input:

16 30 200000
263179599 317036044 967517959 774730431 436055306 574593101 562874728 896501277 180370326 18491373 461434365 472473441 725424455 449408580 541194322 403957448
6 7
3 8
5 16
6 11
6 8
6 12
5 12
5 8
2 8
1 3
8 16
8 15
4 8
8 9
4 13
6 13
8 14
4 6
6 15
4 7
2 7
9 12
3 4
5 10
7 8
8 12
8 11
8 10
2...

output:

8537394914
7126123472
6248113568
5467853562
4758186514
4191045710
3634943982
3090560627
2647617635
2230053702
1931509031
1632964360
1388276134
1226397181
1226397181
1226397181
1226397181
1226397181
1226397181
1226397181
1226397181
1226397181
1226397181
1226397181
1226397181
1226397181
1226397181
122...

result:

ok 200001 numbers

Test #90:

score: 0
Accepted
time: 10ms
memory: 11112kb

input:

16 20 200000
167456110 928442647 88122871 477665187 857306735 527307605 538774095 18860292 861595928 854181064 10721625 63101841 468096058 288456410 512665601 753518059
10 11
6 15
1 7
5 16
1 3
6 10
2 7
3 15
1 9
5 7
3 14
4 13
12 13
1 11
12 14
7 12
7 8
15 16
13 15
6 12

output:

4525168111
3952874092
3424821622
2896769152
2394825176
1937450743
1634694928
1477960443
1321225958
1243824712
1191444496
1139064280
1086684064
1078545397
1078545397
1078545397
1078545397
1078545397
1078545397
1078545397
1078545397
1078545397
1078545397
1078545397
1078545397
1078545397
1078545397
107...

result:

ok 200001 numbers

Test #91:

score: 0
Accepted
time: 10ms
memory: 10824kb

input:

16 30 200000
123978370 605621029 66689370 23484749 243923409 180729402 925624272 268202297 643469882 648881864 367183683 633687066 912144903 133081569 489925099 148421767
2 6
13 15
3 5
2 15
5 6
1 12
2 12
2 7
10 16
2 8
1 7
8 9
1 14
6 7
4 14
1 5
8 16
8 13
5 15
13 14
3 7
3 15
4 11
9 10
12 13
2 14
4 12
...

output:

3162772247
2460855437
2183127777
1962689117
1837752099
1712815081
1603218261
1493621441
1384024621
1340820000
1297615379
1254410758
1254410758
1254410758
1254410758
1254410758
1254410758
1254410758
1254410758
1254410758
1254410758
1254410758
1254410758
1254410758
1254410758
1254410758
1254410758
125...

result:

ok 200001 numbers

Test #92:

score: 0
Accepted
time: 8ms
memory: 12188kb

input:

16 50 200000
212243253 146193000 619626871 193708456 97310347 869072166 605549501 527637240 487419168 529455686 680844873 172873218 963376745 482862345 71019535 960576074
11 12
1 3
6 12
13 14
3 9
5 10
4 14
6 15
4 13
6 10
7 10
5 14
10 11
9 13
8 13
9 10
3 7
1 15
2 12
5 8
1 8
3 15
14 16
5 15
8 11
3 12
...

output:

2925108698
2513265888
2390576967
2288723284
2186869601
2111696136
2036522671
2010231859
1983941047
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
1957650235
195...

result:

ok 200001 numbers

Test #93:

score: 0
Accepted
time: 8ms
memory: 10576kb

input:

16 120 200000
943969861 108449008 661604087 891101283 103450923 139197808 148791948 692983827 800614354 79101339 696046436 885497368 520142787 954116589 322643360 860539656
5 13
4 12
8 11
1 10
7 9
7 13
9 11
3 16
8 14
6 8
6 11
5 12
4 13
13 14
5 11
1 5
3 14
15 16
14 16
6 14
11 15
12 16
8 9
12 13
7 14
...

output:

2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
2061535335
206...

result:

ok 200001 numbers

Subtask #6:

score: 18
Accepted

Dependency #5:

100%
Accepted

Test #94:

score: 18
Accepted
time: 27ms
memory: 13192kb

input:

3000 24968 200000
410748759 261780644 986184695 825448529 26627998 419721996 243041062 207078286 750018335 215882711 869136902 126135138 237769946 501889487 780340673 340657417 672359115 415818463 12649860 540316001 671873425 492241150 268853233 456105858 497096460 726710205 761975453 471318444 1773...

output:

1471302430758
1469350868421
1467420475563
1465501196690
1463607504025
1461719167658
1459831143475
1457944568060
1456077660450
1454210951221
1452346674565
1450484670355
1448643816567
1446807252406
1444981824151
1443167179928
1441358026610
1439550669083
1437744649188
1435942384816
1434143673984
143234...

result:

ok 200001 numbers

Test #95:

score: 0
Accepted
time: 33ms
memory: 14648kb

input:

3000 26689 200000
494190818 505448806 325437294 529468223 461148198 796119620 218830162 342953752 574899621 849828530 814390564 894942426 928308857 211011107 847574189 440916917 670292024 705277872 161633540 23032155 160316548 815123715 224438854 154258415 293636464 405988566 438311682 548826041 698...

output:

1509675325586
1507688327945
1505705943730
1503749331222
1501799025524
1499877605077
1497979505716
1496105200805
1494234039503
1492370929592
1490517861859
1488681674862
1486847332919
1485015226135
1483188576706
1481382795935
1479577151511
1477773428312
1475970534955
1474176539965
1472384163958
147059...

result:

ok 200001 numbers

Test #96:

score: 0
Accepted
time: 76ms
memory: 20964kb

input:

3000 84732 200000
239484044 773244633 685502423 561168406 62794740 111352208 978456061 11956951 565143581 672159053 706409992 222667263 823553829 248553994 544928103 184236208 785394015 827811660 218818159 925106714 907360907 805850848 403706509 380359243 588375913 645005104 806418610 409108336 1975...

output:

1519686710053
1517730737099
1515818081271
1513914716386
1512036378057
1510168035349
1508315774205
1506465162001
1504615037902
1502778002664
1500942642610
1499112249771
1497298660015
1495494051136
1493704168541
1491916785841
1490130527258
1488344309801
1486563242966
1484786056179
1483028580960
148127...

result:

ok 200001 numbers

Test #97:

score: 0
Accepted
time: 152ms
memory: 28576kb

input:

3000 175431 200000
14941232 857484288 44775057 212452094 771436171 807639460 176364730 722408889 964362389 981374630 456157320 163468436 478448409 946387579 313222569 565278667 836773699 995321247 335482323 67514751 738654640 231509575 551980497 900687627 769917605 418140871 210271211 989406860 2243...

output:

1531476456830
1529504280818
1527542277524
1525629031892
1523726143005
1521833001212
1519960179600
1518092049982
1516237878912
1514390967646
1512550844613
1510727472217
1508911035800
1507101770680
1505314126711
1503533266337
1501757055654
1500005542166
1498260915557
1496518687349
1494783076490
149307...

result:

ok 200001 numbers

Test #98:

score: 0
Accepted
time: 185ms
memory: 31132kb

input:

3000 219951 200000
514136831 191469743 76762240 28157685 481869761 459134123 377983297 331758659 37865824 770252204 826682777 522466363 576293651 496313576 105422101 919761842 78731742 387519588 712378195 536646688 141496892 363498153 46223794 895987061 7098463 79503681 438451240 107273284 44437439 ...

output:

1402009104343
1400289978210
1398732550899
1397184534612
1395645012193
1394109451770
1392624758963
1391220622705
1389849541882
1388497178193
1387291477627
1386094692967
1384904785495
1383761482570
1382629638853
1381519786786
1380437987296
1379381783339
1378334913128
1377304076009
1376276013489
137525...

result:

ok 200001 numbers

Test #99:

score: 0
Accepted
time: 100ms
memory: 18764kb

input:

3000 175605 200000
604135019 175890108 921797578 221085122 366821808 852328464 5014718 842927549 807447646 451542904 592071983 454750101 785484562 877389805 579669631 517280629 749702274 547776676 165747616 928493644 469223780 487622929 889858318 484061540 855732256 407393807 819218471 728596736 711...

output:

1143438193923
1141469535337
1139523394558
1137587986195
1135677867420
1133770452836
1131873496403
1129976573655
1128109581366
1126245765098
1124389090964
1122556527249
1120747152798
1118940712292
1117138036291
1115363081024
1113589610292
1111816967697
1110044670556
1108277885351
1106522335084
110476...

result:

ok 200001 numbers

Test #100:

score: 0
Accepted
time: 213ms
memory: 31120kb

input:

3000 400000 200000
441654374 140765828 526170452 189527401 218710715 886645429 356578194 142959700 337882081 766028489 838032978 330712977 246343426 422382932 343161682 90854996 431284264 488527928 707673848 462987054 580760845 275182229 148105414 624361035 809018600 678311358 442517995 154376509 52...

output:

564183899955
563996345832
563808791709
563621237586
563433683463
563246129340
563058575217
562871021094
562683466971
562495912848
562308358725
562120804602
561933250479
561745696356
561558142233
561370588110
561183033987
560995479864
560807925741
560620371618
560432817495
560245263372
560057709249
5...

result:

ok 200001 numbers

Test #101:

score: 0
Accepted
time: 185ms
memory: 32400kb

input:

3000 239380 200000
853814555 401334251 955708568 398732447 836784817 120259490 478996032 233352475 7749550 965273123 180489796 955696911 552600456 836403765 176278930 137375994 866619131 50341800 352845499 260675237 390608129 22736780 777877831 37418943 5696309 567144719 71655935 341208666 682526386...

output:

1866623042185
1864799076448
1862991062650
1861183185647
1859378327435
1857573525219
1855770385160
1853978924666
1852200857821
1850423405343
1848661729757
1846900927928
1845141183143
1843388249573
1841636928153
1839894039555
1838158740604
1836438765882
1834721112402
1833003894576
1831287901668
182957...

result:

ok 200001 numbers

Test #102:

score: 0
Accepted
time: 9ms
memory: 12464kb

input:

3000 2999 200000
488281 976562 1953125 1953125 976562 976562 976562 1953125 488281 976562 976562 3906250 976562 976562 488281 488281 488281 488281 1953125 488281 488281 976562 976562 1953125 976562 1953125 976562 1953125 3906250 1953125 976562 976562 976562 1953125 1953125 488281 976562 488281 97656...

output:

20930663586
19432128429
18683104991
17934569834
17435058115
17061034677
16687011239
16313476082
15939940925
15690429206
15440917487
15254394049
15067870611
14881347173
14694823735
14508788578
14322753421
14136718264
13950683107
13826171388
13701659669
13577147950
13452636231
13359862793
13267089355
...

result:

ok 200001 numbers

Test #103:

score: 0
Accepted
time: 153ms
memory: 29648kb

input:

3000 128606 200000
1000000000 2946 1000000000 950000000 1000000000 2826 1000000000 940000000 1000000000 1000000000 910000000 1000000000 1000000000 920000000 2665 1000000000 910000000 1000000000 1000000000 2817 930000000 910000000 2749 1000000000 1000000000 1000000000 2670 2497 2570 1000000000 100000...

output:

1936042805390
1935042807880
1934042810370
1933042812860
1932042815350
1931042817840
1930042820330
1929042822820
1928042825310
1927042827800
1926042830290
1925042832780
1924042835270
1923042837760
1922042840250
1921042842740
1920042845230
1919042847720
1918042850210
1917042852700
1916042855190
191504...

result:

ok 200001 numbers

Test #104:

score: 0
Accepted
time: 37ms
memory: 15808kb

input:

3000 26907 200000
1000000000 960000000 1000000000 1000000000 1000000000 1000000000 1000000000 2957 930000000 1000000000 920000000 1000000000 930000000 1000000000 1000000000 2769 1000000000 930000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 2946 10000000...

output:

2471081465230
2470081467976
2469081470722
2468081473468
2467081476214
2466081478960
2465081481706
2464081484452
2463081487198
2462081489944
2461081492690
2460081495436
2459081498182
2458081500928
2457081503674
2456081506420
2455081509166
2454081511912
2453081514658
2452081517404
2451081520150
245008...

result:

ok 200001 numbers

Test #105:

score: 0
Accepted
time: 54ms
memory: 20076kb

input:

3000 2999 200000
100000000 1000000000 2443 1000000000 2588 100000000 2530 100000000 1000000000 2711 2976 100000000 2797 100000000 2606 100000000 1000000000 2780 2734 100000000 100000000 2195 1000000000 2302 1000000000 2513 100000000 100000000 100000000 1000000000 1000000000 1000000000 2512 2700 2124...

output:

1199900000000
1198900002001
1197900004002
1196900006003
1195900008004
1194900010005
1193900012006
1192900014007
1191900016008
1190900018009
1189900020010
1188900022011
1187900024012
1186900026013
1185900028014
1184900030015
1183900032016
1182900034017
1181900036018
1180900038019
1179900040020
117890...

result:

ok 200001 numbers

Test #106:

score: 0
Accepted
time: 15ms
memory: 11556kb

input:

3000 3269 200000
1000000000 1000000000 2608 1526 1000000000 2839 1982 1000000000 1812 1000000000 1000000000 2630 1880 2285 1000000000 1000000000 2349 1552 1721 1692 1000000000 1537 2981 2090 1778 1000000000 1873 1603 2990 2357 1549 1000000000 1000000000 1000000000 1000000000 2012 1000000000 10000000...

output:

1500003371251
1499003372751
1498003374251
1497003375751
1496003377251
1495003378751
1494003380251
1493003381751
1492003383251
1491003384751
1490003386251
1489003387751
1488003389251
1487003390751
1486003392251
1485003393751
1484003395251
1483003396751
1482003398251
1481003399751
1480003401251
147900...

result:

ok 200001 numbers

Test #107:

score: 0
Accepted
time: 32ms
memory: 15816kb

input:

3000 3373 200000
333333333 1167 1000000000 333333333 100000000 333333333 333333333 333333333 2570 2776 100000000 100000000 877 100000000 1124 333333333 333333333 729 100000000 100000000 100000000 2454 100000000 2621 333333333 2705 936 333333333 618 948 1158 333333333 333333333 1126 2794 100000000 26...

output:

523267205967
521267208970
520267209570
519933876837
519600544104
519267211371
518933878638
518600545905
518267213172
517933880439
517600547706
517267214973
516933882240
516600549507
516267216774
515933884041
515600551308
515267218575
514933885842
514600553109
514267220376
513933887643
513600554910
5...

result:

ok 200001 numbers

Test #108:

score: 0
Accepted
time: 13ms
memory: 12432kb

input:

3000 2999 200000
2974 1436 2009 1611 2143 191 1134 2661 916 1577 1215 1365 2119 1842 25 187 1431 597 2938 2377 2564 296 1026 344 2360 2660 1696 1957 1707 99 263 2570 899 2122 2849 1614 1555 635 2161 2408 331 55 1804 2268 2364 1960 2859 740 777 2223 2695 10 252 2493 573 1528 193 1335 1083 1295 1418 2...

output:

4501499
4498501
4495504
4492508
4489513
4486519
4483526
4480534
4477543
4474553
4471564
4468576
4465589
4462603
4459618
4456634
4453651
4450669
4447688
4444708
4441729
4438751
4435774
4432798
4429823
4426849
4423876
4420904
4417933
4414963
4411994
4409026
4406059
4403093
4400128
4397164
4394201
4391...

result:

ok 200001 numbers

Test #109:

score: 0
Accepted
time: 12ms
memory: 10740kb

input:

3000 2999 200000
246 1135 555 2522 982 631 2661 1441 1802 525 1146 2716 1546 2765 700 2399 2584 184 2592 2065 2849 406 2561 2150 14 369 723 252 1918 2931 707 29 924 2205 1061 242 1410 2882 1402 2405 2127 2906 2425 1221 2387 2383 678 2596 1151 157 2737 2342 2401 318 182 906 1438 775 196 2859 2494 169...

output:

4504497
4498501
4495504
4492508
4489513
4486519
4483526
4480534
4477543
4474553
4471564
4468576
4465589
4462603
4459618
4456634
4453651
4450669
4447688
4444708
4441729
4438751
4435774
4432798
4429823
4426849
4423876
4420904
4417933
4414963
4411994
4409026
4406059
4403093
4400128
4397164
4394201
4391...

result:

ok 200001 numbers

Test #110:

score: 0
Accepted
time: 14ms
memory: 12820kb

input:

3000 6000 200000
962055061 575660190 246202709 31582771 379829305 263173884 803516371 297867232 977514071 374584582 514709737 464585869 123702242 139489694 965173228 42049958 391836204 551955015 974140834 700892064 559768094 397876016 363706978 798137028 43805163 563224851 104957463 197373155 724544...

output:

783127678420
781454406191
779880304821
778536008815
777262871479
775995904621
774752391116
773584147646
772448313824
771322006885
770217850579
769137737735
768112423983
767091473242
766072898204
765058258800
764046861930
763038866981
762030982446
761034665584
760039202603
759043947623
758055816331
7...

result:

ok 200001 numbers

Test #111:

score: 0
Accepted
time: 16ms
memory: 11360kb

input:

3000 10000 200000
52615713 132163785 942763241 667805987 645497511 152611206 488719486 464393675 213892339 718020068 464948566 767081452 781410767 761271988 83152902 575438843 362299699 779256847 746346880 207709069 777013473 861032545 849038372 615508968 859745311 834667735 217443103 389387402 3448...

output:

464802041956
463808479655
462848166163
461895981010
460964724934
460046524636
459151006547
458279401940
457409720452
456563453686
455718265382
454903617689
454115174523
453337300431
452565684187
451801691969
451049218216
450304814448
449563099836
448825558292
448089476912
447370432410
446655733667
4...

result:

ok 200001 numbers

Test #112:

score: 0
Accepted
time: 73ms
memory: 19652kb

input:

3000 100000 200000
645760418 718808375 715597155 678296323 133280635 964289321 905957573 817687267 583690434 856365367 716450823 597084756 976324679 255217830 57909950 880954709 329951569 13095929 395882854 408391005 392324852 739169260 56861279 220599449 337181569 456955420 531524439 623320474 4295...

output:

53883029300
53767690744
53655675208
53549015908
53444219273
53342692353
53241272530
53142532973
53045544649
52949355855
52853167061
52757036589
52664776693
52573643961
52482511229
52392064250
52302424513
52212797399
52123170285
52034757641
51947120875
51861026218
51775553068
51690658941
51606180185
...

result:

ok 200001 numbers

Test #113:

score: 0
Accepted
time: 265ms
memory: 40768kb

input:

3000 400000 200000
657562917 773003610 428469732 144160175 648604863 841183820 418102020 519034221 93785958 171468411 787357783 80264925 469243566 610886608 859743441 801330594 62810774 532054421 299320255 224842916 686292106 166768289 678438859 897465750 773044449 121408754 79615007 31285555 495282...

output:

12744982946
12712624052
12686223901
12660868494
12636861404
12613140527
12589943859
12567431906
12547305768
12527521748
12507737728
12488065776
12468711554
12451651889
12434811020
12417970151
12401129282
12384767643
12368406004
12352051449
12335696894
12319841948
12304280195
12289039441
12273798687
...

result:

ok 200001 numbers

Subtask #7:

score: 0
Skipped

Dependency #1:

0%