QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#29714 | #3022. Red Black Tree | smax# | AC ✓ | 360ms | 55392kb | C++23 | 1.5kb | 2022-04-22 05:17:33 | 2022-04-28 15:38:08 |
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
Test #1:
score: 100
Accepted
time: 3ms
memory: 8244kb
input:
4 1 1 1 1 3
output:
5 4
result:
ok 2 number(s): "5 4"
Test #2:
score: 0
Accepted
time: 0ms
memory: 8256kb
input:
4 4 1 1 1 1 2 3 4
output:
1 4 3 1 0
result:
ok 5 number(s): "1 4 3 1 0"
Test #3:
score: 0
Accepted
time: 1ms
memory: 8392kb
input:
14 4 1 2 1 2 3 4 5 5 13 8 10 4 4 8 3 12 13
output:
100 169 90 16 0
result:
ok 5 number(s): "100 169 90 16 0"
Test #4:
score: 0
Accepted
time: 360ms
memory: 16096kb
input:
200000 1000 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 1 1 ...
output:
345649153 649149585 750215443 238335626 905154371 706749446 869282314 438087727 252638735 957513714 689608398 64755386 170256360 939483276 233570496 153367164 191665969 917606605 55960356 787003648 402528667 451337665 584525956 855060048 808069216 27021972 13323943 888056317 609956804 99241702 67878...
result:
ok 1001 numbers
Test #5:
score: 0
Accepted
time: 52ms
memory: 55392kb
input:
200000 1000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
199001 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 1001 numbers
Test #6:
score: 0
Accepted
time: 5ms
memory: 8336kb
input:
1 1 1
output:
1 1
result:
ok 2 number(s): "1 1"
Test #7:
score: 0
Accepted
time: 5ms
memory: 8396kb
input:
1 0
output:
2
result:
ok 1 number(s): "2"
Test #8:
score: 0
Accepted
time: 97ms
memory: 15932kb
input:
200000 1000 1 2 2 4 5 6 2 4 1 10 5 2 10 1 10 7 12 5 11 13 1 19 17 12 17 19 7 28 9 22 29 20 4 22 14 31 5 23 39 17 20 10 18 12 41 6 40 34 20 4 19 38 13 33 28 22 51 14 23 49 55 2 17 33 34 15 67 43 46 39 13 69 5 49 24 17 19 44 46 55 40 61 77 63 74 58 19 76 56 47 6 78 38 79 13 6 95 91 49 1 21 91 9 30 98 ...
output:
502243590 924180733 934014075 675745039 764925294 94270687 779727338 628133180 625755807 161485807 137766993 305290423 660734639 544866627 143311823 278806477 892068285 777084156 987556240 185464621 388787339 286073566 468698199 192649033 43807284 981315245 555764288 470220323 27215378 319357206 119...
result:
ok 1001 numbers
Test #9:
score: 0
Accepted
time: 82ms
memory: 16132kb
input:
200000 1000 1 1 1 1 5 3 1 5 6 2 5 4 4 10 11 6 6 16 17 18 1 17 3 19 23 10 18 26 8 1 28 20 22 3 22 14 27 35 13 16 40 19 8 19 39 11 29 24 39 18 32 15 41 21 26 41 16 48 54 34 14 51 8 6 21 41 58 43 64 36 70 56 54 57 35 58 13 57 21 64 13 82 81 56 35 67 7 41 62 55 30 76 23 74 82 16 53 47 44 6 26 93 48 61 4...
output:
828058348 466840376 225101417 340650136 465833209 736266558 314201594 984578109 295375956 750925620 923504132 504854711 855324202 54711618 30971390 682609648 677038277 390360819 339033303 79726008 351599138 55023097 248720547 92178782 829893418 213667884 753528157 115725301 830521876 102877510 48625...
result:
ok 1001 numbers
Test #10:
score: 0
Accepted
time: 73ms
memory: 15988kb
input:
200000 1000 1 2 1 3 2 4 3 2 5 3 1 12 11 3 2 16 16 16 12 16 18 9 23 14 16 5 7 26 18 22 30 6 14 31 21 36 29 18 23 35 22 25 10 18 15 35 11 23 6 37 51 24 25 9 46 9 17 45 8 47 28 18 38 41 41 28 25 47 33 66 27 13 11 11 44 9 8 20 28 62 71 48 26 59 47 57 73 36 26 42 47 19 33 61 28 18 39 57 6 55 29 97 10 9 1...
output:
763071072 669233177 165026964 34356902 443973481 599340857 59109791 948803421 139479405 388841454 171478218 611814117 777705906 17461846 67540730 586460574 301438782 122948036 830655970 792134423 408554236 215837570 952399262 989458010 781106617 493967148 581673977 410153359 354017388 204294184 4233...
result:
ok 1001 numbers
Test #11:
score: 0
Accepted
time: 96ms
memory: 15976kb
input:
200000 1000 1 2 1 2 3 3 2 8 5 1 7 3 6 8 2 9 14 10 3 16 1 22 19 2 9 14 8 22 3 21 17 2 31 13 8 23 8 8 12 17 25 10 35 14 44 31 39 24 47 28 14 52 36 28 20 13 31 41 32 15 59 6 16 17 61 23 12 28 9 34 53 61 31 17 2 18 4 4 39 14 16 38 28 66 84 83 5 55 53 5 4 47 28 3 29 52 25 50 98 16 31 36 96 75 27 35 88 71...
output:
269263554 648616659 730052056 117759812 716695208 953902237 469748672 361641688 454876957 78373500 11222718 363915696 610038970 588836937 512126589 617207136 420633751 79033743 705100481 247248810 560873817 578909320 364668814 285509028 727591456 276382463 283976926 264565235 358414384 612564070 426...
result:
ok 1001 numbers
Test #12:
score: 0
Accepted
time: 102ms
memory: 16036kb
input:
200000 1000 1 1 3 3 5 6 5 3 2 1 2 12 7 5 5 1 4 9 5 8 7 3 15 3 25 3 11 11 3 10 21 5 5 34 23 3 6 29 16 22 41 35 41 24 27 35 30 11 41 36 32 44 33 41 13 27 36 15 19 32 37 2 49 20 60 2 3 49 15 50 33 26 21 6 54 20 37 72 28 58 64 35 66 74 77 37 33 13 41 87 44 83 58 42 68 88 11 75 12 27 79 54 40 42 37 76 52...
output:
888307543 976227224 82549908 117988782 984125437 128069386 258605985 514349199 23454066 965299957 172605724 834082999 180487798 388878460 968758837 223956138 935667366 327135389 861549788 836433519 158920939 543567811 489385916 712178703 296298247 607950284 781084455 152007590 64527276 697437527 406...
result:
ok 1001 numbers
Test #13:
score: 0
Accepted
time: 90ms
memory: 16152kb
input:
200000 1000 1 1 2 3 2 5 7 1 2 5 5 6 6 3 11 11 6 4 1 17 16 13 8 5 5 10 27 28 5 15 8 6 24 26 9 7 7 26 13 22 30 29 19 18 35 35 24 25 25 14 41 15 11 51 29 31 36 50 9 34 53 46 21 39 52 9 59 23 48 53 43 20 59 67 16 16 48 66 57 7 75 57 11 37 11 47 70 55 16 19 84 85 25 27 54 70 66 79 25 4 69 15 92 27 69 74 ...
output:
682913288 857553568 651560475 979135365 19177616 326077134 576637630 825321226 723727107 620687517 79632074 877631875 709110263 369043092 785214083 275242794 334248144 989593978 722911947 134362232 961949449 14072198 703274370 184903721 825688216 241535965 962426401 434240686 230981498 18988254 8355...
result:
ok 1001 numbers
Test #14:
score: 0
Accepted
time: 77ms
memory: 16140kb
input:
200000 1000 1 2 3 1 1 1 5 1 4 5 3 1 6 5 14 13 7 18 15 9 7 21 20 1 3 10 21 17 17 9 7 5 10 15 27 13 13 10 27 30 21 36 4 17 18 35 25 3 32 4 16 42 42 1 55 6 35 46 36 4 25 46 41 8 30 53 26 38 28 67 19 33 11 37 73 68 53 9 39 42 65 23 51 8 60 4 63 8 29 72 91 65 71 90 28 49 39 84 84 2 2 61 55 52 4 99 41 92 ...
output:
195520648 353423188 723648224 729369534 730995193 366669605 457771897 122795614 845993173 7443917 499663322 835189830 976872562 796825601 313359518 294938475 295723775 967054576 146177070 179209442 293123417 779187017 939207901 667886242 272455660 799208211 670165944 979489686 779961409 112010127 97...
result:
ok 1001 numbers
Test #15:
score: 0
Accepted
time: 104ms
memory: 15960kb
input:
200000 1000 1 2 2 2 3 6 2 6 2 10 11 9 5 13 13 14 11 3 13 17 5 16 13 23 23 24 27 14 2 28 14 20 3 16 2 32 29 28 36 24 38 5 29 40 24 21 28 45 14 29 22 26 43 47 21 27 39 39 41 56 23 35 44 8 17 7 12 9 24 8 1 36 16 21 14 42 42 78 11 50 81 69 79 44 35 1 44 87 68 4 28 91 45 62 72 50 52 6 84 64 75 79 21 42 7...
output:
858848318 275660448 62660470 895658982 10003398 915186510 115157588 687085432 585210260 279625403 921395156 163210415 687084315 39239568 127597937 157842576 789353793 755460052 114892962 539703921 189123029 767990849 831542357 487770768 933111586 74772282 468943829 545087489 495094382 869635940 7342...
result:
ok 1001 numbers
Test #16:
score: 0
Accepted
time: 95ms
memory: 16144kb
input:
200000 1000 1 2 1 2 3 5 3 3 5 2 2 3 2 1 10 15 16 6 4 17 13 14 7 24 9 20 1 25 26 12 17 23 17 6 15 35 18 21 23 19 30 17 13 36 43 11 38 42 18 38 40 48 21 53 21 24 42 18 4 40 35 3 38 59 63 39 3 35 39 17 43 39 25 32 16 26 20 16 9 76 42 4 9 10 13 50 25 84 63 51 43 66 85 81 16 90 28 62 80 15 100 41 18 42 7...
output:
372786313 222872762 738705660 247299097 94956358 992508202 61224447 913709708 724458613 965058118 203817176 655941558 321774208 768330572 967656944 562430893 473148697 383836797 49521353 114411473 792503652 852099965 447883180 494514415 966587444 40609036 83370603 195097025 657912433 679138874 83865...
result:
ok 1001 numbers
Test #17:
score: 0
Accepted
time: 97ms
memory: 16096kb
input:
200000 1000 1 1 2 1 4 2 2 6 8 9 11 7 1 1 14 2 16 4 4 20 7 16 12 20 5 17 20 17 28 5 19 26 13 31 29 2 17 27 39 11 11 34 5 17 20 36 36 7 7 15 38 11 16 29 6 31 52 19 31 27 28 61 20 9 8 46 8 64 23 29 34 15 53 3 8 33 26 25 55 61 25 82 40 84 22 76 74 40 75 76 57 69 10 38 14 20 3 72 26 50 74 89 8 33 88 91 1...
output:
952362984 782220764 433383733 294965814 555085280 225713442 442182325 525235090 188220598 136142389 31186465 463685264 35672802 180412450 546139175 320990886 229103431 809387760 28431837 535010760 973443123 898212729 570732422 521409981 237726559 28638442 433859952 930238775 209845916 505796061 5966...
result:
ok 1001 numbers
Test #18:
score: 0
Accepted
time: 22ms
memory: 12300kb
input:
103090 333 1 2 2 3 2 2 4 7 2 4 6 1 2 2 9 4 5 17 12 8 1 3 22 11 18 4 9 21 13 13 31 13 28 6 11 2 6 13 24 38 34 10 9 26 34 12 1 46 34 14 25 40 15 5 22 34 30 37 8 48 12 49 21 8 60 20 56 23 59 13 29 51 21 73 9 24 44 61 9 72 10 27 73 79 12 36 56 81 59 45 77 90 37 90 1 2 9 94 28 32 20 33 95 74 26 37 9 100 ...
output:
832736680 113077408 431888074 630646538 131928223 139331889 591372021 297793334 513339454 220532778 548380737 327726791 739511268 514342869 757157547 328441665 724253699 964985752 226787126 650140921 109579052 14878768 323566495 783988542 370726456 247095537 798999215 400635586 355339188 361993625 3...
result:
ok 334 numbers
Test #19:
score: 0
Accepted
time: 53ms
memory: 13236kb
input:
129226 125 1 1 1 1 3 5 1 3 4 10 8 8 9 8 5 7 14 4 2 9 5 3 16 22 16 17 20 13 28 14 18 25 13 16 35 1 1 36 26 24 14 2 9 6 29 27 15 41 48 12 11 20 28 52 23 43 5 35 19 21 29 44 43 18 37 34 23 41 7 65 58 47 23 37 40 25 51 32 19 61 67 48 39 10 72 19 1 74 28 11 3 21 61 41 30 79 17 88 63 10 4 86 15 83 100 28 ...
output:
627639977 84473661 536365378 818237582 237586370 76637252 981455905 204048443 66509828 545527749 335921878 178132706 504358813 672427037 424318741 76854396 492514669 753387247 852198830 146997073 467777694 591577096 565628478 43063716 996016357 769290803 175119558 236070558 677436791 353469467 42212...
result:
ok 126 numbers
Test #20:
score: 0
Accepted
time: 50ms
memory: 13460kb
input:
130893 717 1 1 2 4 5 5 2 8 3 1 10 3 10 8 1 3 5 13 9 11 18 13 17 1 18 8 6 12 25 4 13 26 14 13 35 13 22 7 36 14 20 32 24 40 30 40 34 5 17 29 46 6 42 4 41 44 3 36 37 56 43 26 54 46 8 30 21 38 23 41 24 37 16 23 69 31 41 47 56 47 5 42 64 58 60 65 71 5 36 14 20 72 10 89 62 77 88 42 83 49 34 87 24 46 18 44...
output:
797009516 472044164 713852323 337197998 842853638 676852385 502983965 940090217 485065010 900022610 475000824 547821655 489299505 626641208 455515341 159173 967704493 831003794 244702366 142412650 28964092 517516794 635604555 275797893 693721205 883498251 785520736 750851584 628630470 387351849 9421...
result:
ok 718 numbers
Test #21:
score: 0
Accepted
time: 26ms
memory: 11228kb
input:
73874 262 1 2 1 1 2 2 5 8 5 1 6 2 6 10 2 10 17 11 19 18 14 16 22 20 14 7 8 10 11 6 13 10 11 29 26 1 13 19 13 25 26 18 39 38 17 6 36 19 29 34 41 39 26 9 23 2 26 48 57 47 56 40 9 53 24 16 66 44 8 65 2 36 73 3 60 45 63 38 72 6 14 36 14 8 3 23 52 52 54 24 39 80 10 20 82 65 20 85 19 27 68 37 85 53 3 100 ...
output:
403851597 418404759 355536257 658356659 718886803 403002635 417707935 231026292 585755847 107385327 457160178 208056322 480614480 61277403 931053898 674936512 133606791 571328784 430459712 901818724 92784124 386493915 517230180 633632779 745722295 982347621 992367858 256816131 95874299 356884645 696...
result:
ok 263 numbers
Test #22:
score: 0
Accepted
time: 76ms
memory: 15404kb
input:
186063 903 1 1 2 2 5 4 5 2 7 4 7 6 8 6 12 12 11 4 16 5 20 17 18 2 3 13 13 24 7 2 23 2 6 8 26 11 33 34 3 19 21 20 36 38 19 30 23 25 38 28 43 10 45 26 35 14 55 29 38 19 13 20 53 1 29 45 28 56 54 45 33 35 70 53 6 65 42 4 17 59 43 53 12 79 52 65 27 85 71 10 71 57 38 3 74 9 8 92 71 65 100 66 64 74 53 91 ...
output:
725154246 8074631 417686878 758226996 304567728 534374667 798362716 650338581 1701015 525430888 817742454 861219735 344658042 308394567 742624332 217810846 558178658 416264832 555348691 246378085 996685507 665779603 450268708 351778673 28637430 267546477 309689847 767153553 535457544 88723546 707149...
result:
ok 904 numbers
Test #23:
score: 0
Accepted
time: 39ms
memory: 12916kb
input:
117082 202 1 2 2 3 2 3 5 6 2 2 6 1 6 3 10 14 12 15 16 7 2 10 17 14 18 10 23 19 27 23 28 24 2 3 12 5 36 1 25 1 8 27 7 4 13 23 9 45 18 33 17 4 53 19 14 28 49 36 54 10 19 18 18 24 65 8 16 12 20 67 12 40 42 64 58 12 24 37 75 51 71 63 78 81 57 37 86 57 60 67 11 23 34 35 74 51 83 6 8 34 6 49 15 65 45 16 6...
output:
145295133 279663065 531406174 747340740 762023825 978892778 513355054 113865418 118890353 791985808 321305980 713937124 416622654 513386123 735852143 341320083 489299103 550588814 706081273 751247052 99045857 2033194 315581991 715680381 549918056 628979939 47764490 573795804 651664912 930852399 3633...
result:
ok 203 numbers
Test #24:
score: 0
Accepted
time: 50ms
memory: 13448kb
input:
136881 67 1 1 3 4 3 2 1 5 2 2 1 4 7 10 6 8 10 10 10 12 1 22 2 1 9 19 22 7 11 22 24 26 2 4 29 35 14 15 18 30 36 18 39 33 15 27 29 39 15 14 48 28 18 10 10 22 33 17 40 2 28 16 63 11 23 42 42 44 10 27 61 32 15 18 66 11 46 66 2 38 30 55 60 3 51 22 58 43 56 49 30 36 34 33 62 21 1 42 8 81 59 13 51 5 28 38 ...
output:
226099937 167067560 199580580 536711946 472252758 259258662 20639675 241845130 667443392 541889900 814466659 404567461 150112189 551390836 411067170 971970898 721604963 253713268 439630489 938634000 117717748 14601142 297674335 920611854 626992576 571995358 688471482 873385821 616960240 153313754 57...
result:
ok 68 numbers
Test #25:
score: 0
Accepted
time: 72ms
memory: 15000kb
input:
172115 415 1 2 1 1 4 5 7 8 6 6 7 3 13 9 8 6 8 6 7 8 6 3 7 20 6 3 15 13 3 19 9 3 11 25 23 25 32 16 13 40 18 10 2 30 23 7 23 31 3 37 26 18 43 2 8 5 32 27 31 47 10 52 31 5 33 49 45 16 26 12 37 4 11 55 32 49 14 69 24 14 47 6 38 70 27 52 61 36 27 8 83 28 18 48 71 13 83 39 97 26 10 82 101 96 17 32 40 57 7...
output:
169116638 833235865 374235266 909763411 407941602 41612899 432830858 984312731 919154404 414766997 849754649 820338606 877797276 408785263 472958785 56773503 517195746 734274517 946296411 612630370 588131225 489530506 872580854 408234719 619569719 106886232 404821083 387114519 670751997 472244393 46...
result:
ok 416 numbers
Test #26:
score: 0
Accepted
time: 92ms
memory: 15468kb
input:
190761 29 1 2 2 4 5 1 3 6 7 8 10 6 10 12 1 13 14 18 7 9 13 10 13 5 17 1 9 23 27 23 23 9 27 11 7 34 14 6 33 5 25 33 3 30 22 30 2 29 4 47 4 10 31 18 22 31 48 20 36 20 29 20 55 30 7 2 66 12 40 62 18 18 38 50 13 29 57 51 72 29 49 29 8 77 32 15 32 88 18 55 21 77 24 47 25 62 19 26 77 95 19 61 19 9 55 30 1...
output:
259012648 546815437 566280290 382600527 328902024 851717389 532502146 199110529 127108825 273594316 93801615 493432088 472774289 236119933 977267617 695343319 250772922 399820234 898737076 662166122 952008810 605815382 603883182 168170009 677542593 136286566 55374889 377900110 563068713 333252804
result:
ok 30 numbers
Test #27:
score: 0
Accepted
time: 72ms
memory: 15248kb
input:
180094 948 1 2 3 4 5 4 1 4 2 6 11 1 3 7 10 13 5 5 10 9 1 10 12 20 16 9 27 25 22 2 26 24 23 2 6 17 25 34 14 9 22 23 33 20 26 46 18 18 13 41 20 45 38 39 17 54 17 16 29 35 58 33 48 50 25 57 5 30 37 3 28 4 64 65 54 61 61 1 48 4 72 43 81 84 81 70 47 31 79 11 18 17 55 52 42 73 47 11 98 52 17 34 96 79 67 7...
output:
741670204 97376286 24317006 312297084 556110580 312809498 272991593 382570289 353195325 610805983 331557659 485075221 392042167 980371150 393224752 775791507 189965748 233601780 686589929 738395008 486639431 149643772 251708113 459986254 276905811 733605610 284456588 342525369 831309088 316482775 35...
result:
ok 949 numbers
Test #28:
score: 0
Accepted
time: 46ms
memory: 12824kb
input:
119762 11 1 1 2 1 5 5 2 4 7 5 6 3 6 10 6 6 15 4 8 4 18 18 9 13 22 3 16 5 26 8 4 32 3 2 14 36 7 1 6 20 15 6 15 1 41 38 44 31 38 31 31 25 13 16 8 18 47 14 15 57 47 56 34 61 51 46 43 61 65 61 48 38 13 64 55 11 13 78 23 39 24 6 49 7 46 75 83 87 42 89 19 25 25 83 89 87 4 37 43 100 15 42 3 9 9 71 54 47 22...
output:
218273858 38657440 889457727 312980294 835182403 263217491 469677423 575815983 100692465 155708629 111503575 327905380
result:
ok 12 numbers
Test #29:
score: 0
Accepted
time: 41ms
memory: 12708kb
input:
117268 10 1 1 2 4 4 2 2 6 7 6 7 8 4 14 15 16 13 5 1 3 20 11 17 12 13 25 24 15 17 10 6 25 2 6 1 8 31 21 21 26 7 29 30 35 26 26 17 47 42 46 35 47 29 29 48 10 43 51 40 20 61 24 2 62 65 28 49 27 57 4 24 15 46 46 16 7 46 72 51 54 76 33 30 60 33 62 54 60 15 22 57 43 77 29 29 88 91 6 3 90 9 60 89 19 80 1 8...
output:
897270904 53644279 550490168 774091670 465717400 836677436 443812869 90162570 534468124 882201268 960048078
result:
ok 11 numbers
Test #30:
score: 0
Accepted
time: 40ms
memory: 12620kb
input:
111941 779 1 1 1 1 5 2 2 6 6 5 5 9 8 14 13 1 9 1 4 1 6 7 8 22 14 9 20 11 8 7 24 31 24 31 5 26 17 18 27 23 21 11 30 28 28 36 37 19 41 45 16 16 3 47 50 54 41 52 55 3 19 15 54 23 9 27 29 41 48 32 40 14 17 59 12 39 25 15 72 13 47 32 66 56 7 73 28 41 47 19 13 2 78 86 22 88 32 77 48 59 30 66 35 3 32 90 10...
output:
106341285 185891867 664049045 783188294 729741130 867921766 146601027 659231730 584724691 48219077 128571454 380580413 732124798 924647739 847249380 145835414 510398535 503997688 737416093 75032999 37016437 556009966 134756835 412661914 218005795 912696417 95118881 474394719 347525722 237174615 1986...
result:
ok 780 numbers
Test #31:
score: 0
Accepted
time: 22ms
memory: 12128kb
input:
97631 375 1 2 1 2 4 4 6 3 6 8 5 10 7 13 5 7 3 11 11 8 1 16 8 11 25 18 7 12 11 20 19 2 1 6 31 32 24 7 25 13 6 22 30 20 3 33 10 33 40 47 43 39 20 47 12 42 18 44 34 57 43 21 7 27 41 7 24 1 43 21 51 21 61 68 30 74 5 23 1 48 27 54 49 83 14 80 27 88 75 66 15 20 76 52 13 34 12 34 75 72 27 63 102 62 20 32 7...
output:
318562632 518262982 330473720 448100274 310808279 860441639 771562327 392158405 422371640 807959145 171438561 889653883 81616927 256037091 405578509 469909045 234037320 531550744 210239824 81702212 536364434 364710495 440076818 643516050 720962723 927314860 629872437 83938809 586313940 627875747 294...
result:
ok 376 numbers
Test #32:
score: 0
Accepted
time: 26ms
memory: 11220kb
input:
76217 388 1 2 2 3 1 3 4 6 3 8 1 5 3 5 8 16 12 4 9 19 5 10 14 8 19 24 7 27 5 17 1 6 21 25 4 26 15 30 20 19 13 16 31 18 44 11 39 8 35 41 31 48 52 19 22 10 11 8 27 1 39 14 58 5 17 40 25 26 66 36 71 69 15 6 75 73 41 68 27 39 47 61 61 33 53 15 78 73 84 26 47 58 47 51 42 57 32 95 72 27 57 25 11 70 105 74 ...
output:
182865561 824926566 929767756 331976291 991611087 258182518 647803228 552190811 743964013 606472007 213812072 157022054 634114500 773210263 479013140 150361311 843345805 530509009 939338592 543997087 413517359 270170581 833077901 872538616 865345943 152285116 353821016 114658936 876333224 783846748 ...
result:
ok 389 numbers
Test #33:
score: 0
Accepted
time: 57ms
memory: 13360kb
input:
135044 60 1 2 1 2 1 2 2 4 1 1 1 9 1 9 2 12 8 14 10 7 11 22 4 19 14 3 25 9 14 28 11 3 18 4 8 31 6 25 22 32 37 14 12 36 34 46 1 7 27 23 16 6 42 50 1 35 52 43 12 36 3 29 37 58 54 57 53 10 44 20 49 16 42 62 47 4 14 29 32 29 71 68 15 24 52 28 17 31 65 56 73 63 51 21 40 53 89 8 48 89 2 7 50 47 70 18 72 3 ...
output:
897557018 26186423 803047788 28923146 919593482 159687595 427641790 545778003 45314723 3467766 254926005 383739505 161115305 325842405 67806955 295351050 193170610 893873646 379670900 443639 76334317 331044705 546686262 532488343 923705566 12328990 365258931 73203950 589799344 911367668 785290256 59...
result:
ok 61 numbers
Test #34:
score: 0
Accepted
time: 103ms
memory: 15916kb
input:
196914 268 1 2 2 3 1 4 4 8 1 2 7 1 10 11 4 14 11 6 9 16 2 13 12 6 18 19 9 22 15 15 17 32 29 7 17 27 2 24 33 6 25 20 37 26 20 26 9 27 36 50 16 16 17 38 29 56 26 32 29 43 13 57 36 59 42 43 30 40 38 18 63 72 8 59 62 52 53 40 11 21 25 67 16 78 85 79 46 51 25 74 76 19 38 57 16 37 54 39 15 80 65 87 53 62 ...
output:
894338742 812202700 825256654 982826899 218172576 870467305 882165693 431451895 924656480 58169432 56994543 740919172 234642171 816903102 641450594 300437453 136772916 652804403 284460265 85195247 612608291 773334491 432246572 852360284 218430348 222197918 176726832 88927755 72726675 160629431 83611...
result:
ok 269 numbers
Test #35:
score: 0
Accepted
time: 56ms
memory: 13940kb
input:
146929 523 1 1 3 3 2 6 6 6 7 4 7 6 8 8 13 5 6 13 9 20 16 5 2 14 7 12 3 14 27 3 14 15 21 27 23 5 37 1 14 8 15 6 12 8 32 37 39 22 31 41 3 27 46 13 30 39 56 46 25 30 20 25 63 1 4 54 1 40 67 2 38 66 59 62 69 54 5 60 70 2 58 8 71 52 4 86 37 80 84 11 58 4 37 65 71 24 82 68 54 92 38 97 102 71 88 86 43 101 ...
output:
30292667 778367970 98392986 244091748 270488942 410960012 481595150 452181093 361334709 18715789 100261464 859879076 554623764 475000013 281090021 310160185 161065183 674206147 573569074 295572581 70577461 652046089 906325600 67393631 120283269 495447247 13302694 411021070 143207551 378863556 212819...
result:
ok 524 numbers
Test #36:
score: 0
Accepted
time: 34ms
memory: 12684kb
input:
113941 648 1 2 3 1 3 3 4 3 8 5 6 5 9 10 9 11 10 11 17 18 21 9 20 22 12 22 17 4 7 2 25 13 31 27 11 9 37 34 18 18 37 15 40 25 22 29 14 27 42 16 24 16 38 1 54 41 30 54 47 52 25 3 62 49 37 11 4 37 2 46 19 72 41 68 28 25 35 10 31 78 6 66 42 3 77 61 3 39 70 7 50 9 14 32 33 64 33 39 8 8 69 40 91 84 70 74 6...
output:
762516219 539773892 766625304 32195730 30899882 761350454 711867655 388417228 589361076 143748021 369761577 663044778 875105555 858536042 825365346 517660140 759744549 123241591 61597741 788246434 93143617 174783341 12128917 175884706 544973626 875438834 511882209 558876077 316520822 968296977 14896...
result:
ok 649 numbers
Test #37:
score: 0
Accepted
time: 37ms
memory: 12372kb
input:
106265 316 1 1 1 4 1 3 6 6 7 5 2 8 9 14 10 16 13 12 14 19 19 6 1 14 6 2 15 19 26 28 10 32 24 25 35 31 24 23 10 9 30 39 32 31 35 9 28 11 9 29 22 21 41 28 54 14 48 11 8 48 29 53 61 33 53 48 11 33 60 65 59 61 65 48 49 61 1 44 23 60 43 29 32 4 11 75 12 45 46 32 50 86 10 77 19 52 23 68 90 69 31 86 58 83 ...
output:
278043083 814845191 282128338 893735664 77166345 799857226 572715174 573188221 97726380 842186081 225364889 453173792 122546786 382714209 772026360 539703308 473076426 392715471 624623106 528177113 113861880 561925705 208094586 101074981 203394972 38726226 870574995 705248610 600401774 268681575 157...
result:
ok 317 numbers
Test #38:
score: 0
Accepted
time: 80ms
memory: 15676kb
input:
200000 0 1 2 2 1 2 6 4 3 2 5 4 11 3 14 5 6 5 14 17 11 8 11 20 24 24 8 4 19 15 14 28 20 14 31 17 34 32 35 31 30 25 1 2 40 40 8 34 3 1 9 29 44 19 31 22 45 19 3 28 21 1 17 9 24 50 23 60 21 36 55 36 63 56 23 2 76 4 70 4 35 8 39 28 2 72 17 8 60 18 15 37 20 59 59 75 53 81 87 64 3 66 36 39 43 31 96 79 4 15...
output:
214961838
result:
ok 1 number(s): "214961838"
Test #39:
score: 0
Accepted
time: 51ms
memory: 55068kb
input:
200000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...
output:
200001
result:
ok 1 number(s): "200001"
Test #40:
score: 0
Accepted
time: 33ms
memory: 15832kb
input:
200000 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 1 1 1 1...
output:
87947642
result:
ok 1 number(s): "87947642"
Test #41:
score: 0
Accepted
time: 32ms
memory: 15996kb
input:
200000 1000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
345649153 649149585 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 1001 numbers
Test #42:
score: 0
Accepted
time: 58ms
memory: 54932kb
input:
200000 1000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...
output:
397999 198999000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 1001 numbers
Test #43:
score: 0
Accepted
time: 96ms
memory: 16096kb
input:
200000 1000 27308 67822 21504 136849 87784 166852 135859 80928 63998 65950 191145 73832 53923 177123 6075 56630 105785 134718 181962 58784 114242 31964 182429 59210 140304 75276 24714 112195 2836 195149 127222 7974 44155 70142 114956 4269 156903 15393 94871 179128 103554 21082 61973 31888 121781 154...
output:
591219949 580244806 281035501 473066141 282916075 718695141 685638765 625504676 182658821 349892192 98049441 245893951 373362129 520010721 278317208 520354237 56572816 146580942 806519150 548963110 619140939 418793589 405962126 866858014 691154619 765874656 632573653 473820467 359389976 395891571 60...
result:
ok 1001 numbers
Test #44:
score: 0
Accepted
time: 97ms
memory: 15972kb
input:
200000 1000 148193 66669 105767 140277 145843 173061 92250 69980 120634 37221 146600 40882 66849 143692 4365 75899 6413 188709 39062 8023 91176 154897 28708 144211 169927 158519 20761 94760 124101 39648 199557 197425 147863 52318 135200 117922 56091 23907 594 195874 175371 102578 199759 58398 112602...
output:
648421276 123088411 771839025 818441714 883635974 479241410 513486778 639175913 73997582 714220544 981272229 537854969 257947314 988919000 814092214 362531525 27930043 906314328 386963815 465499023 140007495 310611977 866401608 88746742 363892353 763055468 727110076 49304261 99386073 409280442 82136...
result:
ok 1001 numbers
Test #45:
score: 0
Accepted
time: 83ms
memory: 15988kb
input:
200000 1000 40098 189600 36595 135694 40826 52002 16113 139093 1870 15842 115337 150287 143763 28284 152344 159386 58876 57269 39606 61286 177414 167340 71161 78299 189959 19106 1010 23136 50173 182597 191485 197833 68017 51145 176539 29349 4288 68543 137193 146768 83729 191339 179333 84918 84383 11...
output:
606130519 511310159 197627961 490252510 239378306 623880965 819161817 386874621 165645660 681532960 221759425 236836784 686242076 648964289 581278502 798971147 813546331 45793537 536894639 326428457 843580745 555703492 857838262 426977201 99647935 730362592 786057672 896379350 434143282 323143849 49...
result:
ok 1001 numbers
Test #46:
score: 0
Accepted
time: 94ms
memory: 16024kb
input:
200000 1000 16833 185545 142187 180793 61613 96207 160647 124751 124910 34204 195355 181054 90609 154000 125510 169760 97536 146417 123836 28702 46333 175767 109286 130369 55804 96716 109105 185902 90658 82536 194476 154623 83571 115799 117461 121904 81765 27540 127579 134891 2569 12980 2363 84492 1...
output:
632300398 741031194 235545840 182147785 449132584 310401715 964102691 83436342 971966508 505026036 12577379 571617097 193881264 801169510 203769904 962867568 11338342 353143563 835818609 646932883 883930177 131195647 940324096 920358949 238768665 529387867 613369780 771321024 612371492 775167911 265...
result:
ok 1001 numbers
Test #47:
score: 0
Accepted
time: 103ms
memory: 16036kb
input:
200000 1000 66454 171115 48624 30275 187932 103422 147160 85375 45823 72310 177929 139525 16734 192306 34813 32993 70046 145434 158676 4940 91758 117989 32158 166740 75498 15360 24546 161392 48449 114087 32256 160368 156508 23802 153749 4304 87962 189115 195034 156713 183298 42755 85418 130333 23891...
output:
442378906 224641945 958353492 796215556 985545405 89695466 519066742 297303556 131888593 841520559 327976310 15190004 225672210 63007789 887653843 517581180 631803645 150964963 162409657 511126957 742920552 637291710 821425567 862509725 742039332 447638212 947169250 457446276 577972224 73220788 4966...
result:
ok 1001 numbers
Test #48:
score: 0
Accepted
time: 97ms
memory: 16144kb
input:
200000 1000 122107 75215 196970 4468 125517 39489 166279 79862 147533 126946 153401 52029 154329 64115 121308 3503 133592 80500 109037 101042 37577 6177 39664 103549 176510 81937 160890 72657 53009 161571 114723 40742 133242 111341 14565 127283 21556 58822 33063 109163 79391 117703 56046 36196 15434...
output:
323719317 875718415 36687163 250990700 601661814 319997283 194758447 348806745 691181317 217690001 757001310 43701398 105323482 32855920 851592154 171461409 67430906 882188222 896261276 344714055 468661404 152921451 818631519 459991492 656845450 95884935 50332996 891562118 655499196 436610090 619991...
result:
ok 1001 numbers
Test #49:
score: 0
Accepted
time: 106ms
memory: 16020kb
input:
200000 1000 188531 48114 173940 144825 119431 2485 125820 114977 75097 31340 24549 26727 4027 125908 73775 193590 153700 154217 96101 23224 70078 86258 159005 64850 126551 184077 101316 27678 85894 157779 38147 13972 85383 121559 182076 128180 130786 66982 141590 109958 191886 174781 141016 113806 6...
output:
148575239 462554941 831951682 633579091 8254861 817074499 337702671 508337924 103385000 399856636 561816719 62086312 811390321 117577836 766895166 567485065 80075176 200802418 776781341 724819196 89899325 555032495 557231392 255987612 72301142 470006298 960697441 504212709 711270836 639537663 577797...
result:
ok 1001 numbers
Test #50:
score: 0
Accepted
time: 105ms
memory: 16176kb
input:
200000 1000 117889 143905 10102 79941 51926 170011 10168 159293 39010 10208 156180 8311 77194 121403 15083 105116 44409 56705 134422 85013 120117 95323 86921 50232 42937 190402 128619 167377 73639 86261 54440 189419 96700 58634 68534 161978 7807 7832 106714 46171 178939 90808 100892 99610 117319 565...
output:
439069613 976098754 403859000 348363304 92655714 744922720 857863383 447153636 234365946 685962570 96028274 595664522 574837102 515104420 623356416 10642660 468501191 274881753 53329202 702319740 930224856 433904586 308324219 394193885 773726347 566203144 522592012 452114266 520173284 775804222 9469...
result:
ok 1001 numbers
Test #51:
score: 0
Accepted
time: 102ms
memory: 16140kb
input:
200000 1000 197816 175147 106326 188186 66058 109904 175539 160786 4754 82445 105780 113485 157310 77247 28968 6020 121342 18017 14592 16141 18084 13207 48602 52429 71653 91199 19510 149112 83710 137522 173230 79257 89369 160245 178079 123756 165461 162975 71448 46032 138476 134002 112775 113821 186...
output:
970514214 952197106 793077819 787758947 966726818 778542812 204040726 265494627 360146127 239967622 794386647 456987468 214557484 495410872 729488308 690267814 775145505 91810337 207768047 365537881 762670324 776121538 963939669 520913799 874204274 30390370 900957233 297826277 433496392 491930821 31...
result:
ok 1001 numbers
Test #52:
score: 0
Accepted
time: 126ms
memory: 16144kb
input:
200000 1000 12428 185466 155241 76966 45267 149834 146833 17846 108255 134713 147808 170134 152119 35475 122870 125460 28203 135690 91009 107197 42669 35244 124736 46679 145635 169425 182287 30928 3037 16479 168819 23914 88085 145061 97169 97847 179411 160984 199066 180248 4461 197004 108278 189217 ...
output:
88587412 604592383 782603038 860343117 818488030 699651640 345224937 629931873 599701671 651321050 753191549 162023525 549734288 709503609 498240724 59354368 950855004 866467027 932564785 290999959 861026178 463587997 760660536 86715636 62276850 764841689 865973042 760864049 253470763 484431824 2536...
result:
ok 1001 numbers
Test #53:
score: 0
Accepted
time: 106ms
memory: 16000kb
input:
200000 1000 79724 99949 133396 52486 74211 110059 39817 88293 106824 79914 92072 118323 198035 158265 93872 179709 46981 79888 50432 55871 28438 197516 161448 761 10430 68831 129819 56732 22451 77507 100230 91255 111252 138279 54354 190549 184897 82566 55862 33069 140659 4500 158336 186025 21042 159...
output:
290229919 749618451 9671057 958161835 706138660 441043463 579447936 576845972 83498053 776149612 884937738 668737613 991178135 860285027 45769531 278597088 919639660 474565363 37645431 685421297 232886474 536235852 320372788 575278187 61383727 957259371 714751028 909101150 62963250 255191150 2276840...
result:
ok 1001 numbers