QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#68063#4605. 生成树计数pretentious100 ✓61ms4668kbC++2011.4kb2022-12-14 13:00:142022-12-14 13:00:15

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

105 14
138447198 654870701 150462538 749539275 29291082 757937945 39017800 516237051 770048433 208371121 183485972 565638440 892667426 429830095 20420107 149308492 634292609 342992316 892767631 233604646 172597402 779769499 264531516 831659743 713722094 913085287 579306192 484271595 775184458 338222...

output:

745603313

result:

ok 1 number(s): "745603313"

Test #2:

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

input:

189 23
641972211 979684612 152744946 783615120 978713222 168650336 857141516 616857395 540616523 113005973 711704024 687584327 301312674 275198920 51589456 80314015 157861752 762127499 92185899 106425187 268377739 537927189 848269317 38081352 129966693 24959563 806662836 815390176 283101118 70529095...

output:

31694519

result:

ok 1 number(s): "31694519"

Test #3:

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

input:

255 30
644732757 539051803 11521854 33672393 724898333 57201047 572157108 376478236 179179709 65318497 294731323 311061838 975241245 480268333 677060569 117849971 342083580 315785155 868382819 200079270 59824554 687361561 349882593 837076985 151361359 231945651 103914661 768822624 51062072 362357598...

output:

198283395

result:

ok 1 number(s): "198283395"

Test #4:

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

input:

479 21
425726002 487303905 37293431 95501469 427290832 900428476 754996703 736133996 43934815 494960949 987312413 635333947 129261282 468062813 784287979 243149526 861636447 278860015 226944388 909945345 495516775 65698638 337671210 862178697 622195526 997259676 284030292 21590370 502934410 81491610...

output:

332416726

result:

ok 1 number(s): "332416726"

Test #5:

score: 5
Accepted
time: 4ms
memory: 3096kb

input:

1001 23
43412769 328418634 172260660 515307451 265107560 252450730 354186179 30915291 670354972 243092380 821532610 887901814 265736742 515075155 107159529 951956978 476374470 778413044 522258384 147058289 564416380 105255288 103268840 275517718 878764216 619359944 558463566 852338938 439555478 4389...

output:

504242000

result:

ok 1 number(s): "504242000"

Test #6:

score: 5
Accepted
time: 5ms
memory: 3236kb

input:

1350 19
51792089 195765831 153834664 682500250 93550073 712089786 331935989 719713753 659375672 135741625 48747604 266234619 376000300 783975255 904432649 784067668 126677895 935652520 635232411 235725811 470906291 948563978 767164798 263773692 695228198 23765872 166571639 142065740 147681465 781765...

output:

21527657

result:

ok 1 number(s): "21527657"

Test #7:

score: 5
Accepted
time: 5ms
memory: 3272kb

input:

1999 14
977048642 436302631 51078567 715481869 937321294 40738049 39271403 736950737 829074708 197223160 776266475 680010881 145195765 861977709 405221131 794540650 842588046 156651101 467611893 323265287 355460693 137744170 725197657 13762224 727577079 996690158 270699851 57333509 403827104 4772745...

output:

119210730

result:

ok 1 number(s): "119210730"

Test #8:

score: 5
Accepted
time: 8ms
memory: 3196kb

input:

2509 28
693774123 174870138 336583497 720228549 699162721 573088543 491966100 633205770 781900217 284291396 889407725 103468453 967441012 45803434 289864228 603632648 121348048 825100009 833780846 415148480 454173856 391623014 357576987 258723971 820174171 245459016 184917741 69032619 139501944 5504...

output:

72861666

result:

ok 1 number(s): "72861666"

Test #9:

score: 5
Accepted
time: 14ms
memory: 3200kb

input:

5005 1
662319723 57173773 757645647 726996603 220670101 92998963 748404758 806177278 335795884 177330628 71230677 65521852 419502916 208926863 544809703 712331583 239364857 104977669 250992721 281232675 15113672 119283135 250544236 79314338 476188283 752159592 549820513 794094563 809015634 331358126...

output:

452373642

result:

ok 1 number(s): "452373642"

Test #10:

score: 5
Accepted
time: 28ms
memory: 3692kb

input:

10010 1
257336921 142539292 70533714 715092679 800022554 485944515 775769629 280877101 184644858 690111212 42846424 781413804 53942898 586475427 699985596 106017201 425551537 451899481 419432071 821680719 236400698 695020040 85130291 127141944 923119943 37707471 299559834 664382675 329282841 5533672...

output:

970412135

result:

ok 1 number(s): "970412135"

Test #11:

score: 5
Accepted
time: 7ms
memory: 3348kb

input:

5005 2
76151250 845540817 363885714 817247341 912391878 252921655 49257382 478924579 54420268 360118161 248430290 629132930 543292959 102242015 433093271 191508609 158347305 534693727 420196482 760310015 182444350 101548267 132308109 796578767 808363396 451057426 489003472 425626521 208186481 424059...

output:

374956031

result:

ok 1 number(s): "374956031"

Test #12:

score: 5
Accepted
time: 28ms
memory: 3652kb

input:

10015 2
310920628 839254433 220339414 515505380 582607535 748583798 875348092 158211247 370452787 716267850 294890331 247800791 29356266 417002500 82708702 223965410 174354176 941880171 785366764 631262 442792169 521920903 654306940 486539480 112881636 259298851 722799854 621079043 279305353 1027954...

output:

918785322

result:

ok 1 number(s): "918785322"

Test #13:

score: 5
Accepted
time: 14ms
memory: 3184kb

input:

5000 23
43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 43855414 4385...

output:

253212914

result:

ok 1 number(s): "253212914"

Test #14:

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

input:

10000 27
203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 203167337 2...

output:

895771012

result:

ok 1 number(s): "895771012"

Test #15:

score: 5
Accepted
time: 44ms
memory: 4496kb

input:

20000 19
74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 74380774 743...

output:

91973126

result:

ok 1 number(s): "91973126"

Test #16:

score: 5
Accepted
time: 52ms
memory: 4656kb

input:

30000 29
292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 292975416 2...

output:

903763257

result:

ok 1 number(s): "903763257"

Test #17:

score: 5
Accepted
time: 30ms
memory: 3680kb

input:

15000 15
432094160 826672471 66459847 496161113 970568934 570119738 319545126 698998332 132346021 4998 737952654 56041950 334984203 497869218 659008297 262495948 885560045 756305639 630873767 96889276 150483356 36151069 768118784 922961816 68580937 625900632 67294750 559220805 236631420 187431960 51...

output:

61109672

result:

ok 1 number(s): "61109672"

Test #18:

score: 5
Accepted
time: 53ms
memory: 4432kb

input:

20000 20
938923428 245728685 329575443 277635437 102904378 146372786 618943897 479294393 131191858 16295561 735444726 43609557 479766604 105216718 290827416 983641941 517126021 947178755 270386148 437534116 180103688 941061724 572552686 757491694 903454347 382785440 358780864 273564899 403004237 243...

output:

885273489

result:

ok 1 number(s): "885273489"

Test #19:

score: 5
Accepted
time: 55ms
memory: 4668kb

input:

28000 24
855300694 386133818 705146305 936773243 286991264 944467539 187184126 892681865 18123277 881026660 179932795 35128595 614747204 36334120 869838453 799505292 569255472 818530203 741767692 572775375 968515998 124926452 135739445 108940767 353549593 106384550 990557244 806049401 454171871 8988...

output:

350968823

result:

ok 1 number(s): "350968823"

Test #20:

score: 5
Accepted
time: 61ms
memory: 4660kb

input:

30000 30
9011967 960220911 49038306 30528077 693907891 571027429 630367765 77071332 555292056 687307517 23923128 375675120 236000142 327115127 76073627 783815174 93399649 337556192 996890954 941149537 776319700 593374944 252695496 167591842 274933366 272700955 827440792 548566078 619330066 66483862 ...

output:

908276353

result:

ok 1 number(s): "908276353"

Extra Test:

score: 0
Extra Test Passed