QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#875235 | #9649. problem | HuangHanSheng | 0 | 27ms | 6248kb | C++14 | 871b | 2025-01-29 13:37:16 | 2025-01-29 13:37:16 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Pretests
Final Tests
Test #1:
score: 0
Wrong Answer
time: 18ms
memory: 3840kb
input:
1997 13 2000 173 1173 1390 1848 339 1283 846 1672 644 791 898 1884 68 79 29 907 298 641 835 1004 564 1315 262 332 826 1380 1067 1186 460 1355 1447 1635 290 589 1094 1851 190 1038 653 1932 349 733 1810 1883 147 1942 207 566 12 60 56 1819 423 1274 1603 1966 297 803 522 524 1510 1940 492 602 1397 1669 ...
output:
-852529240 623015777 -417690489 -265218410 -112650156 -961181262 -894281607 -687089961 -80054033 -359635106 -52646769 858155914 842211802 -110504151 -123823364 852054372 582988248 278634534 -572302585 -870069985 276498348 -962537864 -133712370 -155979844 879710392 -582244454 -936433207 372328188 -83...
result:
wrong answer 1st lines differ - expected: '998807601', found: '-852529240'
Test #2:
score: 0
Wrong Answer
time: 19ms
memory: 3840kb
input:
1995 14 2000 639 1231 475 679 12 179 719 1451 335 1415 1135 1460 954 1346 1172 1278 621 843 618 954 649 1076 161 1884 359 1597 1006 1347 1048 1768 875 1892 1311 1621 71 1435 177 679 393 597 403 1155 54 1028 353 1426 275 1555 377 1609 1456 1682 430 1607 866 1547 248 1224 181 362 251 1966 1024 1243 58...
output:
-931253273 345159395 -82096934 489341974 -221688464 482464928 -270755880 532186404 210483184 -457465048 -695130372 -538308954 718737641 -313130991 240014659 515187417 -751478393 93003672 -396659944 -212820104 -816640373 11591524 -655205147 960564522 448389457 669138942 -928287064 415677109 90016766 ...
result:
wrong answer 1st lines differ - expected: '420910086', found: '-931253273'
Test #3:
score: 0
Wrong Answer
time: 27ms
memory: 6144kb
input:
100000 1 99991 65936 91366 18231 94904 78136 98982 5923 55572 56154 56976 16519 51688 27114 85795 13841 66508 53501 64992 55262 85456 45291 51763 9150 22167 40160 71640 8594 93216 41460 54569 50758 87075 37891 46819 52457 92063 69325 93799 60846 98645 36339 37980 11741 87836 77374 95597 28033 35884 ...
output:
2046000655 24776743 1620544534 1913842942 169002561 675738489 2073072845 560721295 483332973 408552663 253124971 1365517859 2302904930 134220778 3039904364 2830114954 1776124710 3151036183 35431144 2738931249 350274621 3017930045 907124224 8385142 2455565514 1543314559 313505715 1497512364 590804614...
result:
wrong answer 1st lines differ - expected: '46000641', found: '2046000655'
Test #4:
score: 0
Wrong Answer
time: 23ms
memory: 6248kb
input:
100000 1 99991 70681 88140 67484 73681 15674 17415 40078 92459 15898 50120 16610 53929 75031 88822 14066 61564 29232 84223 35743 49204 19675 59272 19358 36024 32317 33158 74824 75761 41091 94834 30508 68857 8299 48927 22137 87187 2539 13740 9651 92567 3498 79569 48919 69930 68914 75113 85947 88542 4...
output:
1441273688 1903457551 179779393 2640460145 2783425192 1804491977 3254780603 2365509608 556348341 1585631143 230281368 59331057 1867468112 796955262 499065169 1398871158 3030569406 2766529419 208297 580406644 3294601593 2062759465 2163353847 444679117 2489204732 1367752777 1122304583 1528522713 28455...
result:
wrong answer 1st lines differ - expected: '441273681', found: '1441273688'
Test #5:
score: 0
Wrong Answer
time: 25ms
memory: 6016kb
input:
100000 2 99993 2296 57055 26675 72223 9679 27823 62383 76529 16853 39940 10325 20898 19366 69708 53993 56313 77391 96491 13978 50720 3786 37923 48673 94619 5358 75806 46280 87238 18687 40867 35935 96769 61227 73365 51789 87609 4062 63235 15544 95143 4474 18830 80698 93112 26529 33118 21662 97902 421...
output:
1646281796 918351967 3113174685 304549760 2147838937 870700992 319668945 1289405522 44917633 1527627628 3289134839 2298402024 981473555 3019723225 477593880 2980228983 2111872363 1629801612 1984659495 1689307333 137119691 1892481360 1991380490 1263754499 2032403683 466475783 331785386 1205002513 102...
result:
wrong answer 1st lines differ - expected: '641656749', found: '1646281796'
Test #6:
score: 0
Wrong Answer
time: 24ms
memory: 6144kb
input:
100000 2 99997 82850 86533 21477 72747 44515 73151 43388 99270 380 19701 10415 14627 7327 67283 3871 25907 8113 60732 14469 61755 11296 79602 4827 86722 67963 99579 1551 89254 51137 62105 40201 78226 55827 75474 84980 86518 67108 96450 955 11244 46063 53285 27109 33270 12634 50773 12280 83265 1874 5...
output:
352565730 3143078254 2016772720 3065617022 1265204912 55872193 2117789232 89469075 603302187 579369717 902254411 3121185982 1605488366 752412983 485925668 1176367964 702594947 1226636010 870783249 1536051336 506840117 537474382 113870090 148219727 1419531972 2122909271 3075637401 1698238385 20043669...
result:
wrong answer 1st lines differ - expected: '307395947', found: '352565730'
Test #7:
score: 0
Wrong Answer
time: 27ms
memory: 6144kb
input:
100000 2 99992 48714 63403 70730 75716 77838 95799 70748 77544 79445 93524 10505 16868 34546 39392 6334 75622 24973 38835 78217 85341 53985 94613 23547 33283 25528 93800 58967 89124 14035 37216 83633 87813 10287 58939 15055 21248 53857 54345 19069 51536 20443 44548 85297 94353 9609 26741 46002 79028...
output:
49094837 1154110595 688277511 17237358 78653314 290300114 3248868785 222786993 1390883525 2731521000 804979061 1252829957 35165881 2417517864 3081428583 85283435 2095276594 1156044738 1525874699 3313029360 217616488 227516779 1846690139 625391738 449395933 1405407954 796077341 1178320403 880967240 7...
result:
wrong answer 1st lines differ - expected: '949409790', found: '49094837'
Test #8:
score: 0
Wrong Answer
time: 24ms
memory: 6144kb
input:
100000 2 99992 45488 68149 21789 63088 49821 79788 11699 74930 39188 53963 10597 43299 72165 87309 55884 78248 36854 97726 33119 66158 2122 19856 47140 66459 55317 74581 5983 56291 33261 47486 30104 59770 20835 45100 55978 77834 41583 43967 12992 67637 10329 79090 43486 88141 33853 73553 36620 64391...
output:
2692046914 307561737 173762580 146502287 2846550859 252418453 924977903 127090021 1204717637 3035840395 3057390804 1814490492 296573466 1666981966 1293119022 46957511 841947709 989800709 775930934 3060552292 1610557872 66100997 2698056131 2289845016 2875728152 3079221188 930268647 627246790 30434497...
result:
wrong answer 1st lines differ - expected: '34747980', found: '2692046914'
Test #9:
score: 0
Wrong Answer
time: 27ms
memory: 6144kb
input:
100000 2 99992 14111 31862 566 12341 45996 96480 11816 54367 14403 98932 12839 19198 35226 75192 27634 58675 34872 61966 48193 62610 9632 94240 76668 93701 49539 66738 56161 87592 861 76679 3202 15499 23948 38696 23412 75205 28820 77182 7930 98402 13544 76110 10187 49225 58097 96172 27238 60153 3097...
output:
525696636 2818040800 1305652512 67959950 1891457265 132977332 2740426975 2663934055 1438459674 971413622 2219460826 157767372 853144618 3200031300 154574451 1878960438 2487296323 264192960 233700257 2084506987 673365629 819690781 2789917850 329024388 3124597682 1193317986 421998326 1229430453 371629...
result:
wrong answer 1st lines differ - expected: '633545272', found: '525696636'
Test #10:
score: 0
Wrong Answer
time: 26ms
memory: 6144kb
input:
100000 2 99997 18856 61339 3535 37403 17980 47764 15999 88522 25972 74842 6568 19288 37003 83143 6397 7896 34719 65594 4482 26359 17141 35919 40262 62684 24303 43760 23327 77712 43835 63201 57790 79338 73509 85844 5280 58141 48762 67293 16517 56735 50403 80703 43012 68375 16933 42984 45516 85152 591...
output:
50793229 2574186231 43606476 854393799 692445884 20751451 1504401630 106024915 767835982 906500152 699099842 2324407323 1961810505 2938752857 2259248191 2162318499 180265378 1131854106 177502198 2615574677 385885344 779393219 1020953570 2345531793 977522602 1651259460 741334946 1527601607 22643784 2...
result:
wrong answer 1st lines differ - expected: '365035455', found: '50793229'
Test #11:
score: 0
Wrong Answer
time: 21ms
memory: 6144kb
input:
100000 7 99994 28 510 109 195 94 284 69 346 63 80 504 508 19 245 194 333 86 498 58 79 116 511 203 322 46 301 373 445 312 461 215 330 18 36 65 297 323 363 412 419 141 299 398 451 80 358 24 332 244 316 145 481 293 339 55 278 55 269 8 448 197 479 333 474 90 442 5 339 32 62 137 419 398 419 14 474 135 13...
output:
7818892 4271815 6141543 1908312 13523458 767351 8142210 11815590 15782465 5986515 606966 2615405 6714079 6789521 10027141 2796772 12579861 3321679 536327 6648646 9001502 10305582 4608271 14629862 28919 2886207 16922550 1019326 3480238 2198778 9594795 15432049 1541469 445782 4568182 7496596 8962680 1...
result:
wrong answer 1st lines differ - expected: '384285535', found: '7818892'
Test #12:
score: 0
Wrong Answer
time: 23ms
memory: 6144kb
input:
99998 8 100000 258 356 12 420 248 445 93 332 6 465 295 403 141 490 360 497 73 391 126 277 496 509 96 160 25 451 187 448 77 153 349 363 62 108 64 217 183 374 116 328 23 450 48 289 60 494 45 370 11 438 133 243 150 299 483 500 170 350 125 481 125 248 151 491 45 140 299 487 129 401 213 238 263 458 135 1...
output:
4958033 6791771 384241 10224432 13140267 12203938 7633599 9043612 376753 568247 696534 5926642 15706714 2523839 15390721 8371297 3616500 4807042 3489538 9786859 13032067 9870100 2927318 6641275 4423846 8019824 2134772 4937922 12631289 12619210 40215 9430136 2768968 4597351 16222626 12440099 95629 10...
result:
wrong answer 1st lines differ - expected: '103987123', found: '4958033'
Test #13:
score: 0
Wrong Answer
time: 25ms
memory: 6144kb
input:
100000 3 99999 32543 49636 35941 53122 39591 56695 6883 23920 42561 59721 16402 33474 42089 59282 54626 71682 69330 86526 82522 99681 47813 64898 31468 48577 23183 40210 56283 73377 41913 59104 27813 44937 24035 41053 17202 34256 37982 55149 58324 75441 51947 68980 69354 86547 81529 98641 18665 3572...
output:
350695467 208213397 245282808 351409294 352129949 356571733 354836706 350722682 202523851 295915616 353756313 282969684 350509895 350655859 337023613 293806895 352200209 298182047 327857763 353000827 344720569 354917262 354521923 350887567 323917858 355648371 354922516 347691846 211111025 356403253 ...
result:
wrong answer 1st lines differ - expected: '292969726', found: '350695467'
Test #14:
score: 0
Wrong Answer
time: 23ms
memory: 6052kb
input:
100000 4 99994 43442 62691 13722 33004 48998 68198 11841 31095 28132 47426 79825 99019 27945 47234 14991 34298 56789 76010 37059 56283 17994 37286 80761 99923 15924 35207 25700 45000 58792 77966 42822 62070 55904 75102 51313 70577 17338 36634 33030 52263 26407 45702 38841 58087 48743 67950 4572 2377...
output:
295283932 362795056 458538859 309774085 333579223 398551488 459412806 460051986 456847547 410095315 372298334 420072447 459996476 460080797 458170492 459801590 456694090 450449577 449209740 458682272 456309634 297250067 459575804 289029246 457985714 458130519 449251179 415139610 458518849 351010505 ...
result:
wrong answer 1st lines differ - expected: '804826713', found: '295283932'
Test #15:
score: 0
Wrong Answer
time: 24ms
memory: 6144kb
input:
99998 5 100000 54935 66393 67394 78811 36393 47848 28287 39745 64256 75655 3416 14837 62810 74237 15574 26961 27519 38957 12640 24021 34061 45544 81657 93046 29668 41110 60969 72385 39212 50669 10590 22036 21820 33237 75911 87318 50363 61837 85536 96972 16574 27978 27716 39155 43703 55155 52139 6360...
output:
140284876 149708751 147541554 146001481 141090031 149271127 130026991 148549800 93129577 149518233 149809166 147593518 148566251 143445956 146027715 146995573 145550093 149694716 147889802 96850743 130060854 146733844 91721236 148132414 149746750 149420274 149709439 146056875 147396672 147023194 147...
result:
wrong answer 1st lines differ - expected: '141469878', found: '140284876'
Test #16:
score: 0
Wrong Answer
time: 24ms
memory: 6144kb
input:
99993 6 100000 60046 73510 76743 90353 27819 41261 41945 55410 47263 60852 81275 94950 60884 74362 8070 21589 26792 40260 73860 87502 66467 80049 55282 68842 47250 60838 67914 81497 79147 92797 35992 49417 46246 59796 46324 59884 44798 58306 27714 41158 19818 33333 24670 38145 1298 14867 21186 34690...
output:
212704778 211765489 162994755 209237009 199752477 212428238 209119178 216680339 169668300 216186833 201546499 211884728 216034883 213922506 211251610 209584724 214682598 183635829 209171551 209435435 208660649 111275743 210375733 213960345 209282878 209522293 213014776 212572912 160763074 212747161 ...
result:
wrong answer 1st lines differ - expected: '893388017', found: '212704778'
Test #17:
score: 0
Wrong Answer
time: 26ms
memory: 6144kb
input:
99992 7 100000 46709 62298 43845 59423 57608 73174 8380 23971 19686 35150 29121 44618 1189 16899 77233 92964 54510 70048 1366 17075 63662 79263 41721 57285 78703 94414 16275 31839 71866 87509 45626 61226 25380 40827 63233 78854 24302 39727 72140 87796 75448 91154 66375 81966 44357 59954 58893 74503 ...
output:
290177429 265051886 285556396 199068300 290151644 284629357 217609023 285769255 285937542 162711609 284962008 287283928 287915133 290199699 285817666 146688248 286391729 290248840 285250125 289949434 286739607 286458813 276679136 287108226 285439194 223175050 284614100 286918399 189043644 216543509 ...
result:
wrong answer 1st lines differ - expected: '164257914', found: '290177429'
Test #18:
score: 0
Wrong Answer
time: 23ms
memory: 6144kb
input:
99994 8 100000 65934 76851 57966 68909 52727 63644 9222 20158 75411 86373 28837 39739 88037 98979 52361 63310 14371 25383 49419 60352 9448 20401 87487 98458 23620 34585 7173 18125 60612 71502 74819 85797 55595 66567 4278 15237 8169 19086 88396 99329 31853 42703 44761 55565 80386 91426 55576 66544 37...
output:
136099045 84411777 134597555 134858221 135705551 132271749 132896152 130270091 133109762 136534767 131259236 125457242 130942872 136583175 133220180 136558788 134717886 132822374 132457673 125307498 135021168 110622954 132800342 131266134 99434933 134614530 136800079 73152884 134006369 136576417 712...
result:
wrong answer 1st lines differ - expected: '674884528', found: '136099045'
Test #19:
score: 0
Wrong Answer
time: 24ms
memory: 6144kb
input:
99993 8 100000 27852 43018 65883 81212 55196 70592 66316 81648 60797 76161 10804 26079 3544 18697 61916 77265 49713 65101 80135 95471 8532 23772 23610 38740 79696 95032 18137 33318 70569 85974 44133 59536 16455 31626 40549 55877 53460 68867 9924 25192 17320 32454 63023 78373 68019 83342 23888 39026 ...
output:
236241668 275911656 280757552 274551500 278668583 271533507 213519615 270818906 280321573 271220306 278814991 278876869 277487584 225159588 266017515 279115130 274622258 272857741 279873428 270689826 271753681 270188742 279663731 273556132 280700850 148617125 255566057 237479117 279930858 263750968 ...
result:
wrong answer 1st lines differ - expected: '705277784', found: '236241668'
Test #20:
score: 0
Wrong Answer
time: 20ms
memory: 6144kb
input:
99993 8 100000 4756 24312 12546 32006 56275 75922 30611 50207 58142 77797 11390 30842 69103 88760 20148 39670 61197 80850 2128 21632 45720 65404 4425 23981 34976 54654 44329 63987 23725 43324 79298 98996 21104 40646 24114 43700 35228 54890 63635 83351 12264 31726 62034 81706 42628 62284 15486 35013 ...
output:
474740831 481277477 478586856 436807224 387548151 476580505 478834981 476323281 480572760 481132613 374963575 460449141 405689991 478052740 476581751 455151456 475720849 471772351 477619881 335581011 479758283 479902177 473307785 477735233 474965425 481552389 480663773 477076024 238340661 467659600 ...
result:
wrong answer 1st lines differ - expected: '855873060', found: '474740831'
Test #21:
score: 0
Wrong Answer
time: 24ms
memory: 6248kb
input:
99997 6 100000 52795 76204 60242 94846 80082 89521 43789 83470 7347 17593 56216 67092 15233 91115 43430 52679 8086 21418 60025 82527 86078 94448 4145 27768 22185 40688 84161 88178 10627 48034 56113 60342 6327 66377 59696 81615 12544 43539 48748 75319 17899 80605 62730 88402 6995 14597 9331 23660 143...
output:
445648124 2250162690 197501327 547098132 1166647585 2829104393 1208991349 2582291074 3010292273 1471850737 1355428520 1842989277 102297036 1913785535 3332686695 1050819400 35846083 1272784506 2132844930 150041766 2889839475 3309780381 132083498 697484353 1748619710 2266143510 2612119148 2872004941 9...
result:
wrong answer 1st lines differ - expected: '341223509', found: '445648124'
Test #22:
score: 0
Wrong Answer
time: 25ms
memory: 6144kb
input:
99992 7 100000 27128 54642 18776 48660 32020 81911 14635 52281 16313 49793 275 70381 3805 42531 32208 71097 22894 99371 4608 26589 2806 44204 47466 63243 48834 54881 27929 63878 27969 76632 20642 27385 14924 70165 16798 69834 29534 62692 76109 86503 37454 59613 6607 86600 1486 45880 7851 48183 3446 ...
output:
1004953413 2605429505 2155283459 67437912 1398051444 2885942348 2783649698 1152165350 296896709 118665814 2317121763 2018030458 3126257685 907864714 2279979636 778606691 1546248591 404475129 130192472 1874330075 53229157 3018724552 1965388041 2683750998 105262555 1572152713 972476255 2509538833 2478...
result:
wrong answer 1st lines differ - expected: '765452205', found: '1004953413'
Test #23:
score: 0
Wrong Answer
time: 26ms
memory: 6144kb
input:
100000 8 99992 5525 88336 10461 93311 51747 91464 79890 89815 7705 13107 52076 64416 67400 81448 9571 24878 98891 99644 25122 79242 43829 70517 38851 76280 60902 72914 24253 41795 65752 75779 14486 83346 50461 60069 60825 83759 56425 84253 14562 41434 28226 77220 11636 84979 43610 72498 23200 61206 ...
output:
951314569 1476804822 416992704 1386797481 1454343765 883001402 2722914260 1063417590 3091025293 56935728 445820832 1940710160 150230322 1746876862 804351291 272795859 2171971809 1703358103 1949459888 1914826617 785595264 2920341258 2382411274 2711842045 1587327775 346038071 38383879 1962504286 27600...
result:
wrong answer 1st lines differ - expected: '714876740', found: '951314569'
Test #24:
score: 0
Wrong Answer
time: 24ms
memory: 6144kb
input:
99996 13 100000 60077 60586 53452 64015 46838 89521 41235 50247 61110 70098 33221 77330 30075 79794 66972 79753 23114 76719 90895 93753 1570 12671 3476 16878 24750 97834 20280 68598 38680 53438 36049 48880 33061 56218 24232 79949 32570 75213 74546 95579 17573 96857 73405 85369 11909 16394 15237 5298...
output:
357990668 1526073265 367891759 1092628798 1116472467 1822570780 2833212710 778648468 969350648 2025811973 903789560 3144923277 82211254 85098601 912273976 1189480535 553189704 1913437963 1312015565 1154833758 536362134 127291491 326238409 2857592695 2366455455 712815364 1579281540 13166343 209456741...
result:
wrong answer 1st lines differ - expected: '741716899', found: '357990668'
Test #25:
score: 0
Wrong Answer
time: 24ms
memory: 6144kb
input:
100000 14 99991 11683 30464 36116 93179 11630 72529 67922 83994 88958 94896 38498 53213 68662 87187 19199 42279 40847 61376 52053 76046 72860 80526 7846 28669 76791 81298 43954 61353 48538 86251 24262 90689 8142 52015 32987 68879 48867 59608 9690 40919 52857 74611 74249 80744 24417 81484 33024 48134...
output:
2516950500 1553456639 1749782753 2901127334 11148797 1126589631 2226891212 36994818 3234182466 3232922988 184676514 1498019874 1909016669 2558465908 111223760 2873242782 803114459 2410693730 26677527 407415515 477587509 400100920 1625918976 2797383052 2149046163 579147166 2893422606 998963423 200865...
result:
wrong answer 1st lines differ - expected: '476842798', found: '2516950500'