QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#487181 | #4929. Longest Unfriendly Subsequence | GuanYunchang | 11 | 92ms | 17444kb | C++23 | 1.1kb | 2024-07-22 17:29:49 | 2024-07-22 17:29:50 |
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
Subtask #1:
score: 3
Accepted
Test #1:
score: 3
Accepted
time: 51ms
memory: 5004kb
input:
1 200000 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 259021863 2...
output:
1
result:
ok single line: '1'
Test #2:
score: 3
Accepted
time: 92ms
memory: 17444kb
input:
1 200000 1521 1638 11981 18811 20091 22081 30494 31501 42139 42282 48197 55520 57632 69584 81745 85026 90303 91482 92176 98507 108061 108743 111257 121226 127217 127449 137116 163474 169192 175764 181243 185402 191244 198775 202845 212156 217723 220058 223478 224205 227614 228398 230425 232567 24480...
output:
198858
result:
ok single line: '198858'
Test #3:
score: 3
Accepted
time: 47ms
memory: 5016kb
input:
1 200000 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 222796328 2...
output:
3
result:
ok single line: '3'
Test #4:
score: 3
Accepted
time: 52ms
memory: 5040kb
input:
1 200000 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 760101 7601...
output:
575
result:
ok single line: '575'
Test #5:
score: 3
Accepted
time: 87ms
memory: 13540kb
input:
1 200000 22617 30507 37038 41687 43064 43064 49267 55626 59203 73739 82817 99920 109370 115622 115622 121135 121135 129717 129717 133074 133133 133133 142580 142580 142580 154213 154816 154816 161169 180270 186425 208068 213631 237721 252184 261468 266076 271129 271129 272992 278768 279170 299395 31...
output:
136202
result:
ok single line: '136202'
Test #6:
score: 3
Accepted
time: 52ms
memory: 4188kb
input:
5 24325 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 558278563 55...
output:
3 143 605 169 1
result:
ok 5 lines
Test #7:
score: 3
Accepted
time: 61ms
memory: 8440kb
input:
5 86417 13696 27186 31482 38856 51078 60129 60129 63547 67673 87520 97892 99326 118061 118645 146408 154082 166604 178823 201607 241484 250276 265112 265112 265112 266533 267321 312070 312070 314782 320641 321224 325817 328085 351487 365110 374487 382485 385081 393245 400245 419177 421858 423028 426...
output:
68280 264 2 26943 5
result:
ok 5 lines
Test #8:
score: 3
Accepted
time: 50ms
memory: 4360kb
input:
5 2977 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112394126 112...
output:
5 2 186 403 3
result:
ok 5 lines
Test #9:
score: 3
Accepted
time: 55ms
memory: 5500kb
input:
20 11481 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 2249526 224...
output:
84 1 6616 5 157 3 4 173 2652 64 73 2669 97 22009 20 36 4231 33 1 8816
result:
ok 20 lines
Test #10:
score: 3
Accepted
time: 51ms
memory: 4036kb
input:
100 1273 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 276188388 2...
output:
4 3 2906 3 2038 1262 2671 102 1 3 771 34 58 30 2 300 21 106 1 1 72 1 22 1123 5 547 5182 2 87 85 4 1370 158 74 2 1098 61 1027 11 82 1 377 2 715 5 52 67 3 472 158 1 58 6836 75 712 2 59 2 4 52 16 5 2 78 273 4281 36 1178 60 16 2 22 421 5 11 11 33 5 74 3 2 3 3 1770 5 2172 5 67 5 4 480 514 5 57 461 39 5 3...
result:
ok 100 lines
Test #11:
score: 3
Accepted
time: 51ms
memory: 3700kb
input:
1000 309 4317803 4317803 4317803 4317803 4317803 4317803 4317803 4317803 4317803 4317803 4317803 4317803 4317803 4317803 49219507 49219507 49219507 49219507 49219507 49219507 49219507 49219507 49219507 49219507 49219507 49219507 49219507 49219507 134343195 241438227 241438227 241438227 241438227 241...
output:
19 4 52 20 182 1 4 91 4 84 2 121 18 14 1 22 9 10 2 7 150 9 76 9 5 5 10 17 46 2 25 17 4 40 397 13 157 12 5 5 78 6 99 3 287 20 86 26 16 8 24 329 28 11 4 9 4 4 10 182 35 20 117 41 1 5 54 1 713 111 8 5 4 2 18 3 38 72 8 1 17 3 2 9 14 25 5 3 2 15 140 6 7 173 81 5 30 2 5 2 8 52 3 16 58 2 146 8 31 4 458 2 1...
result:
ok 1000 lines
Test #12:
score: 3
Accepted
time: 52ms
memory: 3676kb
input:
10000 13 116636133 116636133 206284888 206284888 565476781 812400365 812400365 961195858 961195858 961195858 961195858 961195858 961195858 2 8191780 8191780 43 95905577 95905577 95905577 95905577 95905577 95905577 487815159 487815159 602877460 602877460 602877460 602877460 602877460 602877460 602877...
output:
5 1 8 2 3 10 13 1 2 2 4 2 2 1 5 1 21 3 1 11 13 1 9 1 2 1 2 3 1 8 6 3 26 2 2 3 26 1 15 2 8 1 1 11 9 2 6 2 2 2 10 6 3 8 5 3 2 6 6 16 5 5 2 11 6 1 3 1 1 2 32 5 9 1 1 11 8 3 1 1 3 3 1 3 26 1 43 1 10 1 8 2 1 1 3 21 30 5 19 1 5 16 2 18 1 1 1 13 3 3 4 3 23 3 3 2 1 10 1 13 2 1 14 4 1 3 7 1 1 1 1 2 14 3 5 5 ...
result:
ok 10000 lines
Test #13:
score: 3
Accepted
time: 68ms
memory: 3524kb
input:
30000 18 77687359 77687359 77687359 77687359 77687359 77687359 77687359 77687359 264737334 264737334 264737334 264737334 423170703 423170703 423170703 423170703 423170703 423170703 3 426699491 894864848 895502688 23 329836738 329836738 329836738 329836738 329836738 329836738 329836738 329836738 3298...
output:
3 3 4 2 1 4 3 1 5 1 2 2 2 5 2 3 2 1 10 1 2 3 1 4 1 2 1 4 5 2 4 3 3 1 1 1 4 5 1 2 1 6 4 1 10 10 24 1 15 1 1 1 2 1 8 7 1 1 2 3 4 4 4 2 4 3 5 3 5 2 5 15 2 1 1 2 1 1 1 3 5 4 11 1 2 2 7 4 2 1 9 1 1 1 3 1 3 2 1 5 1 2 10 3 4 1 5 8 1 3 7 4 1 1 1 1 2 4 5 3 3 1 1 1 2 2 3 3 5 5 2 4 11 2 2 1 1 5 2 1 1 2 5 5 4 4...
result:
ok 30000 lines
Test #14:
score: 3
Accepted
time: 1ms
memory: 3588kb
input:
1 10000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
1
result:
ok single line: '1'
Subtask #2:
score: 0
Time Limit Exceeded
Test #15:
score: 6
Accepted
time: 0ms
memory: 5480kb
input:
3 5 1 2 1 2 1 7 1 2 3 2 1 2 3 8 1 10 10 1 1 100 100 1
output:
2 6 4
result:
ok 3 lines
Test #16:
score: 0
Time Limit Exceeded
input:
28653 6 372076545 832760265 372076545 644300403 644300403 644300403 8 540046638 375129642 863244619 863244619 375129642 540046638 540046638 540046638 6 142783193 508154499 871683432 71368434 871683432 871683432 8 760894385 984189193 760894385 323542350 984189193 760894385 323542350 323542350 6 84093...
output:
3 4 4 6 4 4 3 4 5 4 5 4 2 4 5 5 4 3 5 5 4 4 4 5 6 4 2 3 4 3 2 3 4 3 8 4 5 5 4 6 4 5 5 5 4 6 6 4 3 3 7 5 3 7 3 4 6 6 5 4 3 3 6 3 6 4 3 4 4 7 3 4 5 4 5 1 3 6 4 4 4 4 2 3 4 2 5 3 4 2 2 3 4 3 6 3 5 3 4 5 3 3 4 4 5 3 5 4 4 6 5 6 6 4 5 4 5 5 3 4 3 4 4 2 4 4 6 5 4 3 3 2 3 5 4 5 3 3 4 7 4 5 5 2 5 2 4 4 5 4 ...
result:
Subtask #3:
score: 8
Accepted
Test #19:
score: 8
Accepted
time: 16ms
memory: 5512kb
input:
1 500 537076440 691668159 871942500 537076440 537076440 691668159 871942500 871942500 537076440 691668159 871942500 537076440 691668159 871942500 537076440 691668159 871942500 537076440 691668159 871942500 537076440 691668159 871942500 871942500 537076440 691668159 871942500 537076440 537076440 6916...
output:
361
result:
ok single line: '361'
Test #20:
score: 8
Accepted
time: 20ms
memory: 5504kb
input:
1 500 584142119 101442702 335815880 584142119 101442702 335815880 584142119 101442702 335815880 584142119 101442702 335815880 584142119 101442702 101442702 335815880 335815880 584142119 584142119 101442702 101442702 335815880 584142119 101442702 335815880 584142119 101442702 335815880 584142119 1014...
output:
394
result:
ok single line: '394'
Test #21:
score: 8
Accepted
time: 18ms
memory: 5704kb
input:
1 500 296341737 806184542 989331127 989331127 296341737 806184542 455929030 296341737 806184542 806184542 806184542 989331127 296341737 806184542 989331127 296341737 806184542 989331127 296341737 806184542 989331127 296341737 806184542 806184542 989331127 296341737 296341737 296341737 806184542 9893...
output:
339
result:
ok single line: '339'
Test #22:
score: 8
Accepted
time: 19ms
memory: 5448kb
input:
1 500 361183277 863317163 788070566 361183277 361183277 863317163 788070566 361183277 632739493 788070566 788070566 361183277 863317163 788070566 361183277 863317163 788070566 361183277 863317163 788070566 361183277 863317163 788070566 361183277 863317163 788070566 361183277 863317163 788070566 3611...
output:
353
result:
ok single line: '353'
Test #23:
score: 8
Accepted
time: 18ms
memory: 5520kb
input:
1 500 360892412 146618517 575516781 360892412 146618517 575516781 360892412 146618517 575516781 360892412 146618517 575516781 360892412 146618517 575516781 360892412 146618517 575516781 360892412 146618517 575516781 360892412 146618517 575516781 360892412 146618517 575516781 360892412 146618517 5755...
output:
423
result:
ok single line: '423'
Test #24:
score: 8
Accepted
time: 12ms
memory: 5452kb
input:
3 68 975239020 470667175 323925950 975239020 470667175 323925950 975239020 470667175 323925950 975239020 470667175 323925950 975239020 470667175 323925950 975239020 470667175 323925950 323925950 323925950 975239020 470667175 323925950 975239020 470667175 323925950 323925950 975239020 470667175 32392...
output:
48 386 3
result:
ok 3 lines
Test #25:
score: 8
Accepted
time: 7ms
memory: 5448kb
input:
3 118 150373656 793064947 635264518 635264518 709296672 793064947 635264518 709296672 709296672 709296672 793064947 635264518 709296672 793064947 635264518 709296672 793064947 793064947 635264518 709296672 793064947 793064947 635264518 709296672 793064947 635264518 709296672 793064947 635264518 7092...
output:
97 230 33
result:
ok 3 lines
Test #26:
score: 8
Accepted
time: 4ms
memory: 5496kb
input:
3 113 89789132 548906728 545868627 545868627 89789132 548906728 545868627 89789132 548906728 545868627 89789132 548906728 545868627 89789132 548906728 545868627 89789132 548906728 545868627 89789132 548906728 545868627 89789132 548906728 545868627 89789132 548906728 545868627 89789132 548906728 5458...
output:
101 127 137
result:
ok 3 lines
Test #27:
score: 8
Accepted
time: 6ms
memory: 5440kb
input:
3 108 794907019 802850140 730657927 730657927 794907019 794907019 802850140 730657927 794907019 802850140 730657927 794907019 794907019 802850140 802850140 730657927 794907019 802850140 730657927 730657927 794907019 802850140 802850140 802850140 802850140 730657927 794907019 802850140 730657927 7306...
output:
78 71 236
result:
ok 3 lines
Test #28:
score: 8
Accepted
time: 7ms
memory: 5484kb
input:
3 55 382906854 86510837 1801762 382906854 86510837 1801762 382906854 382906854 578362690 1801762 382906854 86510837 1801762 382906854 86510837 1801762 1801762 382906854 86510837 1801762 382906854 86510837 1801762 382906854 86510837 1801762 382906854 86510837 382906854 1801762 86510837 382906854 1801...
output:
43 81 289
result:
ok 3 lines
Test #29:
score: 8
Accepted
time: 3ms
memory: 5628kb
input:
20 38 68789463 462582466 279061055 68789463 536943437 279061055 68789463 536943437 279061055 68789463 536943437 279061055 68789463 536943437 279061055 68789463 536943437 279061055 68789463 536943437 279061055 68789463 536943437 279061055 68789463 536943437 279061055 536943437 68789463 279061055 5369...
output:
32 18 20 76 24 7 5 9 5 42 34 25 14 4 10 29 8 16 31 9
result:
ok 20 lines
Test #30:
score: 8
Accepted
time: 7ms
memory: 5704kb
input:
100 8 594931073 674884200 594931073 960542002 674884200 594931073 404937349 674884200 3 28762160 795234252 28762160 6 693736695 693736695 515596726 693736695 568079150 515596726 2 508417829 600345257 4 637967683 731409954 197653780 548314174 9 493559887 493559887 995798571 234632692 493559887 995798...
output:
7 2 4 2 4 7 3 3 3 1 8 1 5 3 1 1 2 5 3 10 3 1 3 6 4 5 5 1 6 2 2 6 9 9 2 7 3 5 8 1 7 11 3 4 3 12 1 1 5 2 4 8 1 1 9 4 1 4 3 14 3 2 1 2 2 3 2 5 4 6 2 9 3 2 5 1 2 9 1 10 3 19 7 2 2 5 1 15 1 1 6 11 1 1 2 1 2 5 8 4
result:
ok 100 lines
Test #31:
score: 8
Accepted
time: 21ms
memory: 5524kb
input:
1 500 3 2 2 3 1 1 1 2 3 2 2 1 3 1 3 3 1 1 3 1 1 2 3 1 1 1 2 2 1 2 1 3 3 2 3 3 2 2 1 2 3 1 2 2 3 3 1 3 3 3 3 3 2 1 2 3 1 3 1 2 1 3 3 1 1 1 1 3 3 1 1 3 3 1 1 1 3 3 2 3 1 1 1 1 1 1 2 1 1 3 1 3 2 1 3 3 1 3 1 1 1 2 3 3 2 1 3 3 3 2 1 3 3 3 1 3 3 1 3 2 2 2 1 1 1 1 3 3 1 2 1 2 2 2 3 3 1 1 1 3 2 3 1 3 3 2 1 ...
output:
162
result:
ok single line: '162'
Test #32:
score: 8
Accepted
time: 18ms
memory: 5468kb
input:
1 500 1 1 1 2 2 1 2 3 2 1 1 3 1 1 1 3 2 3 2 2 1 2 2 3 3 1 3 3 3 2 3 2 2 3 2 3 1 3 1 1 3 2 1 3 3 1 3 2 3 1 3 1 3 2 2 1 1 3 1 2 1 1 1 3 1 2 2 2 2 3 2 3 3 2 1 1 3 2 3 3 3 2 2 2 2 1 1 3 1 1 3 1 3 1 2 1 2 3 2 2 3 1 3 1 1 1 3 3 1 3 3 2 2 1 3 3 1 1 3 1 2 3 3 2 1 2 1 3 1 1 1 2 1 3 1 1 2 1 2 3 3 2 1 3 2 3 2 ...
output:
170
result:
ok single line: '170'
Test #33:
score: 8
Accepted
time: 18ms
memory: 5452kb
input:
1 500 1 3 1 3 1 1 3 1 2 2 1 1 1 1 1 3 3 2 2 3 2 2 1 2 3 1 2 1 3 1 1 1 1 1 3 3 1 3 3 1 1 3 3 3 1 3 1 3 1 2 1 1 2 2 2 1 3 3 2 2 3 3 1 2 3 1 2 3 1 1 1 2 2 1 1 1 2 3 1 3 2 1 1 1 3 3 1 1 1 1 3 2 2 3 3 1 2 2 2 1 3 3 3 1 2 2 1 3 3 2 2 2 1 3 1 2 3 1 2 1 3 3 2 2 2 3 2 1 1 2 1 1 1 1 3 1 3 1 2 1 2 2 2 3 2 1 3 ...
output:
171
result:
ok single line: '171'
Test #34:
score: 8
Accepted
time: 0ms
memory: 5448kb
input:
3 226 2 2 2 3 3 3 3 1 2 1 2 1 3 3 3 2 2 2 1 3 3 3 2 3 3 3 2 2 2 3 3 2 1 2 3 1 3 2 2 3 3 1 2 2 3 1 2 3 1 3 2 1 3 1 2 3 3 3 3 1 3 2 1 3 3 1 1 2 1 3 1 3 1 3 2 2 2 2 1 2 2 2 2 1 2 1 1 3 1 2 2 2 1 2 3 3 1 1 3 3 1 1 2 1 3 3 3 2 3 3 1 3 2 1 2 1 2 3 1 3 3 2 2 2 3 3 3 2 2 3 2 2 1 1 2 2 3 2 2 2 2 3 2 1 2 2 3 ...
output:
81 106 57
result:
ok 3 lines
Test #35:
score: 8
Accepted
time: 0ms
memory: 5624kb
input:
20 23 3 2 3 2 2 1 3 3 1 2 3 1 2 2 2 1 2 1 3 1 1 2 1 19 2 2 3 3 1 2 2 2 3 1 2 3 3 3 1 1 1 2 1 12 2 3 3 2 3 1 3 1 3 2 2 1 39 1 2 1 1 2 2 2 1 2 2 2 1 1 1 3 2 3 1 1 2 1 3 2 2 3 2 2 2 3 1 2 1 3 1 2 1 1 2 1 21 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 24 1 2 3 1 1 1 2 3 1 2 3 2 1 3 3 2 1 3 2 1 3 2 1 3 15 ...
output:
10 10 6 11 1 17 6 35 4 2 5 4 3 19 79 22 2 2 5 22
result:
ok 20 lines
Test #36:
score: 8
Accepted
time: 6ms
memory: 5700kb
input:
100 2 1 2 2 1 3 4 2 3 1 2 3 1 1 2 1 3 3 1 2 2 1 3 6 1 2 1 1 3 2 2 3 3 3 3 3 1 5 3 1 3 3 1 1 1 4 3 1 3 3 15 2 3 2 3 2 3 1 3 1 2 2 1 1 1 2 2 3 2 4 2 3 3 3 6 2 2 2 2 1 3 15 1 3 2 1 3 3 1 1 3 3 3 1 2 1 2 4 1 2 3 3 3 2 1 1 9 3 3 3 1 1 2 3 2 1 4 1 1 1 3 11 2 2 3 1 3 2 2 2 2 2 2 5 1 2 1 3 2 4 3 1 3 3 9 3 2...
output:
2 2 4 2 1 2 1 4 1 2 2 1 2 6 2 2 3 7 3 2 5 2 4 4 2 5 4 2 6 5 2 5 2 2 5 5 3 7 6 2 3 2 2 2 1 2 5 2 3 5 2 3 5 7 4 2 2 1 1 15 3 2 3 1 3 1 5 3 2 4 1 2 6 2 5 1 2 4 1 1 1 2 7 2 3 6 1 3 2 4 5 1 2 3 5 1 3 4 2 3
result:
ok 100 lines
Test #37:
score: 8
Accepted
time: 14ms
memory: 5444kb
input:
1 500 455886399 626955833 421163133 892575355 805049331 975659748 741071093 875911704 113500223 113500223 661192282 597935861 597935861 262970158 495955172 153851712 234849549 887929988 887929988 887929988 887929988 542128740 727090845 727090845 685055701 224058754 37318791 519705695 83375459 722649...
output:
469
result:
ok single line: '469'
Test #38:
score: 8
Accepted
time: 17ms
memory: 5508kb
input:
1 500 29435243 925769090 446792611 21667712 789719595 410464435 789287785 96845859 690771702 190228530 64528308 200770249 815748901 521046227 312297467 316401902 401409002 745745759 124319941 371122503 512242376 34813204 305249842 744963641 43370519 348889633 348889633 47719027 937000032 168595842 1...
output:
477
result:
ok single line: '477'
Test #39:
score: 8
Accepted
time: 18ms
memory: 5452kb
input:
1 500 602984088 664773836 177454793 1016966 334198372 285460610 132471773 172555823 678108588 569521673 975831156 698378851 695351143 743016550 389745384 304682329 700880753 700880753 914143778 268616886 223218955 837422858 549920713 672348418 767277498 618713431 61983854 68335376 960714345 60895712...
output:
477
result:
ok single line: '477'
Test #40:
score: 8
Accepted
time: 19ms
memory: 5508kb
input:
1 500 271946887 695308006 271946887 271946887 294535481 695308006 294535481 271946887 271946887 294535481 271946887 695308006 294535481 294535481 271946887 294535481 271946887 695308006 271946887 695308006 294535481 695308006 294535481 271946887 294535481 695308006 294535481 695308006 271946887 6953...
output:
241
result:
ok single line: '241'
Test #41:
score: 8
Accepted
time: 22ms
memory: 5504kb
input:
1 500 720937483 17827429 720937483 971419328 720937483 17827429 971419328 720937483 17827429 720937483 971419328 17827429 720937483 971419328 17827429 971419328 17827429 971419328 720937483 971419328 17827429 720937483 17827429 720937483 971419328 720937483 971419328 720937483 17827429 971419328 178...
output:
232
result:
ok single line: '232'
Test #42:
score: 8
Accepted
time: 20ms
memory: 5452kb
input:
1 500 45706846 591376273 45706846 591376273 45706846 591376273 186758449 45706846 591376273 45706846 591376273 186758449 591376273 186758449 591376273 45706846 186758449 591376273 45706846 186758449 591376273 591376273 186758449 591376273 45706846 591376273 186758449 591376273 186758449 45706846 591...
output:
253
result:
ok single line: '253'
Test #43:
score: 8
Accepted
time: 10ms
memory: 5444kb
input:
1 500 282927666 282927666 484147677 484147677 282927666 484147677 282927666 484147677 282927666 484147677 484147677 282927666 484147677 282927666 484147677 282927666 484147677 282927666 484147677 282927666 484147677 282927666 484147677 484147677 282927666 282927666 484147677 282927666 484147677 2829...
output:
49
result:
ok single line: '49'
Test #44:
score: 8
Accepted
time: 15ms
memory: 5704kb
input:
1 500 151443807 223152423 151443807 223152423 151443807 223152423 151443807 223152423 223152423 151443807 223152423 151443807 223152423 151443807 223152423 151443807 223152423 151443807 223152423 151443807 223152423 151443807 223152423 151443807 223152423 151443807 223152423 151443807 223152423 1514...
output:
14
result:
ok single line: '14'
Test #45:
score: 8
Accepted
time: 17ms
memory: 5456kb
input:
1 500 579768459 816932976 579768459 816932976 579768459 816932976 579768459 579768459 816932976 579768459 327660977 579768459 327660977 327660977 579768459 327660977 579768459 327660977 579768459 327660977 579768459 327660977 579768459 327660977 579768459 327660977 579768459 327660977 327660977 5797...
output:
28
result:
ok single line: '28'
Test #46:
score: 8
Accepted
time: 19ms
memory: 5444kb
input:
1 500 414505640 887314173 414505640 205268028 414505640 887314173 414505640 827649339 887314173 827649339 348309219 827649339 887314173 827649339 348309219 827649339 887314173 827649339 348309219 827649339 887314173 827649339 144164301 887314173 144164301 155363834 144164301 887314173 144164301 7702...
output:
346
result:
ok single line: '346'
Test #47:
score: 8
Accepted
time: 18ms
memory: 5668kb
input:
1 500 671728328 441054685 671728328 645366031 671728328 441054685 671728328 803083316 441054685 803083316 490509277 803083316 441054685 803083316 252342793 441054685 252342793 304397499 252342793 441054685 252342793 211149108 441054685 211149108 83472025 211149108 441054685 211149108 969490582 44105...
output:
331
result:
ok single line: '331'
Test #48:
score: 8
Accepted
time: 18ms
memory: 5484kb
input:
1 500 10771846 877966861 10771846 737001418 10771846 877966861 10771846 737001418 10771846 877966861 10771846 737001418 10771846 877966861 10771846 737001418 10771846 877966861 10771846 737001418 10771846 877966861 10771846 737001418 10771846 877966861 10771846 762757376 877966861 762757376 38921535...
output:
359
result:
ok single line: '359'
Test #49:
score: 8
Accepted
time: 18ms
memory: 5500kb
input:
1 500 259712038 76498306 76498306 259712038 76498306 259712038 76498306 259712038 76498306 259712038 76498306 259712038 76498306 415413414 76498306 415413414 953033042 415413414 953033042 415413414 415413414 953033042 953033042 415413414 953033042 415413414 953033042 415413414 953033042 742889991 74...
output:
61
result:
ok single line: '61'
Test #50:
score: 8
Accepted
time: 18ms
memory: 5528kb
input:
1 500 833260882 375311563 833260882 375311563 833260882 375311563 833260882 375311563 375311563 833260882 833260882 375311563 833260882 375311563 833260882 375311563 833260882 375311563 375311563 833260882 375311563 433607285 375311563 433607285 375311563 433607285 375311563 267102281 375311563 6556...
output:
76
result:
ok single line: '76'
Test #51:
score: 8
Accepted
time: 14ms
memory: 5632kb
input:
1 500 701777023 114316309 701777023 114316309 701777023 114316309 701777023 114316309 701777023 114316309 701777023 701777023 114316309 4578253 114316309 4578253 114316309 114316309 4578253 114316309 4578253 114316309 4578253 114316309 4578253 114316309 4578253 114316309 4578253 114316309 4578253 11...
output:
72
result:
ok single line: '72'
Test #52:
score: 8
Accepted
time: 14ms
memory: 5488kb
input:
1 500 25469206 25469206 212543486 25469206 212543486 25469206 212543486 115107578 212543486 115107578 212543486 115107578 212543486 115107578 115107578 212543486 115107578 212543486 421158058 421158058 212543486 421158058 212543486 421158058 421158058 212543486 421158058 212543486 212543486 42115805...
output:
61
result:
ok single line: '61'
Test #53:
score: 8
Accepted
time: 18ms
memory: 5448kb
input:
1 500 682522770 508839869 682522770 508839869 682522770 508839869 165553515 508839869 165553515 508839869 810406081 508839869 810406081 508839869 165227240 508839869 165227240 508839869 165227240 508839869 165227240 508839869 165227240 508839869 165227240 508839869 165227240 508839869 165227240 5088...
output:
272
result:
ok single line: '272'
Test #54:
score: 8
Accepted
time: 14ms
memory: 5632kb
input:
1 500 409411658 340511656 409411658 340511656 409411658 340511656 409411658 340511656 806492284 885501368 806492284 885501368 806492284 885501368 806492284 885501368 806492284 885501368 806492284 885501368 806492284 885501368 806492284 885501368 806492284 885501368 806492284 885501368 806492284 8855...
output:
124
result:
ok single line: '124'
Test #55:
score: 8
Accepted
time: 10ms
memory: 5656kb
input:
3 94 1 4 3 5 3 4 3 1 7 3 4 1 5 6 4 1 7 6 3 7 5 1 7 6 2 6 5 6 7 5 3 4 7 4 7 4 6 7 2 1 2 2 5 5 1 4 1 6 2 3 1 2 7 4 2 1 2 1 4 7 1 6 2 1 4 3 4 2 3 7 2 7 2 4 1 4 7 1 3 4 6 1 7 1 5 2 5 7 3 7 4 6 2 1 52 1 6 7 7 5 1 7 3 7 3 5 6 7 7 3 6 4 1 6 4 2 2 4 6 5 5 5 6 2 7 5 2 3 1 1 1 3 7 6 4 6 3 2 5 5 7 4 3 7 2 4 2 ...
output:
76 37 294
result:
ok 3 lines
Test #56:
score: 8
Accepted
time: 8ms
memory: 5648kb
input:
3 50 1 1 7 5 5 2 7 5 2 7 2 7 5 7 5 3 7 3 3 5 7 5 7 3 7 5 7 3 7 5 7 3 7 3 5 3 5 3 1 1 7 1 1 1 7 3 3 1 7 3 94 7 6 6 7 5 7 6 7 5 5 6 5 7 6 5 6 5 6 5 6 5 6 7 6 7 6 7 6 7 5 7 6 7 5 7 6 7 5 7 5 7 5 6 7 6 5 7 6 5 7 6 6 5 6 5 5 6 7 5 7 6 7 5 6 7 5 6 5 6 7 5 6 5 6 6 5 7 5 6 7 5 7 7 5 7 5 5 7 6 7 6 7 7 6 356 ...
output:
28 44 179
result:
ok 3 lines
Test #57:
score: 8
Accepted
time: 5ms
memory: 5696kb
input:
3 139 6 5 6 5 6 5 6 5 5 6 5 6 5 6 5 6 5 6 5 6 6 5 6 5 6 5 6 5 6 5 6 7 6 5 7 5 7 5 7 5 7 5 7 7 5 7 5 7 5 7 5 7 5 7 5 7 7 5 7 7 5 7 5 7 5 7 5 5 7 5 5 5 7 5 7 5 7 5 7 7 5 7 7 5 7 5 7 5 7 5 7 5 5 7 5 7 5 7 5 7 5 7 5 7 5 7 5 7 5 7 5 5 7 5 7 5 7 7 5 7 5 7 5 7 5 7 5 7 5 7 5 5 7 5 7 5 7 5 7 313 1 5 1 5 1 5 ...
output:
6 8 7
result:
ok 3 lines
Test #58:
score: 8
Accepted
time: 4ms
memory: 5516kb
input:
3 190 3 5 3 1 3 5 3 1 3 5 3 1 3 5 3 1 3 5 3 1 3 5 3 1 3 5 3 2 5 2 7 2 5 2 7 2 5 2 7 2 5 2 7 2 5 2 3 5 3 1 3 5 3 1 3 5 3 1 3 5 3 1 3 5 3 1 3 5 3 1 3 5 3 1 3 5 3 2 5 2 7 2 5 2 7 2 5 2 7 2 5 2 4 5 4 6 4 5 4 6 4 5 4 6 4 5 4 6 4 5 4 6 4 5 4 6 4 5 4 6 4 5 4 6 4 5 4 6 4 5 4 6 4 5 4 6 4 5 4 6 4 5 4 6 4 5 4 ...
output:
139 118 101
result:
ok 3 lines
Test #59:
score: 8
Accepted
time: 6ms
memory: 5660kb
input:
3 130 3 2 3 2 3 5 3 5 3 5 3 5 3 5 3 5 3 5 3 5 3 5 3 5 3 5 2 5 2 5 2 5 1 5 1 5 1 5 1 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 6 2 6 2 6 2 6 2 6 2 6 2 2 1 2 1 2 1 2 1 4 1 4 1 4 1 4 1 4 6 4 6 4 6 4 6 5 6 5 6 5 6 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 74 4 6 6 6 4 6 4 6 4 6 6 4 6 4 4 6...
output:
20 9 51
result:
ok 3 lines
Test #60:
score: 8
Accepted
time: 3ms
memory: 5520kb
input:
3 107 6 7 6 2 6 7 6 2 6 7 6 2 6 7 6 2 6 7 6 2 6 7 6 4 7 4 3 4 7 4 1 7 1 5 1 7 1 5 1 7 1 4 7 4 6 4 7 4 7 3 5 3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4 4 3 4 3 4 3 4 3 4 5 7 5 7 7 3 7 5 7 5 3 5 7 3 5 7 6 1 1 6 7 1 6 1 7 6 1 73 2 3 2 6 2 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 2 1 6 7 5 6...
output:
57 17 92
result:
ok 3 lines
Test #61:
score: 8
Accepted
time: 3ms
memory: 5444kb
input:
3 146 905971758 240705216 290005132 536589372 460138502 563090429 725778480 26169743 637578914 392036242 235133216 533603958 883176441 883176441 42792325 656076467 933696550 673478376 835737951 748712810 194445723 891601325 555381933 985608038 597901844 939157103 718305152 566848749 594357652 652864...
output:
140 178 158
result:
ok 3 lines
Test #62:
score: 8
Accepted
time: 5ms
memory: 5524kb
input:
3 49 74830278 539516613 74830278 539516613 784024584 74830278 784024584 74830278 784024584 74830278 784024584 539516613 784024584 539516613 784024584 539516613 74830278 539516613 784024584 74830278 784024584 539516613 784024584 539516613 784024584 539516613 784024584 539516613 74830278 784024584 748...
output:
20 143 98
result:
ok 3 lines
Test #63:
score: 8
Accepted
time: 6ms
memory: 5436kb
input:
3 320 662263417 662263417 759212235 662263417 759212235 759212235 662263417 759212235 662263417 759212235 662263417 759212235 662263417 759212235 662263417 759212235 662263417 759212235 662263417 759212235 662263417 759212235 757302985 757302985 662263417 759212235 757302985 662263417 757302985 7573...
output:
42 9 6
result:
ok 3 lines
Test #64:
score: 8
Accepted
time: 3ms
memory: 5500kb
input:
3 66 635958303 572691027 635958303 753983766 635958303 572691027 635958303 753983766 635958303 572691027 635958303 910469217 572691027 910469217 459355619 910469217 572691027 910469217 965777089 572691027 965777089 888016580 965777089 572691027 965777089 888016580 965777089 572691027 965777089 88801...
output:
47 199 90
result:
ok 3 lines
Test #65:
score: 8
Accepted
time: 8ms
memory: 5516kb
input:
3 365 563779268 572686550 746125689 572686550 746125689 572686550 746125689 572686550 746125689 572686550 746125689 572686550 746125689 746125689 572686550 746125689 572686550 84079729 84079729 572686550 84079729 572686550 84079729 406080738 84079729 406080738 84079729 406080738 84079729 406080738 4...
output:
56 12 9
result:
ok 3 lines
Test #66:
score: 8
Accepted
time: 4ms
memory: 5524kb
input:
3 361 595120737 491102101 595120737 491102101 595120737 832860755 595120737 832860755 595120737 832860755 736132025 832860755 832860755 736132025 832860755 736132025 736132025 832860755 736132025 4935212 96717202 336300849 96717202 336300849 501484470 336300849 501484470 336300849 501484470 78987245...
output:
147 4 66
result:
ok 3 lines
Test #67:
score: 8
Accepted
time: 3ms
memory: 5660kb
input:
10 61 26262500 240243187 237605778 28465702 102474829 431061606 310285858 101698003 596018567 698370876 852860590 318488204 489778201 843922819 706993266 409247144 444122524 785662333 54507781 220155124 463482685 415924514 967953100 443774257 534915647 760684187 312341892 294928021 958814839 4706823...
output:
60 5 7 6 47 5 11 33 131 155
result:
ok 10 lines
Test #68:
score: 8
Accepted
time: 3ms
memory: 5508kb
input:
10 6 700522940 296770226 700522940 700522940 738757773 700522940 13 180402080 105717690 979369373 180402080 979369373 105717690 180402080 979369373 105717690 374355075 656232386 656232386 374355075 67 697908824 792580337 697908824 542154874 792580337 697908824 792580337 697908824 235065059 697908824...
output:
4 9 37 24 10 63 83 19 13 10
result:
ok 10 lines
Test #69:
score: 8
Accepted
time: 2ms
memory: 5480kb
input:
10 56 934591892 58329970 934591892 58329970 934591892 58329970 934591892 58329970 934591892 58329970 934591892 58329970 934591892 58329970 52828378 58329970 934591892 52828378 794728475 934591892 52828378 934591892 794728475 52828378 794728475 934591892 52828378 794728475 934591892 52828378 79472847...
output:
23 2 4 11 5 5 5 13 2 2
result:
ok 10 lines
Test #70:
score: 8
Accepted
time: 0ms
memory: 5624kb
input:
10 36 107463914 913609990 107463914 368438061 107463914 913609990 107463914 368438061 107463914 913609990 107463914 511278029 414697574 511278029 575972110 511278029 414697574 511278029 33707345 414697574 33707345 889876537 33707345 414697574 33707345 889876537 33707345 414697574 33707345 285018984 ...
output:
26 50 85 43 15 3 48 4 35 45
result:
ok 10 lines
Test #71:
score: 8
Accepted
time: 3ms
memory: 5500kb
input:
10 18 283112771 436225265 283112771 436225265 283112771 436225265 283112771 436225265 283112771 436225265 283112771 436225265 283112771 436225265 283112771 591466704 283112771 591466704 1 861163789 28 349333071 926730064 349333071 926730064 86207441 926730064 86207441 926730064 86207441 926730064 86...
output:
4 1 7 2 16 2 2 24 2 20
result:
ok 10 lines
Test #72:
score: 8
Accepted
time: 2ms
memory: 5440kb
input:
10 40 583660420 128778708 583660420 418338271 797588694 418338271 418338271 36416458 797588694 418338271 36416458 418338271 609195672 547273127 88921181 915282122 252885739 915282122 915282122 252885739 915282122 252885739 915282122 845921357 315576577 845921357 74770157 79216870 866919853 129145613...
output:
25 30 46 15 3 12 39 11 14 17
result:
ok 10 lines
Test #73:
score: 8
Accepted
time: 6ms
memory: 5448kb
input:
100 1 13230502 6 613065989 209589809 209589809 27485586 951264264 410243397 11 712826200 128754523 499514641 619949545 304091114 595574683 898865435 521720060 115391977 409473053 10001963 11 843849239 576984692 99319972 428828222 290932762 98181009 890551489 185106247 116388923 376464259 964668849 1...
output:
1 5 11 11 10 7 2 3 8 1 1 5 2 2 1 1 5 3 6 2 6 2 4 4 5 9 7 3 1 13 5 6 4 2 1 1 2 3 1 3 1 3 2 3 8 10 3 2 4 4 4 2 2 7 2 1 8 3 2 1 6 11 3 2 6 3 2 5 2 8 1 2 5 20 10 5 5 1 8 13 7 1 10 4 9 2 5 13 7 16 6 3 8 2 4 1 6 2 1 5
result:
ok 100 lines
Test #74:
score: 8
Accepted
time: 3ms
memory: 5700kb
input:
100 2 800872870 982239765 24 59122782 536038598 59122782 59122782 268124857 247528547 59122782 247528547 268124857 59122782 268124857 268124857 210119477 247528547 268124857 247528547 268124857 268124857 268124857 210119477 247528547 210119477 247528547 268124857 3 924271158 328390958 670114185 4 69...
output:
2 13 3 3 6 5 4 1 2 2 2 4 1 2 2 6 3 1 2 1 3 4 1 2 4 2 2 2 2 2 1 7 2 2 1 3 8 4 5 5 4 8 10 17 3 4 4 2 4 4 3 3 3 2 1 1 1 6 4 1 1 6 6 5 9 8 2 1 2 3 2 2 2 2 2 2 6 3 6 2 4 2 2 1 5 1 6 2 2 1 1 4 2 4 2 2 3 2 3 5
result:
ok 100 lines
Test #75:
score: 8
Accepted
time: 7ms
memory: 5444kb
input:
100 4 783340795 310809792 783340795 310809792 5 119722408 47065596 119722408 47065596 119722408 3 880830920 535205516 880830920 1 248474769 14 653960744 455546860 653960744 455546860 653960744 455546860 653960744 653960744 455546860 653960744 455546860 653960744 653960744 455546860 2 103385893 71602...
output:
2 2 2 1 2 2 2 2 2 2 2 2 4 1 2 2 2 4 2 2 2 1 1 2 1 2 2 2 2 2 2 2 2 2 2 1 1 2 2 2 2 4 2 1 2 2 2 5 2 2 5 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 1 2 2 2 2 1 2 3 2 2 1 5 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
result:
ok 100 lines
Test #76:
score: 8
Accepted
time: 7ms
memory: 5456kb
input:
100 8 653040023 272349230 566423990 821901787 977088214 977088214 585105781 182463393 2 138672826 237919522 2 478558926 312699166 6 472471053 194597476 739853989 739853989 466984027 544388286 4 96354375 968990285 741582104 786470599 3 582931827 597819817 951992025 6 300035070 757113713 712710617 601...
output:
7 2 2 5 4 3 5 2 6 2 2 2 4 6 4 2 4 5 2 3 1 7 10 7 3 1 5 4 2 4 6 5 2 1 1 5 3 16 3 3 15 4 3 6 12 1 4 3 6 1 1 1 1 1 3 1 3 7 5 1 14 14 5 14 8 5 11 3 4 12 13 3 1 2 6 1 10 6 6 4 8 8 7 5 5 2 3 2 3 4 1 5 3 1 4 4 4 4 1 3
result:
ok 100 lines
Test #77:
score: 8
Accepted
time: 7ms
memory: 5448kb
input:
100 1 653986630 7 78293455 81369374 78293455 140941205 78293455 78293455 140941205 1 353165852 8 217304646 79414 217304646 79414 217304646 79414 217304646 312122830 3 230131296 814455042 230131296 3 278976992 410137720 278976992 9 456114454 655155254 456114454 655155254 220030737 655155254 220030737...
output:
1 4 1 3 2 2 4 2 2 2 1 3 3 2 2 2 3 3 1 2 3 1 2 2 1 2 2 1 2 2 2 2 2 2 1 4 2 2 2 2 2 2 2 2 4 1 2 1 3 2 2 2 2 2 2 2 2 2 5 2 11 2 1 2 2 4 2 2 2 2 1 2 2 2 2 2 2 3 2 2 2 2 2 4 2 2 2 2 1 2 2 8 3 2 1 2 1 2 2 6
result:
ok 100 lines
Test #78:
score: 8
Accepted
time: 3ms
memory: 5500kb
input:
100 5 887163735 579534916 530441529 430846330 923345818 1 810929256 6 890875426 890875426 657094919 890875426 657094919 890875426 6 546280728 232809358 687997147 232809358 687997147 232809358 8 763532350 892527595 787186795 539587226 963903850 175053045 692102911 159230362 3 116924919 841116202 7753...
output:
5 1 2 3 8 3 3 6 2 5 5 1 3 1 1 1 7 1 3 2 1 5 5 2 6 2 2 2 9 1 15 2 1 2 8 1 1 1 4 1 7 8 5 2 3 3 6 1 3 5 3 5 2 8 4 7 11 13 4 2 5 6 6 3 3 1 3 4 12 5 2 1 3 1 2 2 3 1 5 5 2 6 11 4 9 2 5 5 2 3 5 2 2 2 11 2 10 6 1 5
result:
ok 100 lines
Subtask #4:
score: 0
Time Limit Exceeded
Test #79:
score: 0
Time Limit Exceeded
input:
1 200000 1 3 3 2 2 3 3 1 2 3 1 1 3 3 3 2 1 1 2 3 2 1 3 3 3 1 2 2 1 3 1 2 1 2 3 2 3 3 2 2 3 2 3 2 3 1 1 1 1 1 3 1 3 2 3 3 3 3 1 3 2 1 3 2 3 2 3 1 1 1 1 3 3 2 3 2 1 2 2 3 2 3 2 2 2 2 2 2 3 2 1 2 2 1 1 3 2 1 2 1 1 3 3 3 2 1 2 2 2 1 3 3 2 3 2 1 3 3 2 2 1 3 1 3 2 1 2 3 2 1 2 3 2 2 3 2 1 2 1 1 1 1 1 1 1 3...
output:
result:
Subtask #5:
score: 0
Skipped
Dependency #4:
0%
Subtask #6:
score: 0
Runtime Error
Dependency #3:
100%
Accepted
Test #194:
score: 0
Runtime Error
input:
3 2446 75658187 571962292 710943961 75658187 571962292 710943961 75658187 571962292 710943961 75658187 571962292 710943961 75658187 571962292 710943961 75658187 75658187 571962292 710943961 75658187 571962292 710943961 75658187 571962292 710943961 75658187 571962292 710943961 75658187 571962292 7109...
output:
result:
Subtask #7:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%