QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#243941#7738. Equivalent Rewritingucup-team2383AC ✓245ms22592kbC++172.3kb2023-11-08 19:30:062023-11-08 19:30:06

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 8640kb

input:

3
3 6
3 3 1 5
2 5 3
2 2 6
2 3
3 1 3 2
2 3 1
1 3
2 2 1

output:

Yes
3 1 2
No
No

result:

ok OK. (3 test cases)

Test #2:

score: 0
Accepted
time: 0ms
memory: 8688kb

input:

1
10 5
2 2 4
4 1 3 4 2
1 2
3 2 1 4
4 5 2 4 3
3 2 5 4
3 5 4 2
3 1 3 2
5 1 4 2 3 5
1 4

output:

Yes
2 1 3 4 5 6 7 8 9 10

result:

ok OK. (1 test case)

Test #3:

score: 0
Accepted
time: 2ms
memory: 8420kb

input:

1
20 5
5 4 1 2 5 3
2 5 3
3 5 1 2
5 4 5 1 3 2
3 4 2 5
5 3 1 5 4 2
5 5 1 2 3 4
1 3
4 5 1 2 3
4 4 1 3 5
2 5 2
4 2 3 5 1
3 2 4 5
5 2 3 4 1 5
4 5 2 4 3
1 2
2 4 3
4 4 5 3 1
5 4 1 5 3 2
3 5 1 3

output:

Yes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 16 18 19 20

result:

ok OK. (1 test case)

Test #4:

score: 0
Accepted
time: 2ms
memory: 8908kb

input:

1
40 10
2 4 1
10 5 8 2 3 6 7 4 1 10 9
3 10 9 7
1 9
10 10 5 6 9 2 8 3 1 4 7
7 8 4 7 5 2 3 6
5 2 6 5 1 10
6 6 5 4 8 7 1
3 4 9 8
9 9 10 4 2 1 8 7 5 3
2 5 7
9 8 6 1 2 9 7 5 10 3
2 8 1
8 8 3 10 9 1 4 5 6
2 3 4
5 5 3 6 2 7
10 3 2 8 9 10 1 7 4 6 5
2 1 9
1 1
3 3 7 4
5 2 6 5 7 1
7 3 2 4 9 10 6 1
1 4
5 6 4 5 ...

output:

Yes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 20 18 19 21 22 23 24 25 26 27 28 29 30 31 32 33 34 39 36 35 37 38 40

result:

ok OK. (1 test case)

Test #5:

score: 0
Accepted
time: 0ms
memory: 8448kb

input:

1
100 20
12 10 5 11 13 12 14 7 15 19 18 3 1
10 16 11 19 8 10 15 5 12 13 14
12 16 8 11 15 2 18 14 13 20 4 12 7
10 3 9 1 7 19 6 2 14 8 20
7 17 18 20 3 9 6 10
4 1 4 19 9
13 14 17 16 11 13 8 10 19 18 7 5 20 1
13 10 15 3 2 9 1 17 7 20 13 19 18 16
2 17 9
10 20 19 13 14 16 17 8 12 18 15
5 2 16 14 6 19
1 14...

output:

Yes
1 2 3 4 5 6 7 8 9 10 14 11 13 12 15 16 17 18 19 20 21 22 23 24 25 26 32 27 28 29 30 31 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 62 61 63 64 66 65 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 82 84 85 86 87 88 89 90 91 92 93 94 96 95 97 98 99 100

result:

ok OK. (1 test case)

Test #6:

score: 0
Accepted
time: 3ms
memory: 8964kb

input:

1
5000 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 1...

output:

Yes
2 1 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 101 ...

result:

ok OK. (1 test case)

Test #7:

score: 0
Accepted
time: 73ms
memory: 14664kb

input:

1
5000 200
2 121 161
35 27 5 1 189 173 2 37 107 140 172 108 53 163 19 127 102 174 71 178 42 72 74 167 118 120 175 28 75 128 106 190 112 86 171 13
109 110 109 183 17 77 159 188 157 56 14 104 55 179 121 171 64 123 196 140 38 29 134 130 163 108 187 42 68 26 156 138 80 143 182 4 174 67 63 76 79 69 142 3...

output:

Yes
2 1 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 73 72 74 75 76 77 78 79 80 81 82 83 84 86 85 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok OK. (1 test case)

Test #8:

score: 0
Accepted
time: 142ms
memory: 19860kb

input:

1
5000 1000
146 147 426 393 758 104 385 277 218 753 477 377 54 465 635 918 97 453 576 270 57 189 230 227 332 345 358 14 178 969 817 840 620 828 837 94 922 844 789 106 250 952 745 212 693 296 677 368 625 150 103 55 266 756 525 60 91 683 364 852 877 792 312 315 997 27 50 866 759 327 557 56 49 947 644 ...

output:

Yes
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 101 ...

result:

ok OK. (1 test case)

Test #9:

score: 0
Accepted
time: 142ms
memory: 19308kb

input:

1
4999 1000
799 991 88 253 814 577 620 74 338 485 560 435 835 130 279 536 637 188 612 876 634 950 755 534 727 272 657 357 810 113 800 41 439 125 763 311 724 623 976 525 725 869 209 975 888 683 428 4 91 448 936 885 140 233 967 556 369 522 263 483 784 96 808 70 42 391 109 333 778 422 121 862 430 746 6...

output:

Yes
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 101 ...

result:

ok OK. (1 test case)

Test #10:

score: 0
Accepted
time: 157ms
memory: 20316kb

input:

1
5000 5000
2081 3619 2779 2556 4025 163 2942 2539 4075 189 2823 2189 3571 1168 1474 3383 649 1432 2052 1218 645 1053 1833 2651 3651 1611 1512 1267 3727 4182 2237 4827 3905 3335 3268 1627 2212 3697 2241 884 4015 4902 1504 2223 484 3001 2908 4619 4321 2875 4501 87 2442 3850 2760 834 3985 1807 1880 26...

output:

Yes
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 101 ...

result:

ok OK. (1 test case)

Test #11:

score: 0
Accepted
time: 165ms
memory: 19324kb

input:

1
1000 5000
2728 456 1809 201 2171 4389 1597 1911 2218 3081 3818 486 3732 263 2483 2923 527 867 782 3405 3803 4039 838 3743 3589 2153 2818 2946 997 11 899 2656 2024 4474 4802 2978 2070 3056 1919 2475 2205 2563 4339 3179 2508 195 3943 3710 4441 3440 3923 4842 3916 4481 912 3076 4866 710 254 4324 1546...

output:

Yes
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 101 ...

result:

ok OK. (1 test case)

Test #12:

score: 0
Accepted
time: 7ms
memory: 8692kb

input:

1
10 5000
4665 1548 2583 767 790 1820 825 4120 4957 4179 3273 2273 4509 457 3495 667 206 1152 4353 1992 4211 315 4334 905 4043 2826 1094 1708 4132 1046 3359 137 3773 4602 4557 83 605 4257 3514 4430 4968 2253 3041 786 2356 320 1504 1734 4095 1738 2512 3667 140 1487 594 276 3290 4273 4321 87 3343 4451...

output:

Yes
2 1 3 4 5 6 7 8 9 10

result:

ok OK. (1 test case)

Test #13:

score: 0
Accepted
time: 149ms
memory: 19228kb

input:

1
4999 4999
1640 2673 1066 1994 4702 3817 839 2285 742 4086 1810 4349 4925 4974 4073 3186 3272 4258 893 3357 942 1513 1881 1371 2140 1512 4472 524 2119 3396 1236 4311 4605 1337 910 586 944 1016 4661 1041 2765 481 4021 4994 712 1233 3011 2070 123 356 2703 3891 2559 1158 640 1127 1488 2836 1912 3975 4...

output:

Yes
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 101 ...

result:

ok OK. (1 test case)

Test #14:

score: 0
Accepted
time: 2ms
memory: 8280kb

input:

1
10 10
2 1 2
2 2 3
2 3 4
2 4 5
2 5 6
2 6 7
2 7 8
2 8 9
2 9 10
1 10

output:

No

result:

ok OK. (1 test case)

Test #15:

score: 0
Accepted
time: 28ms
memory: 12196kb

input:

1
100000 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:

Yes
2 1 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 101 ...

result:

ok OK. (1 test case)

Test #16:

score: 0
Accepted
time: 148ms
memory: 22592kb

input:

1
100000 100
30 31 100 5 89 85 53 86 19 62 20 57 81 3 60 82 32 64 27 63 1 94 17 22 8 33 12 23 88 2 11
94 95 89 78 8 74 31 36 5 41 98 99 32 53 88 33 87 40 83 70 21 35 51 81 92 3 37 90 62 1 46 29 20 85 75 65 82 91 22 97 61 12 27 26 77 18 68 15 79 28 84 58 49 54 6 66 59 72 45 17 80 48 34 4 96 19 57 94 ...

output:

Yes
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 101 ...

result:

ok OK. (1 test case)

Test #17:

score: 0
Accepted
time: 152ms
memory: 22028kb

input:

1
100000 1000
53 469 776 408 563 495 552 288 343 745 650 179 791 839 389 881 474 194 27 739 795 103 143 522 261 197 123 923 355 731 154 412 231 600 641 651 247 668 877 535 908 792 90 578 827 841 486 901 402 761 356 433 798 369
526 710 298 313 926 775 961 979 45 549 214 81 805 635 174 930 687 243 619...

output:

Yes
1 2 3 4 5 6 7 8 10 9 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 101 ...

result:

ok OK. (1 test case)

Test #18:

score: 0
Accepted
time: 187ms
memory: 21380kb

input:

1
100000 10000
2094 5226 2958 8712 7230 6625 2487 4520 9360 2727 5423 5170 3199 3725 2419 9194 1946 9942 7780 9861 692 2218 5879 9116 3253 1191 710 8703 759 3019 3581 3648 105 6123 8494 6356 8000 3056 4478 2646 7457 2437 9669 4132 4585 8874 2930 9024 6773 132 4309 6496 8138 3514 531 4782 5854 1722 5...

output:

Yes
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 42 41 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 101 ...

result:

ok OK. (1 test case)

Test #19:

score: 0
Accepted
time: 245ms
memory: 20960kb

input:

1
100000 100000
13036 23902 71466 9482 98728 78471 22915 2470 5999 53211 25994 3996 11349 30511 56448 17277 78308 18316 42069 38636 63127 26256 63985 57249 58305 64366 17839 28518 18980 95945 36316 6076 69530 96509 6940 6039 56048 41847 82118 41054 49670 95896 45891 74636 90736 75413 27251 87730 683...

output:

Yes
1 2 3 4 5 20738 6 92983 84861 43311 17826 7 44725 94238 92838 79326 60109 59044 55462 36759 32382 31717 27373 23056 18185 18054 13880 13524 6368 8 67751 83257 99768 97473 95878 93651 87074 82896 66678 65440 63154 57044 54212 50183 49481 43602 43110 42811 41201 35156 32553 30240 29174 28036 27490...

result:

ok OK. (1 test case)

Test #20:

score: 0
Accepted
time: 3ms
memory: 8616kb

input:

1
5000 100
75 80 60 100 11 49 87 84 71 37 92 2 46 24 41 95 20 42 70 74 43 76 68 82 89 15 4 35 72 9 88 93 28 3 64 75 53 97 29 8 48 61 14 1 65 66 10 13 56 21 96 52 83 67 77 30 34 57 99 47 44 91 7 55 59 50 22 63 36 90 31 45 94 40 32 86
43 80 25 67 32 5 65 63 46 81 75 88 100 3 42 62 93 23 76 70 1 60 43 ...

output:

Yes
101 1 102 2 103 3 104 4 105 5 106 6 107 7 108 8 109 9 110 10 111 11 112 12 113 13 114 14 115 15 116 16 117 17 118 18 119 19 120 20 121 21 122 22 123 23 124 24 125 25 126 26 127 27 128 28 129 29 130 30 131 31 132 32 133 33 134 34 135 35 136 36 137 37 138 38 139 39 140 40 141 41 142 42 143 43 144 ...

result:

ok OK. (1 test case)

Test #21:

score: 0
Accepted
time: 13ms
memory: 9752kb

input:

1
5000 1000
588 107 686 736 517 845 211 644 553 738 430 476 252 504 471 297 958 534 484 602 514 855 989 58 957 261 380 308 316 807 42 328 364 239 73 163 215 915 844 401 112 714 873 946 716 230 951 655 294 120 10 712 683 819 415 63 745 433 321 15 542 670 690 377 956 866 697 37 416 269 488 645 986 631...

output:

Yes
1001 1 1002 2 1003 3 1004 4 1005 5 1006 6 1007 7 1008 8 1009 9 1010 10 1011 11 1012 12 1013 13 1014 14 1015 15 1016 16 1017 17 1018 18 1019 19 1020 20 1021 21 1022 22 1023 23 1024 24 1025 25 1026 26 1027 27 1028 28 1029 29 1030 30 1031 31 1032 32 1033 33 1034 34 1035 35 1036 36 1037 37 1038 38 1...

result:

ok OK. (1 test case)

Test #22:

score: 0
Accepted
time: 16ms
memory: 9896kb

input:

1
5000 10000
2844 3485 9550 710 9862 1742 4261 3401 7862 8774 2066 6172 4182 3952 8588 7798 4471 9240 8355 3687 1282 4605 5038 4511 6460 7072 8161 7977 8564 3062 4731 6511 7854 8039 3908 8061 3691 6049 5433 1876 2772 5197 1426 881 1294 7260 6082 6478 2157 1710 8281 487 9210 545 9888 3886 6834 8549 3...

output:

Yes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2892 18 2893 19 2894 20 2895 21 2896 22 2897 23 2898 24 2899 25 2900 26 2901 27 2902 28 2903 29 2904 30 2905 31 2906 32 2907 33 2908 34 2909 35 2910 36 2911 37 2912 38 2913 39 2914 40 2915 41 2916 42 2917 43 2918 44 2919 45 2920 46 2921 47 2922 48 2923 4...

result:

ok OK. (1 test case)

Test #23:

score: 0
Accepted
time: 23ms
memory: 11024kb

input:

1
5000 100000
39293 10913 5181 19479 73743 73041 44034 79530 53967 42351 11365 1224 25452 97871 63229 80000 8498 27936 81102 81043 59677 93828 44118 63275 53964 66063 26803 73527 72659 38043 86078 59238 11483 36144 7084 20768 41417 61851 74604 18748 13113 32530 38112 32969 30342 70998 60607 33987 15...

output:

Yes
1131 1 1132 2 3 4 5 1133 6 1134 7 1135 8 1136 9 1137 10 1138 11 1139 12 1140 13 1141 14 1142 15 1143 16 1144 17 1145 18 1146 19 1147 20 1148 21 1149 22 1150 23 1151 24 1152 25 1153 26 1154 27 1155 28 1156 29 1157 30 1158 31 1159 32 1160 33 1161 34 1162 35 1163 36 1164 37 1165 38 1166 39 1167 40 ...

result:

ok OK. (1 test case)

Test #24:

score: 0
Accepted
time: 64ms
memory: 15188kb

input:

1
100000 100000
1 99697
2 99697 62499
2 62499 65369
2 65369 38767
2 38767 49004
2 49004 41714
2 41714 25240
2 25240 40929
2 40929 74271
2 74271 97963
2 97963 88205
2 88205 44238
2 44238 73947
2 73947 88038
2 88038 34453
2 34453 94958
2 94958 48075
2 48075 26199
2 26199 66549
2 66549 43887
2 43887 35...

output:

Yes
89286 1 89287 2 89288 3 89289 4 89290 5 89291 6 89292 7 89293 8 89294 9 89295 10 89296 11 89297 12 89298 13 89299 14 89300 15 89301 16 89302 17 89303 18 89304 19 89305 20 89306 21 89307 22 89308 23 89309 24 89310 25 89311 26 89312 27 89313 28 89314 29 89315 30 89316 31 89317 32 89318 33 89319 34...

result:

ok OK. (1 test case)

Test #25:

score: 0
Accepted
time: 21ms
memory: 11916kb

input:

1
50000 100000
1 46703
2 46703 55497
2 55497 23493
2 23493 17355
2 17355 85641
2 85641 40451
2 40451 91219
2 91219 41048
2 41048 12518
2 12518 24389
2 24389 41038
2 41038 57974
2 57974 1865
2 1865 75723
2 75723 90283
2 90283 20878
2 20878 13239
2 13239 55992
2 55992 21622
2 21622 32181
2 32181 8511
...

output:

Yes
14899 1 14900 2 14901 3 14902 4 14903 5 14904 6 14905 7 14906 8 14907 9 14908 10 14909 11 14910 12 14911 13 14912 14 14913 15 14914 16 14915 17 14916 18 14917 19 14918 20 14919 21 14920 22 14921 23 14922 24 14923 25 14924 26 14925 27 14926 28 14927 29 14928 30 14929 31 14930 32 14931 33 14932 34...

result:

ok OK. (1 test case)

Test #26:

score: 0
Accepted
time: 40ms
memory: 13872kb

input:

1
100000 50000
1 17436
2 17436 38563
2 38563 6072
2 6072 44215
2 44215 23698
2 23698 6361
2 6361 10273
2 10273 19571
2 19571 9471
2 9471 12671
2 12671 31584
2 31584 31896
2 31896 2213
2 2213 28535
2 28535 32050
2 32050 14148
2 14148 22955
2 22955 19097
2 19097 19557
2 19557 354
2 354 18536
2 18536 3...

output:

Yes
50001 26273 1 50002 26274 2 50003 26275 3 50004 26276 4 50005 26277 5 50006 26278 6 50007 26279 7 50008 26280 8 50009 26281 9 50010 26282 10 50011 26283 11 50012 26284 12 50013 26285 13 50014 26286 14 50015 26287 15 50016 26288 16 50017 26289 17 50018 26290 18 50019 26291 19 50020 26292 20 50021...

result:

ok OK. (1 test case)

Test #27:

score: 0
Accepted
time: 31ms
memory: 12640kb

input:

1
100000 10000
1 1670
2 1670 9903
2 9903 8088
2 8088 386
2 386 8535
2 8535 8326
2 8326 997
2 997 5841
2 5841 1028
2 1028 1627
2 1627 2622
2 2622 7211
2 7211 5508
2 5508 1647
2 1647 6224
2 6224 4630
2 4630 8145
2 8145 5415
2 5415 4098
2 4098 5354
2 5354 8742
2 8742 6205
2 6205 1258
2 1258 3625
2 3625...

output:

Yes
10001 7564 1 10002 7565 2 10003 7566 3 10004 7567 4 10005 7568 5 10006 7569 6 10007 7570 7 10008 7571 8 10009 7572 9 10010 7573 10 10011 7574 11 10012 7575 12 10013 7576 13 10014 7577 14 10015 7578 15 10016 7579 16 10017 7580 17 10018 7581 18 10019 7582 19 10020 7583 20 10021 7584 21 10022 7585 ...

result:

ok OK. (1 test case)

Test #28:

score: 0
Accepted
time: 25ms
memory: 12624kb

input:

1
100000 9999
1 1714
2 1714 7447
2 7447 7246
2 7246 2788
2 2788 3876
2 3876 7970
2 7970 5074
2 5074 6179
2 6179 2036
2 2036 7908
2 7908 6148
2 6148 1571
2 1571 1333
2 1333 988
2 988 1311
2 1311 1045
2 1045 1352
2 1352 5177
2 5177 5601
2 5601 8933
2 8933 2175
2 2175 5244
2 5244 7087
2 7087 6886
2 688...

output:

Yes
10000 2976 1 10001 2977 2 10002 2978 3 10003 2979 4 10004 2980 5 10005 2981 6 10006 2982 7 10007 2983 8 10008 2984 9 10009 2985 10 10010 2986 11 10011 2987 12 10012 2988 13 10013 2989 14 10014 2990 15 10015 2991 16 10016 2992 17 10017 2993 18 10018 2994 19 10019 2995 20 10020 2996 21 10021 2997 ...

result:

ok OK. (1 test case)

Test #29:

score: 0
Accepted
time: 45ms
memory: 14884kb

input:

1
50000 100000
1 25288
2 25288 60248
2 60248 40896
2 40896 3119
2 3119 15191
2 15191 20054
2 20054 37056
2 37056 48410
2 48410 15293
2 15293 6218
2 6218 62584
2 62584 59101
2 59101 67460
2 67460 78740
2 78740 67628
2 67628 45650
2 45650 10725
2 10725 74693
2 74693 81131
2 81131 41197
2 41197 59032
2...

output:

No

result:

ok OK. (1 test case)

Test #30:

score: 0
Accepted
time: 48ms
memory: 13736kb

input:

1
100000 50000
1 16235
2 16235 5024
2 5024 5075
2 5075 15612
2 15612 1874
2 1874 46975
2 46975 23015
2 23015 22230
2 22230 24685
2 24685 27514
2 27514 19421
2 19421 3372
2 3372 30435
2 30435 47871
2 47871 41270
2 41270 29787
2 29787 7743
2 7743 16624
2 16624 27627
2 27627 423
2 423 9245
2 9245 16307...

output:

Yes
50001 1 50002 2 50003 3 50004 4 50005 5 50006 6 50007 7 50008 8 50009 9 50010 10 50011 11 50012 12 50013 13 50014 14 50015 15 50016 16 50017 17 50018 18 50019 19 50020 20 50021 21 50022 22 50023 23 50024 24 50025 25 50026 26 50027 27 50028 28 50029 29 50030 30 50031 31 50032 32 50033 33 50034 34...

result:

ok OK. (1 test case)

Test #31:

score: 0
Accepted
time: 31ms
memory: 12844kb

input:

1
100000 10000
1 1702
2 1702 2977
2 2977 6117
2 6117 3553
2 3553 5771
2 5771 8991
2 8991 6852
2 6852 1631
2 1631 7411
2 7411 9172
2 9172 3814
2 3814 7048
2 7048 4376
2 4376 7515
2 7515 6310
2 6310 8715
2 8715 6085
2 6085 5902
2 5902 175
2 175 1347
2 1347 8011
2 8011 3487
2 3487 7329
2 7329 936
2 936...

output:

Yes
10001 1 10002 2 10003 3 10004 4 10005 5 10006 6 10007 7 10008 8 10009 9 10010 10 10011 11 10012 12 10013 13 10014 14 10015 15 10016 16 10017 17 10018 18 10019 19 10020 20 10021 21 10022 22 10023 23 10024 24 10025 25 10026 26 10027 27 10028 28 10029 29 10030 30 10031 31 10032 32 10033 33 10034 34...

result:

ok OK. (1 test case)

Test #32:

score: 0
Accepted
time: 31ms
memory: 12988kb

input:

1
100000 9999
1 269
2 269 4842
2 4842 9066
2 9066 6409
2 6409 919
2 919 4609
2 4609 2210
2 2210 9333
2 9333 1082
2 1082 419
2 419 1588
2 1588 4379
2 4379 9750
2 9750 5183
2 5183 5999
2 5999 4545
2 4545 9101
2 9101 377
2 377 451
2 451 8999
2 8999 726
2 726 7163
2 7163 6671
2 6671 4989
2 4989 7806
2 7...

output:

Yes
10000 1 10001 2 10002 3 10003 4 10004 5 10005 6 10006 7 10007 8 10008 9 10009 10 10010 11 10011 12 10012 13 10013 14 10014 15 10015 16 10016 17 10017 18 10018 19 10019 20 10020 21 10021 22 10022 23 10023 24 10024 25 10025 26 10026 27 10027 28 10028 29 10029 30 10030 31 10031 32 10032 33 10033 34...

result:

ok OK. (1 test case)

Test #33:

score: 0
Accepted
time: 96ms
memory: 19920kb

input:

1
100000 100000
1 40715
2 40715 69975
2 69975 81076
2 81076 50941
2 50941 61666
2 61666 58686
2 58686 77487
2 77487 43412
2 43412 11756
2 11756 38852
2 38852 25829
2 25829 14629
2 14629 40633
2 40633 79986
2 79986 7237
2 7237 95744
2 95744 98665
2 98665 75424
2 75424 75964
2 75964 99876
2 99876 3449...

output:

No

result:

ok OK. (1 test case)

Test #34:

score: 0
Accepted
time: 2ms
memory: 8828kb

input:

1
10 10
6 7 1 6 8 2 5
3 7 1 4
2 1 5
2 5 3
6 3 6 2 4 8 9
3 6 2 9
3 2 9 8
3 9 8 4
2 8 4
1 4

output:

No

result:

ok OK. (1 test case)

Test #35:

score: 0
Accepted
time: 2ms
memory: 9732kb

input:

1
5 10
8 8 10 5 7 6 3 1 4
4 1 6 5 7
5 7 6 1 10 3
5 6 3 10 9 1
2 3 1

output:

No

result:

ok OK. (1 test case)

Test #36:

score: 0
Accepted
time: 1ms
memory: 8516kb

input:

1
7 8
5 3 1 2 5 6
3 3 5 1
5 5 8 1 6 4
3 8 1 4
4 1 6 2 4
2 6 2
1 2

output:

No

result:

ok OK. (1 test case)

Test #37:

score: 0
Accepted
time: 13ms
memory: 10580kb

input:

1
2 100000
14270 46635 46698 1646 15716 2228 50409 74925 97781 74365 25891 12012 64493 21689 94826 36200 1632 24144 62892 32086 47204 79241 98139 79911 17992 46167 52734 60646 15562 38928 98569 3653 3671 78062 60439 55428 8130 90832 16564 66569 41939 90137 70795 10888 47855 26734 15687 58488 45392 1...

output:

No

result:

ok OK. (1 test case)

Test #38:

score: 0
Accepted
time: 10ms
memory: 10180kb

input:

1
1 100000
36897 18529 93504 47258 14497 23607 217 5522 37137 77238 60045 9885 11754 78586 36262 50169 94021 79684 70802 61672 70563 90359 26273 78607 54598 47388 39719 51290 60373 45630 10944 92439 87100 86543 99975 72598 87465 27042 92093 96656 71345 334 85993 31389 2345 23153 64562 93724 88845 65...

output:

No

result:

ok OK. (1 test case)

Test #39:

score: 0
Accepted
time: 0ms
memory: 8716kb

input:

1
3 3
2 1 3
2 1 2
3 1 2 3

output:

Yes
2 1 3

result:

ok OK. (1 test case)

Test #40:

score: 0
Accepted
time: 192ms
memory: 8708kb

input:

56035
9 9
7 1 7 3 6 8 4 2
2 8 4
3 6 3 5
3 6 7 2
7 5 3 9 1 2 8 4
6 8 9 7 3 1 6
8 3 4 9 5 1 6 7 8
5 9 8 7 5 1
2 3 2
9 4
1 4
4 3 2 4 1
3 2 3 1
1 1
1 3
3 3 4 1
3 3 2 1
4 3 1 4 2
3 3 4 1
4 10
8 2 7 3 6 1 9 8 5
5 6 4 8 7 5
3 2 8 6
6 3 4 1 8 2 5
10 10
4 3 8 1 2
3 2 9 10
3 1 7 9
6 9 7 10 3 4 8
10 9 3 5 10 8...

output:

Yes
1 3 2 4 5 6 7 9 8
Yes
1 2 3 5 4 6 7 8 9
No
Yes
1 2 3 4 5 6 8 7 9 10
Yes
1 2 3 4 7 6 5
Yes
4 1 2 3 5 6
No
Yes
2 1 3 4 5 6
No
No
Yes
2 1 3 4 5 6 7 8
Yes
2 1 3 4
Yes
2 1 3 4 5 6
Yes
1 2 5 3 4 6 7 8 9 10
Yes
2 1 3 4 5
No
Yes
2 1 3 4
No
Yes
2 1
No
Yes
2 1 3 4 5 6 7
Yes
2 1 3 4 5
No
Yes
2 1 3 4 6 5 7 ...

result:

ok OK. (56035 test cases)

Test #41:

score: 0
Accepted
time: 218ms
memory: 8432kb

input:

102767
1 9
1 1
2 9
4 6 9 4 1
9 1 6 9 2 5 4 7 8 3
5 8
6 1 7 8 4 6 5
8 1 3 2 4 8 6 7 5
4 7 3 8 6
4 1 6 3 4
1 1
1 10
3 9 4 5
2 1
1 1
1 1
4 6
2 2 5
1 5
4 4 1 5 2
2 5 3
3 8
5 5 8 1 6 4
2 3 2
1 7
2 8
4 3 5 8 2
7 4 7 5 8 2 1 6
2 5
4 3 2 5 1
1 2
5 2
1 2
2 2 1
2 2 1
2 2 1
2 2 1
5 5
2 5 4
3 2 5 1
5 3 1 2 4 5
...

output:

No
No
No
No
No
Yes
2 1 3 4
Yes
3 2 1
No
No
Yes
2 1 3 4 5
Yes
2 1 3 4 5
No
Yes
2 1 3
Yes
1 3 2 4
Yes
2 1 3 4
Yes
2 1 3 4 5
Yes
2 1 3 4 5
No
No
No
No
Yes
2 1 3 4
No
Yes
1 3 2 4
No
No
No
Yes
2 1 3 4
Yes
2 1 3
Yes
2 1 3 4
Yes
2 1 3 4
No
Yes
3 1 2 4
Yes
1 2 4 3
Yes
2 1 3 4 5
Yes
2 1 3 4 5
No
Yes
1 2 4 3
...

result:

ok OK. (102767 test cases)

Test #42:

score: 0
Accepted
time: 151ms
memory: 8720kb

input:

16732
16 2
2 1 2
1 1
2 1 2
1 1
1 1
2 2 1
1 1
2 2 1
1 2
1 1
2 2 1
2 1 2
1 1
2 1 2
2 2 1
1 1
4 4
1 1
3 3 4 1
2 2 1
3 4 3 2
10 7
5 2 6 1 5 3
3 5 3 1
4 7 2 6 3
1 4
1 1
3 3 7 4
6 6 3 4 2 1 5
1 4
1 2
7 5 3 1 7 4 6 2
14 5
2 3 2
5 3 2 5 4 1
1 2
5 3 4 1 5 2
3 2 1 4
1 2
2 4 3
2 1 4
1 3
5 4 2 1 3 5
1 1
5 3 4 1...

output:

Yes
1 2 3 4 5 6 7 8 10 9 11 12 13 14 15 16
Yes
2 1 3 4
Yes
4 1 2 5 3 6 7 9 8 10
Yes
1 2 3 4 5 7 6 9 8 10 11 12 13 14
Yes
2 1 3
Yes
2 1 3 4 5 6 7 8 9 10
Yes
2 1 3 4 5 6 7 8 9 10 11
Yes
2 1 3 4 5 6 7 8 9 10 11
Yes
2 1 3 4 5 6 7 8 9 10 11
Yes
2 1 3 4 5 6 7 8 9
Yes
2 1 3 4 5
Yes
1 2 3 4 5 6 8 7 9 10 12 ...

result:

ok OK. (16732 test cases)

Test #43:

score: 0
Accepted
time: 134ms
memory: 8508kb

input:

7315
5 32
4 13 30 31 4
8 12 1 11 10 27 19 5 15
12 7 29 3 2 4 25 30 22 10 19 15 8
14 31 16 21 18 22 3 32 20 17 19 12 2 25 8
23 8 30 11 17 19 26 22 21 28 13 14 2 25 16 9 3 6 18 7 29 5 32 31
11 21
12 11 7 9 14 8 3 10 1 16 2 19 20
14 16 13 1 17 21 19 12 9 6 5 8 14 10 2
6 13 3 9 20 11 4
1 11
14 9 7 6 16 ...

output:

Yes
2 1 3 4 5
Yes
1 2 3 5 4 6 7 8 9 10 11
Yes
2 1 3 4 5 6 7
Yes
1 2 3 4 6 5 7 8 9 10 11 12 13 14 15 16 17 18
Yes
2 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Yes
2 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
No
Yes
2 1 3 4 5 6 7 8 9 10 11
No
Yes
2 1 3 4 5 6 7 8 9 10 11 12
No
Yes
1 2 3 4 5 6 8 7 10 9
Yes...

result:

ok OK. (7315 test cases)

Test #44:

score: 0
Accepted
time: 128ms
memory: 8548kb

input:

2985
6 14
4 11 12 9 8
14 9 2 14 4 7 8 1 10 12 13 6 5 3 11
9 4 2 1 5 9 3 6 14 7
11 4 7 1 3 13 6 11 14 9 10 2
9 2 12 10 11 7 13 5 3 6
3 4 14 2
12 8
2 8 4
6 4 5 8 7 2 1
8 5 3 8 1 2 7 6 4
2 5 8
4 7 8 3 1
1 2
5 1 6 5 3 8
5 7 1 5 8 4
2 7 3
2 3 6
5 2 7 5 6 1
1 3
13 38
32 9 14 37 28 35 38 16 36 13 30 26 23 ...

output:

Yes
1 3 2 4 5 6
Yes
1 2 3 6 4 5 7 8 9 10 12 11
Yes
2 1 3 4 5 6 7 8 9 10 11 12 13
Yes
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 29 28 30 31 32 33 34 35 36 37 38 39 40 41
Yes
2 1 3 4 5 6 7 8 9
Yes
2 1 3 4
Yes
2 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Yes
2 1 3 4 5
Yes
2 1 3 ...

result:

ok OK. (2985 test cases)

Test #45:

score: 0
Accepted
time: 114ms
memory: 8968kb

input:

1500
15 61
17 17 12 11 52 16 21 26 33 14 28 48 58 29 25 5 56 15
35 4 27 61 26 33 46 40 36 10 11 16 55 48 1 47 34 44 58 12 30 23 43 21 15 35 38 5 8 60 42 54 20 53 7 13
12 59 14 39 33 10 32 40 15 24 54 28 47
9 52 9 6 2 33 17 8 1 37
38 19 52 2 9 38 17 50 48 59 55 61 30 11 23 46 57 40 53 43 3 37 7 25 4 ...

output:

Yes
2 1 3 4 5 6 7 8 9 10 11 12 13 14 15
Yes
1 2 3 4 6 5 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
Yes
1 2 3 6 4 5
Yes
2 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Yes
2 1 3 4 5 6 7 8 9 10 11 12 13 14 15 1...

result:

ok OK. (1500 test cases)

Test #46:

score: 0
Accepted
time: 123ms
memory: 8608kb

input:

756
37 23
6 11 22 2 8 16 15
6 4 3 7 14 13 17
8 19 9 12 10 16 7 13 6
11 8 18 6 16 20 17 12 22 21 4 2
7 6 3 9 16 14 15 12
14 2 9 17 4 12 19 14 13 21 23 7 22 6 15
2 12 10
18 11 22 2 9 10 20 3 12 15 5 13 17 4 23 8 16 18 7
16 10 8 9 13 23 18 17 4 7 19 1 5 22 15 14 11
12 5 8 9 12 17 16 4 20 22 19 10 1
19 ...

output:

Yes
2 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 25 22 23 24 26 27 28 29 30 33 31 34 32 35 36 37
Yes
1 2 3 4 5 6 7 8 9 12 10 11 13 14 15 17 16 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 56 55 57 59 58 60 61 62 64 63 65 66 6...

result:

ok OK. (756 test cases)

Test #47:

score: 0
Accepted
time: 133ms
memory: 8888kb

input:

65
55 181
138 108 125 14 1 34 103 72 135 43 168 171 161 120 56 166 64 133 138 158 4 28 77 164 153 2 30 148 154 65 10 104 25 51 96 94 42 19 13 112 114 81 46 180 92 107 165 82 75 139 38 79 50 155 98 24 12 78 172 170 97 177 181 83 169 22 61 163 118 60 159 128 3 20 99 45 44 66 59 68 37 90 129 145 150 11...

output:

Yes
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 36 34 35 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 55 54
Yes
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 4...

result:

ok OK. (65 test cases)

Test #48:

score: 0
Accepted
time: 133ms
memory: 9488kb

input:

34
333 277
104 240 259 65 21 106 261 19 251 209 29 32 163 191 140 253 229 7 141 155 180 9 238 188 208 218 234 205 22 53 265 34 158 123 236 152 221 226 119 202 8 250 44 30 67 80 10 114 203 96 57 199 178 116 214 75 43 47 151 15 201 36 195 129 154 276 264 64 196 206 45 162 108 91 16 156 275 60 192 98 1...

output:

Yes
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 28 27 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 101 ...

result:

ok OK. (34 test cases)

Test #49:

score: 0
Accepted
time: 136ms
memory: 10356kb

input:

18
399 423
15 166 416 112 86 100 319 212 316 136 37 80 272 21 68 322
144 27 120 312 380 83 17 269 349 299 129 184 344 285 25 389 185 37 275 166 220 38 231 292 33 422 175 263 408 339 279 198 66 301 367 289 371 361 405 78 174 7 95 43 322 79 396 50 136 319 144 1 153 73 143 310 228 67 121 221 341 88 207...

output:

Yes
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 101 ...

result:

ok OK. (18 test cases)

Test #50:

score: 0
Accepted
time: 138ms
memory: 10660kb

input:

16
653 687
336 330 537 326 592 14 369 379 88 143 625 361 209 402 154 341 512 140 653 198 115 615 662 670 2 366 388 376 473 204 112 571 611 554 620 664 539 353 13 623 40 6 222 362 68 399 359 22 233 308 290 227 681 282 462 108 400 685 116 404 607 257 493 555 81 166 633 374 284 216 631 129 117 52 82 16...

output:

Yes
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 101 ...

result:

ok OK. (16 test cases)

Test #51:

score: 0
Accepted
time: 156ms
memory: 12876kb

input:

10
4875 1703
46 737 703 1287 18 917 557 308 337 792 1321 586 116 748 207 1466 1095 1256 905 1367 443 1529 1631 1455 593 1561 1573 573 1558 1215 1073 773 409 363 1190 1400 303 532 1366 12 1327 140 1121 739 504 955 309
642 660 1117 579 685 827 733 1555 604 257 203 1258 1667 856 1632 1648 180 148 1505 ...

output:

Yes
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 101 ...

result:

ok OK. (10 test cases)

Test #52:

score: 0
Accepted
time: 167ms
memory: 10916kb

input:

10
2152 6099
1928 1750 3647 1128 3244 4013 3109 3085 4874 4955 1610 5283 2927 3974 5812 1400 5920 109 1169 5972 400 2662 6017 354 2496 1660 3603 3958 4723 4742 4889 5306 3005 3738 471 1171 5128 328 3144 1534 5371 1389 2592 1552 1386 600 1559 4119 3360 3115 5436 4456 3924 5475 3446 636 6006 5497 2289...

output:

Yes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1868 25 2134 2133 2126 2113 2093 2092 2091 2043 2013 1931 1925 1921 1910 1902 1884 1874 1858 1836 1822 1819 1782 1692 1668 1665 1659 1637 1560 1532 1515 1505 1458 1454 1432 1426 1413 1409 1354 1337 1292 1249 1218 1212 1186 1179 1173 ...

result:

ok OK. (10 test cases)

Test #53:

score: 0
Accepted
time: 214ms
memory: 14572kb

input:

5
10715 32654
30104 21415 24927 2648 29574 9327 19845 9426 22207 17370 19583 31927 17767 3729 26014 4451 5276 23633 23705 8570 27864 6539 14128 24928 6945 2836 6333 22361 22233 3417 32495 14573 28993 24870 9151 11947 500 1727 24203 30633 30302 30205 3506 28499 22001 28589 29869 17244 11496 11527 104...

output:

Yes
1 2 3 4 5 7223 6 7365 6307 6192 3980 3466 3016 2133 1477 1404 1111 1028 458 316 172 7 5248 8184 4735 10481 9857 9850 9655 9221 8577 8529 8069 7337 6023 4605 4599 3133 2956 2662 1791 1728 1572 738 524 516 8 9687 5936 6349 3676 3078 10698 10696 10695 10694 10693 10692 10684 10679 10667 10651 10650...

result:

ok OK. (5 test cases)

Test #54:

score: 0
Accepted
time: 206ms
memory: 20408kb

input:

4
30941 87231
3343 27768 54391 11968 86979 3800 81795 58116 58210 78629 7092 64236 45343 72255 32763 13727 58119 70974 19521 80401 48552 78749 84222 12034 48507 14718 58471 78049 80706 84779 42870 10315 41738 40658 4946 31382 25630 33946 22803 70310 1054 82067 44220 9141 71170 52255 32169 33800 5909...

output:

Yes
29536 29387 29031 28935 28394 28294 28122 27921 27807 26576 26163 26132 25041 24255 24085 23447 22578 22324 20543 19618 19037 17216 16764 15593 15546 15206 13513 12220 11221 10799 10759 10732 10550 9925 9698 8342 7825 7090 7005 6945 6862 6436 5372 4431 4324 3753 3624 2629 2467 2396 2021 1 30513 ...

result:

ok OK. (4 test cases)

Test #55:

score: 0
Accepted
time: 209ms
memory: 15776kb

input:

2
14273 44272
42092 32750 1668 11432 32582 39567 40611 6460 20864 3016 34614 38859 29060 24684 7745 18630 39267 43051 28477 18343 418 36149 18447 31083 14516 34366 42622 19114 6788 17704 15632 15015 23458 42632 16107 13765 619 27810 9377 35981 23711 43586 30644 36127 19176 22176 2131 21281 30064 297...

output:

Yes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 13501 18 13481 19 14206 14153 14143 14138 14106 14105 14102 14095 14090 14069 14043 14026 14022 13999 13966 13965 13934 13921 13851 13815 13810 13706 13698 13682 13675 13669 13630 13603 13579 13575 13572 13569 13559 13539 13522 13507 13432 13402 13368 13...

result:

ok OK. (2 test cases)

Test #56:

score: 0
Accepted
time: 203ms
memory: 11744kb

input:

16
4 82688
40860 74289 70231 26149 30387 28480 7496 37828 53107 52620 72708 63629 70195 19835 9845 32006 52366 79682 67856 41864 72043 45696 32818 74591 46712 10129 71894 46054 54411 19128 56285 42735 8339 15313 2956 17839 51950 61338 39438 76749 69621 34845 68085 5185 55398 53992 81389 47707 68127 ...

output:

No
No
Yes
1 2 7 3 4 5 6
No
No
Yes
8 1 7 2 9 6 3 4 5
No
No
No
No
No
No
No
No
No
Yes
6 5 4 3 2 1

result:

ok OK. (16 test cases)

Test #57:

score: 0
Accepted
time: 189ms
memory: 13000kb

input:

10
30 41566
40801 38376 39350 30151 24590 32182 6425 1890 19894 22784 4176 20714 14198 2763 21900 29813 33285 9186 11295 41276 16619 7275 22660 39631 8788 28683 6860 30889 34055 6136 34495 4985 1398 16196 38281 40241 25703 16025 89 41067 36920 34688 40035 35040 33137 23008 22065 8405 17791 11711 204...

output:

Yes
1 2 3 30 29 27 26 25 24 23 22 21 19 16 15 4 5 28 20 18 17 13 12 7 6 14 10 9 8 11
Yes
1 11 2 12 7 3 9 4 8 5 10 6
Yes
29 1 88 86 71 34 2 50 42 35 30 24 3 78 38 22 4 69 58 54 51 23 5 97 93 91 84 75 73 68 67 63 55 49 47 46 41 36 26 6 92 82 81 80 79 76 66 65 62 56 43 33 32 31 21 19 7 95 90 87 64 60 5...

result:

ok OK. (10 test cases)

Test #58:

score: 0
Accepted
time: 195ms
memory: 13288kb

input:

10
438 64754
48418 33529 51147 2711 31366 21917 16434 6565 63572 49088 8357 11713 7195 39221 49070 29977 22556 30987 27282 19855 25294 14918 56886 21014 17485 8219 29401 42353 30030 27776 47714 41685 17632 52754 5670 12307 8946 39256 49513 47678 36085 22350 5786 10874 6057 32338 46813 21957 34839 52...

output:

Yes
431 415 411 406 404 403 401 389 380 379 374 366 353 345 288 287 281 260 258 232 229 215 184 168 164 108 101 78 76 69 66 63 59 54 52 47 43 39 25 24 20 17 1 434 433 429 426 413 410 398 396 390 388 383 376 371 367 363 361 357 350 347 344 337 330 326 323 320 312 310 308 307 305 299 294 290 285 279 2...

result:

ok OK. (10 test cases)

Test #59:

score: 0
Accepted
time: 130ms
memory: 11616kb

input:

16
3258 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:

Yes
2 1 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 101 ...

result:

ok OK. (16 test cases)

Test #60:

score: 0
Accepted
time: 142ms
memory: 9444kb

input:

67
7658 8
1 6
7 1 4 8 7 2 3 5
5 5 7 6 2 8
4 8 5 2 6
2 5 7
8 4 5 2 1 3 7 8 6
8 1 4 2 3 8 6 7 5
8 3 7 1 5 8 6 4 2
7 4 8 1 6 3 2 5
3 8 2 5
2 6 8
1 8
5 1 7 6 3 8
4 7 2 6 5
4 3 5 6 4
5 8 1 5 7 3
8 3 8 5 1 4 7 6 2
4 4 2 1 6
6 1 5 2 7 8 3
8 5 4 2 3 8 1 7 6
7 2 8 1 6 7 4 3
4 6 1 4 7
1 2
7 7 4 5 6 8 2 1
7 2 ...

output:

Yes
2 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 22 24 25 26 27 30 28 29 31 32 33 34 35 36 37 39 38 40 41 42 44 43 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 59 61 62 65 63 64 66 67 68 69 70 71 75 72 73 74 76 77 78 79 80 81 82 83 84 86 85 87 88 89 91 90 92 93 94 95 96 98 97 99 100 101 ...

result:

ok OK. (67 test cases)

Extra Test:

score: 0
Extra Test Passed