QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#544267#8255. Room TemperatureZhangYiDe85 120ms192920kbC++171.9kb2024-09-02 14:15:032024-09-02 14:15:04

詳細信息

Subtask #1:

score: 15
Accepted

Test #1:

score: 15
Accepted
time: 25ms
memory: 191808kb

input:

2 1000000000
870851814 881870957

output:

5509572

result:

ok 1 number(s): "5509572"

Test #2:

score: 15
Accepted
time: 23ms
memory: 191068kb

input:

2 2691
205734472 599908142

output:

660

result:

ok 1 number(s): "660"

Test #3:

score: 15
Accepted
time: 32ms
memory: 191584kb

input:

2 1000000000
594215883 41345726

output:

223564922

result:

ok 1 number(s): "223564922"

Test #4:

score: 15
Accepted
time: 23ms
memory: 191136kb

input:

2 2691
667489049 282547821

output:

470

result:

ok 1 number(s): "470"

Test #5:

score: 15
Accepted
time: 23ms
memory: 191220kb

input:

2 1000000000
263981200 857652688

output:

203164256

result:

ok 1 number(s): "203164256"

Test #6:

score: 15
Accepted
time: 15ms
memory: 191152kb

input:

2 2691
938568750 473949653

output:

445

result:

ok 1 number(s): "445"

Test #7:

score: 15
Accepted
time: 24ms
memory: 191140kb

input:

2 1000000000
40944021 145199528

output:

52127754

result:

ok 1 number(s): "52127754"

Test #8:

score: 15
Accepted
time: 30ms
memory: 191540kb

input:

2 2691
907627168 852663911

output:

209

result:

ok 1 number(s): "209"

Test #9:

score: 15
Accepted
time: 26ms
memory: 191220kb

input:

2 1
1 1000000000

output:

0

result:

ok 1 number(s): "0"

Test #10:

score: 15
Accepted
time: 24ms
memory: 191068kb

input:

2 1
999999999 1

output:

0

result:

ok 1 number(s): "0"

Subtask #2:

score: 5
Accepted

Test #11:

score: 5
Accepted
time: 32ms
memory: 192568kb

input:

3000 1
527962400 375396162 403550632 368119563 98122336 575071005 735930417 713872349 126691431 587408550 68301442 78445831 779182574 900615066 540352310 97512141 56370167 875603720 977151830 187655072 321929392 68890256 341544318 18277276 427645487 5442872 264570852 285260601 560506154 919011927 20...

output:

0

result:

ok 1 number(s): "0"

Test #12:

score: 5
Accepted
time: 24ms
memory: 191176kb

input:

3000 1
125514453 768659053 486755528 299945084 862360713 8675510 858615908 36113622 852434719 631544026 152565003 248475502 152208269 372824161 605166385 947406972 22495491 16144197 428103403 540600274 825892700 402884826 869448753 21131099 563254083 482692292 836456471 136772702 161953814 632591878...

output:

0

result:

ok 1 number(s): "0"

Test #13:

score: 5
Accepted
time: 32ms
memory: 192492kb

input:

500 1
877137499 911480798 105327978 808804265 727937304 637853446 718031798 765195806 838206927 484239981 607467844 605792967 38697323 332194610 273988993 323047109 798562931 435509933 372308228 443534704 707117313 487932300 211775548 761591411 77454451 882287790 277784787 263090914 819288580 176177...

output:

0

result:

ok 1 number(s): "0"

Test #14:

score: 5
Accepted
time: 19ms
memory: 192836kb

input:

3000 1
302072813 159511621 389241523 87239051 654013995 612092525 811507271 759331557 82587805 4610835 527337463 225987819 848995387 369192513 837790413 257183405 827634015 124043241 120492531 441525119 740937 215335731 287893333 646763119 353975191 806994341 813045851 410859105 603701099 713224409 ...

output:

0

result:

ok 1 number(s): "0"

Test #15:

score: 5
Accepted
time: 27ms
memory: 192308kb

input:

500 1
81888042 43067133 107207954 11840122 12213120 1564709 591852273 88838690 961663051 516561909 168803248 844631608 873195256 827482724 743609376 619362989 538294587 82184630 144127319 243409882 211682139 271003483 663591071 168473717 654369346 16498799 591919038 700712177 385773734 618206739 813...

output:

0

result:

ok 1 number(s): "0"

Subtask #3:

score: 30
Accepted

Dependency #2:

100%
Accepted

Test #16:

score: 30
Accepted
time: 15ms
memory: 192660kb

input:

3000 2
885745611 864341459 300047319 287916141 644603625 884166447 590534965 653358937 990188463 990316905 558306521 980116759 553013905 519316677 185497721 825112521 474133783 274235087 415114857 272795329 667603077 923296831 577923973 907451785 74744583 582644091 637370755 55344013 145242745 11163...

output:

0

result:

ok 1 number(s): "0"

Test #17:

score: 30
Accepted
time: 33ms
memory: 192444kb

input:

3000 2
815254336 124748890 922650362 491188496 844408566 4477401 897872910 543206825 520044175 152252928 137325742 296978488 94941447 128102092 232850362 442060951 176696075 19548785 80969000 215525942 924301170 837296603 303165509 108844385 266183198 990018404 686038287 219436341 911589193 14746520...

output:

1

result:

ok 1 number(s): "1"

Test #18:

score: 30
Accepted
time: 23ms
memory: 192684kb

input:

500 2
401665219 27125575 775455335 839862311 960668465 238565856 738888265 901690231 304617077 103869276 209825343 618624634 605291100 268367109 261071747 998379490 704657059 187305917 910307778 870658986 536558030 6581819 190056964 211565999 892305820 620959159 360551386 791369750 697844538 6282286...

output:

1

result:

ok 1 number(s): "1"

Test #19:

score: 30
Accepted
time: 31ms
memory: 191400kb

input:

3000 2
522476642 810060218 147624038 855137278 915087104 81884778 525414244 894662888 410263396 941820940 423155602 520147790 615706710 710760688 226912160 596683116 203181268 324211490 679562872 268407934 204591892 80890276 839993536 16090044 796081826 673760802 901037356 780466340 43952110 3614940...

output:

0

result:

ok 1 number(s): "0"

Test #20:

score: 30
Accepted
time: 25ms
memory: 192012kb

input:

500 2
401575885 412743311 771792855 497402889 589191539 886766329 406659227 453993629 496243093 779810717 930633301 930956619 242644227 356605399 364800377 126585217 707620365 253271779 307180205 20790719 91049019 110549957 578458983 224326281 202269525 831044405 944165261 175228805 838484973 876412...

output:

0

result:

ok 1 number(s): "0"

Test #21:

score: 30
Accepted
time: 16ms
memory: 192004kb

input:

3000 2
303563168 71740834 195834514 3380992 22250404 75355492 9181252 637320910 700179430 343368856 609982580 819446272 657025786 417130700 869124046 29260574 635565794 960260466 88361168 62855338 937906970 272056128 691558732 38964352 156445024 972341020 952652654 209319766 866597994 310506834 8648...

output:

0

result:

ok 1 number(s): "0"

Test #22:

score: 30
Accepted
time: 27ms
memory: 192736kb

input:

3000 2
354850469 308022921 982030052 204243429 81359634 396352087 818660632 346171682 414089414 858843314 833282674 666064122 822445534 820666553 65489973 666985874 349651060 420770828 851434715 109309679 326719078 292037079 553269053 165517023 457752713 386379859 34971829 142091597 181586420 199000...

output:

1

result:

ok 1 number(s): "1"

Test #23:

score: 30
Accepted
time: 24ms
memory: 192104kb

input:

500 2
203412544 61851007 586535587 486968143 875369021 985875249 316089162 929955174 401867218 186579046 471528419 82273912 962932206 269786079 680174046 836866080 761653128 283496098 474840952 11671544 148873680 913438388 102086606 188883488 192992369 187379128 552781119 473926266 433670893 2121962...

output:

1

result:

ok 1 number(s): "1"

Test #24:

score: 30
Accepted
time: 19ms
memory: 192496kb

input:

3000 2
68755410 923083310 590388927 432449601 829287927 156119923 831497540 435929505 202167093 259654068 823404393 366667751 387824239 255289399 474809364 311198520 223107837 18229805 206717099 58481453 562234436 251622772 215421828 775829160 630537818 120589081 704348542 84404675 973185256 1896456...

output:

1

result:

ok 1 number(s): "1"

Test #25:

score: 30
Accepted
time: 23ms
memory: 191584kb

input:

500 2
398516650 938858974 267530994 514280855 599861463 585730873 708929375 981837909 821418825 964204380 702106030 787046858 954738784 93005000 423786944 361707689 817985175 354667355 531023809 937831653 751111899 882967067 829961299 869476136 196715580 479362190 377271787 67536934 231224157 225451...

output:

1

result:

ok 1 number(s): "1"

Subtask #4:

score: 35
Accepted

Dependency #3:

100%
Accepted

Test #26:

score: 35
Accepted
time: 64ms
memory: 191908kb

input:

3000 3000
533153071 239070382 708344889 674533552 483802927 296899924 329086 80884554 732953835 62102396 940008178 492401942 781501549 216632603 706953056 20746870 92094171 384067282 621705878 480022796 695971496 146935760 479123274 831630107 278433192 534994849 102542881 278470399 551357803 6073189...

output:

1496

result:

ok 1 number(s): "1496"

Test #27:

score: 35
Accepted
time: 38ms
memory: 191408kb

input:

42 3000
754274998 822961596 932465876 339412345 177684528 963952164 141030764 517806972 680542461 968488186 80253359 782540517 56441822 356863563 600705089 728862566 319632076 362033128 807266164 872727071 658130967 851081128 980844898 361681389 206524648 205561797 386232279 672567842 956335507 1787...

output:

1324

result:

ok 1 number(s): "1324"

Test #28:

score: 35
Accepted
time: 29ms
memory: 192160kb

input:

3000 42
354854941 822325099 524749982 990951393 151897977 122977243 542161994 655100949 657272310 978121545 673586877 210362436 221729103 655831609 607486955 634591549 990298100 733294844 496109191 729492128 502001539 582808377 945935328 756682179 536380863 659042891 466968394 858574147 894569965 35...

output:

21

result:

ok 1 number(s): "21"

Test #29:

score: 35
Accepted
time: 67ms
memory: 192136kb

input:

3000 3000
341 1006 1626 1994 1995 2767 928709780 489934049 973950233 34045023 570451389 622069514 925369591 994101097 518157214 982962074 471463087 576145296 369286010 685863008 39459065 764734433 89921876 382849272 155995295 856789469 354343509 374863173 341451236 81026972 710563117 380432893 97200...

output:

1114

result:

ok 1 number(s): "1114"

Test #30:

score: 35
Accepted
time: 80ms
memory: 191920kb

input:

3000 3000
154 543 986 1058 2068 2356 76975978 571609787 429155934 191832099 653094554 286657063 149264888 416591665 938459865 900094061 802815011 561845952 560703869 937912361 696240096 442755866 47886766 610158837 970105542 63467008 628984153 45092877 913119895 508992798 723808880 845194104 8414800...

output:

1306

result:

ok 1 number(s): "1306"

Test #31:

score: 35
Accepted
time: 70ms
memory: 192820kb

input:

3000 3000
867812036 605396783 654104856 32282887 301964616 48878673 607454640 165020919 31454939 62189200 460280407 485405181 57098764 321542252 107039982 909005296 835574151 251516202 47750439 559625154 618752748 666191811 29093705 699404815 120530719 403025483 197741673 777620225 258203676 4154908...

output:

482

result:

ok 1 number(s): "482"

Test #32:

score: 35
Accepted
time: 120ms
memory: 192388kb

input:

3000 3000
111553216 530301520 489590335 181438307 95628580 136221843 554198672 776918628 395824037 659551027 339165394 946668392 761257603 673427641 936608620 356228954 829564142 267297718 773462389 842276300 173454539 159026437 820723252 291558526 494685862 811904787 727049878 388121105 683760572 3...

output:

1495

result:

ok 1 number(s): "1495"

Test #33:

score: 35
Accepted
time: 34ms
memory: 192920kb

input:

42 3000
771491221 728682918 430527432 600092582 297642202 977456633 764136477 562632695 717105791 890157410 306932665 820288030 773111500 849977588 963538571 804358075 705347182 733581358 537602342 64209887 374454962 207795851 16039161 908676658 803633305 90259469 393018087 790843506 857591734 14204...

output:

1324

result:

ok 1 number(s): "1324"

Test #34:

score: 35
Accepted
time: 24ms
memory: 192904kb

input:

3000 42
565202812 947984705 153915530 131046786 606381431 868085234 565035708 820745652 636886530 158249879 344249999 80730146 10849647 190176769 407396863 846442654 262129931 996836276 764872530 631148468 339347288 131889397 894286206 945772653 880702362 61935197 52356595 396688994 264344342 230627...

output:

21

result:

ok 1 number(s): "21"

Subtask #5:

score: 0
Time Limit Exceeded

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #35:

score: 0
Time Limit Exceeded

input:

500000 1000000000
630508671 110404795 845304804 982383111 410629108 882479561 660871876 938901329 896704981 68655143 438642844 366107936 79487854 78479257 198921400 44557534 220128219 663177963 597033974 418707953 520947143 423646478 594525906 974489220 330237089 109614240 231725216 110016856 391564...

output:


result: