QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#310551#4996. Icy ItineraryLiuXuanDeAC ✓42ms21380kbC++142.3kb2024-01-21 15:28:412024-01-21 15:28:42

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4 4
1 2
1 3
1 4
3 4

output:

1 4 3 2 

result:

ok qwq

Test #2:

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

input:

5 0

output:

1 2 3 4 5 

result:

ok qwq

Test #3:

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

input:

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

output:

1 10 5 8 6 2 9 7 4 3 

result:

ok qwq

Test #4:

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

input:

2 1
1 2

output:

1 2 

result:

ok qwq

Test #5:

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

input:

2 0

output:

1 2 

result:

ok qwq

Test #6:

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

input:

3 1
1 3

output:

1 3 2 

result:

ok qwq

Test #7:

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

input:

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

output:

1 3 5 2 6 8 4 10 7 9 

result:

ok qwq

Test #8:

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

input:

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

output:

1 2 4 5 3 9 6 10 8 7 

result:

ok qwq

Test #9:

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

input:

15 40
12 11
11 6
5 11
15 14
10 14
15 5
1 11
10 12
4 3
6 4
4 9
2 11
6 12
13 7
7 9
10 9
1 2
9 11
2 6
7 14
2 9
3 13
9 1
2 7
8 11
1 10
13 1
4 15
3 7
2 15
6 5
10 15
4 14
15 6
2 4
3 11
1 14
2 8
1 8
10 7

output:

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

result:

ok qwq

Test #10:

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

input:

15 1
13 6

output:

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

result:

ok qwq

Test #11:

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

input:

150 150
110 99
80 122
55 67
24 47
73 68
150 13
94 140
146 59
136 28
94 134
131 2
26 105
65 79
57 37
116 102
84 16
110 78
72 5
34 8
8 43
83 57
49 146
43 112
54 139
95 13
11 95
75 29
29 30
52 14
118 56
4 51
18 146
31 113
56 69
44 14
63 123
44 66
101 122
52 10
16 118
71 93
22 113
28 88
5 108
16 48
84 1...

output:

1 110 66 69 70 93 129 40 28 88 57 83 71 96 75 109 58 108 34 8 141 68 79 38 30 29 119 150 13 95 137 50 6 43 16 48 104 74 52 14 41 45 111 42 117 21 61 63 134 54 10 80 121 49 102 22 84 77 94 135 139 97 81 87 26 122 89 15 5 55 146 118 116 4 24 12 113 131 149 148 147 145 144 143 142 140 138 136 133 132 1...

result:

ok qwq

Test #12:

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

input:

1500 1500
370 639
1046 375
1191 907
782 923
1369 196
998 194
640 331
309 631
1053 1076
887 1112
650 1437
2 1133
847 302
647 81
22 691
772 14
1112 62
266 1399
865 980
1302 1146
1007 575
1448 261
1489 1189
1134 1009
7 1175
1369 942
709 365
675 514
1021 1250
1415 2
976 746
564 388
431 326
43 147
385 81...

output:

1 1278 548 681 1064 233 42 215 1154 1106 22 862 537 1109 304 1430 1112 62 634 121 396 928 858 723 55 427 327 2 1415 1449 94 1279 245 1126 898 11 606 623 417 448 6 1484 621 1422 353 1238 14 1091 908 328 1476 1068 1215 1277 1195 209 916 1432 788 155 1284 1052 293 273 1429 544 412 1474 527 528 818 1431...

result:

ok qwq

Test #13:

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

input:

15000 15000
11602 9990
5492 14226
2633 14599
7956 12544
1258 1198
13788 3283
171 3770
8226 10782
915 6735
7186 14219
12806 1549
8783 5596
3692 9668
370 4654
13811 4032
835 12990
14273 14020
8902 7798
7405 4524
7476 1864
7786 14984
4367 13552
2927 2463
1929 3198
97 5800
14012 5674
6283 827
13860 1139...

output:

1 13367 13219 11386 2929 954 1601 1206 2837 12254 8190 5127 7481 11837 13030 8 13142 3451 199 2742 11848 11808 7978 1417 5961 12331 4947 13517 2515 9246 13163 11682 9647 8446 13304 13441 5682 6434 900 5526 1000 13490 863 8088 1098 10252 10546 7436 1939 5263 10259 10061 5674 3173 9534 2355 10120 6615...

result:

ok qwq

Test #14:

score: 0
Accepted
time: 4ms
memory: 6832kb

input:

300000 0

output:

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 102 ...

result:

ok qwq

Test #15:

score: 0
Accepted
time: 9ms
memory: 14952kb

input:

300000 1
80856 110687

output:

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 102 ...

result:

ok qwq

Test #16:

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

input:

300000 100
254473 70041
278954 218026
54339 23948
90766 35432
145294 42945
10824 168971
162204 196321
137959 274421
274330 8901
113606 229638
136217 161945
232685 214848
91296 146678
8764 206628
297190 163150
140047 161791
188167 261504
261443 160497
262029 233857
112139 37654
43010 192683
3697 1727...

output:

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 102 ...

result:

ok qwq

Test #17:

score: 0
Accepted
time: 12ms
memory: 16180kb

input:

300000 100000
279619 105099
95580 46691
139476 105331
67098 144910
105689 84242
198438 147050
274697 179922
229381 179041
210820 243557
162433 137909
14644 17464
295783 151723
180167 63360
17314 119555
201506 121519
129982 11913
3312 283798
197026 175391
86210 36036
177182 150502
37900 95301
261630 ...

output:

1 2 3 4 5 7 8 11 12 13 14 16 18 20 21 24 25 27 28 29 30 31 34 36 38 39 40 42 44 45 46 48 49 50 54 56 57 59 62 67 69 71 72 74 75 80 86 92 94 99 100 102 106 107 108 109 110 111 112 113 114 115 117 119 122 123 124 125 127 132 134 135 137 142 147 152 154 157 158 159 160 161 162 166 167 169 172 173 177 1...

result:

ok qwq

Test #18:

score: 0
Accepted
time: 42ms
memory: 18212kb

input:

300000 300000
297121 280398
49505 181149
186167 88552
250816 195719
113345 180891
103968 274040
148345 167433
283785 32444
281156 62491
76167 222701
181130 69399
291957 220950
21996 17907
98113 270806
247895 36687
122761 248769
235623 41248
274601 174896
296046 235115
57460 64170
286130 15089
91951 ...

output:

1 76675 273134 166119 43116 150061 248644 91904 72472 1808 110483 83330 219637 298567 109337 259733 141580 100423 122819 234820 189041 230786 89960 242807 85583 127279 122890 194102 197009 86800 133854 197524 185994 128102 219992 205305 232840 130248 152720 270755 53062 92033 69205 139019 274750 174...

result:

ok qwq

Test #19:

score: 0
Accepted
time: 20ms
memory: 14156kb

input:

1000 300000
794 378
253 365
792 287
235 482
50 807
795 174
786 980
763 645
615 440
364 542
209 856
925 709
965 709
755 592
242 870
960 978
253 404
164 439
931 998
443 318
663 958
560 445
970 245
192 631
321 621
120 472
402 520
939 454
436 893
840 577
112 961
509 9
815 190
357 128
52 433
554 967
384 ...

output:

1 124 709 983 576 375 498 121 937 190 255 493 764 486 856 318 103 810 913 172 206 844 116 891 829 961 657 300 563 518 835 312 828 804 550 815 618 101 543 633 846 688 106 940 283 60 797 474 102 81 548 235 582 37 67 426 984 895 660 981 47 516 425 676 641 355 734 678 735 537 361 260 179 682 786 296 358...

result:

ok qwq

Test #20:

score: 0
Accepted
time: 19ms
memory: 13340kb

input:

1500 300000
1189 1031
85 1047
1096 1290
1497 193
885 27
603 979
1438 1441
507 1256
1432 803
332 750
536 157
333 1248
1009 943
857 422
849 796
1399 814
911 481
836 36
1360 1175
592 737
277 672
551 331
849 1049
725 343
1312 112
889 544
1154 691
1387 1326
91 481
432 689
1051 248
1069 1499
499 194
748 1...

output:

1 1406 380 1107 176 45 1268 366 263 284 880 939 475 73 128 1463 1362 258 1464 30 635 1074 516 132 1271 287 224 266 68 603 542 1329 841 510 34 818 486 612 1412 434 103 1158 859 80 1353 1471 613 17 218 414 269 743 408 407 640 426 1171 888 351 509 185 1405 1436 1167 479 130 1432 1195 63 204 310 42 121 ...

result:

ok qwq

Test #21:

score: 0
Accepted
time: 18ms
memory: 13576kb

input:

10000 300000
1236 4556
6003 6937
2217 6717
1150 1520
835 87
6994 6123
4263 8371
6772 4802
7302 3130
6157 4469
9918 3820
1997 5129
9662 7860
5882 9655
4931 8546
4776 1017
3925 6960
8114 6760
7793 3511
2958 3481
7244 3603
8609 4155
1832 2597
1639 6861
6563 8641
7870 3706
3772 4396
7696 6907
8722 1019
...

output:

1 5395 7685 3176 2703 5704 3622 870 689 3686 6956 6231 7306 9514 7397 1983 3994 4219 9496 9007 9377 9978 5835 9446 6955 7501 7560 915 3630 658 8395 6990 6615 497 6359 4728 1695 7677 3387 1788 8652 2257 1692 1565 9565 7720 685 3722 7263 1280 4709 8236 820 989 2834 6659 5706 5402 3455 3242 7486 1378 4...

result:

ok qwq

Test #22:

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

input:

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

output:

1 9 8 7 3 6 10 4 2 5 

result:

ok qwq

Test #23:

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

input:

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

output:

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

result:

ok qwq

Test #24:

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

input:

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

output:

1 404 844 767 1000 806 996 124 995 462 994 934 993 722 991 482 989 544 988 288 987 454 986 37 985 330 982 513 980 860 978 909 975 373 974 82 972 119 971 959 970 935 969 253 968 15 967 520 964 449 963 476 962 525 961 107 960 548 958 400 957 628 955 906 954 95 953 845 952 441 951 713 949 660 948 219 9...

result:

ok qwq

Test #25:

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

input:

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

output:

1 2985 2221 323 3000 1172 2999 1259 2998 2689 2997 196 2996 2525 2995 442 2994 556 2993 88 2992 2945 2991 432 2990 202 2989 1550 2988 2611 2987 2763 2986 1171 2984 2464 2983 253 2982 798 2981 1520 2980 1798 2979 2354 2978 2828 2977 2287 2976 913 2975 1156 2974 2109 2973 2055 2971 1710 2970 539 2969 ...

result:

ok qwq

Test #26:

score: 0
Accepted
time: 4ms
memory: 13180kb

input:

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

output:

1 3097 465 1131 10000 6149 9999 2145 9998 2428 9997 4595 9996 4573 9995 3859 9994 5394 9993 1488 9992 4505 9991 3419 9990 9532 9989 9659 9988 2560 9987 2349 9986 5837 9985 707 9984 9798 9983 9652 9982 8934 9981 8835 9980 6572 9979 6820 9978 7531 9977 5399 9976 4607 9975 4623 9974 6566 9973 5337 9972...

result:

ok qwq

Test #27:

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

input:

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

output:

1 18782 20033 5018 40000 23833 39999 1513 39998 31561 39997 39633 39996 15643 39995 8681 39994 39993 39992 39991 39990 39989 39988 39987 39986 39985 39984 39983 39982 39981 39980 39979 39978 39977 39976 39975 39974 39973 39972 39971 39970 39969 39968 39967 39966 39965 39964 39963 39962 39961 39960 3...

result:

ok qwq

Test #28:

score: 0
Accepted
time: 4ms
memory: 14724kb

input:

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

output:

1 39038 6 10856 100000 15583 99999 97406 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 9...

result:

ok qwq

Test #29:

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

input:

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

output:

1 128521 193103 300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 2999...

result:

ok qwq

Test #30:

score: 0
Accepted
time: 8ms
memory: 13844kb

input:

1000 249500
1 702
1 559
1 154
1 284
1 707
1 397
1 281
1 105
1 856
1 712
1 864
1 638
1 640
1 984
1 134
1 819
1 36
1 820
1 146
1 779
1 516
1 420
1 721
1 932
1 426
1 922
1 790
1 167
1 365
1 667
1 690
1 357
1 543
1 778
1 473
1 9
1 239
1 746
1 983
1 141
1 349
1 852
1 826
1 553
1 929
1 628
1 500
1 352
1 6...

output:

1 5 455 783 754 547 90 147 545 92 687 715 574 355 129 321 665 343 622 48 677 425 428 240 233 298 301 457 369 339 953 532 700 540 416 654 561 695 138 33 143 427 728 447 172 689 780 190 44 371 828 214 525 803 3 627 801 443 305 925 664 253 947 785 770 77 18 771 391 657 280 182 605 703 560 747 957 701 2...

result:

ok qwq

Test #31:

score: 0
Accepted
time: 8ms
memory: 13800kb

input:

750 245875
1 596
1 476
1 375
1 129
1 650
1 604
1 579
1 302
1 574
1 322
1 351
1 206
1 107
1 535
1 597
1 135
1 516
1 330
1 515
1 151
1 357
1 146
1 4
1 150
1 85
1 15
1 655
1 227
1 549
1 311
1 560
1 705
1 273
1 249
1 307
1 191
1 398
1 691
1 621
1 257
1 268
1 729
1 593
1 61
1 139
1 630
1 172
1 740
1 306
...

output:

1 567 306 112 740 186 172 669 630 370 139 126 61 213 593 75 729 582 268 58 257 67 621 627 691 483 398 238 191 683 307 196 249 141 273 458 705 586 560 19 311 195 549 321 227 143 655 672 15 235 85 10 150 288 4 563 146 52 357 35 151 750 515 121 330 199 516 241 135 171 597 248 535 178 107 77 206 486 351...

result:

ok qwq

Test #32:

score: 0
Accepted
time: 8ms
memory: 12408kb

input:

750 245875
1 368
1 278
1 71
1 353
1 405
1 149
1 616
1 153
1 622
1 655
1 105
1 682
1 140
1 668
1 352
1 210
1 257
1 677
1 749
1 612
1 234
1 35
1 400
1 604
1 193
1 505
1 230
1 586
1 358
1 737
1 428
1 346
1 279
1 395
1 584
1 691
1 73
1 435
1 639
1 205
1 320
1 496
1 384
1 295
1 522
1 672
1 309
1 250
1 43...

output:

1 350 440 37 589 27 548 88 374 430 253 717 445 710 495 676 643 647 471 663 307 283 48 453 175 162 221 436 131 654 673 75 497 333 702 692 195 434 693 109 280 263 141 363 61 743 484 249 156 678 590 224 373 315 577 155 615 481 578 528 674 6 272 549 194 264 268 362 514 551 715 331 338 130 623 598 433 29...

result:

ok qwq

Test #33:

score: 0
Accepted
time: 4ms
memory: 12004kb

input:

750 101324
1 411
1 270
1 170
1 697
1 76
1 64
1 744
1 353
1 109
1 115
1 133
1 560
1 453
1 690
1 297
1 733
1 523
1 479
1 62
1 32
1 80
1 578
1 261
1 682
1 506
1 303
1 646
1 229
1 750
1 421
1 322
1 168
1 543
1 568
1 456
1 138
1 57
1 380
1 534
1 131
1 452
1 614
1 174
1 207
1 617
1 123
1 562
1 69
1 567
1 ...

output:

1 615 750 748 746 745 744 743 742 741 740 738 733 730 726 724 722 721 718 717 714 712 710 708 707 701 697 696 695 690 689 688 687 682 678 677 675 673 670 668 667 666 663 660 654 653 649 646 634 633 630 625 618 617 614 612 609 608 603 602 601 595 594 591 590 589 588 587 586 578 577 576 571 568 567 56...

result:

ok qwq

Test #34:

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

input:

750 45299
1 415
1 743
1 571
1 531
1 419
1 378
1 188
1 454
1 117
1 344
1 362
1 180
1 461
1 228
1 693
1 115
1 275
1 250
1 501
1 618
1 322
1 217
1 42
1 398
1 129
1 88
1 414
1 740
1 90
1 528
1 437
1 124
1 733
1 241
1 487
1 72
1 295
1 366
1 748
1 143
1 55
1 113
1 534
1 479
1 555
1 712
1 349
1 586
1 212
1...

output:

1 525 108 424 408 299 123 226 144 239 49 657 324 637 507 351 20 238 577 401 643 11 549 678 439 543 389 376 503 153 59 219 104 450 48 673 290 535 749 676 492 297 298 465 237 463 185 53 187 729 380 13 565 576 350 306 563 8 552 289 683 246 154 100 39 359 716 136 101 292 227 573 393 96 375 664 137 611 1...

result:

ok qwq

Test #35:

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

input:

750 258869
1 124
1 233
1 740
1 493
1 145
1 749
1 142
1 224
1 308
1 572
1 33
1 660
1 246
1 377
1 690
1 105
1 741
1 692
1 497
1 334
1 481
1 450
1 366
1 307
1 739
1 165
1 730
1 430
1 332
52 349
52 424
52 212
52 555
52 531
52 426
52 379
52 637
52 635
52 434
52 40
52 404
52 261
52 190
52 557
52 225
52 52...

output:

1 349 749 741 740 739 730 692 690 660 572 497 493 481 450 430 377 366 334 332 308 307 246 233 224 165 145 142 124 105 52 33 424 212 555 531 426 379 637 635 434 40 404 261 190 557 225 520 472 240 409 136 206 611 54 443 437 359 709 122 255 201 182 343 411 462 537 363 316 27 31 302 117 566 636 656 133 ...

result:

ok qwq

Test #36:

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

input:

750 1154
1 433
1 99
1 563
1 370
1 149
1 218
1 477
1 170
1 98
1 299
1 586
1 574
1 51
1 667
1 539
1 659
1 615
1 730
1 12
1 694
1 695
1 662
1 166
1 253
1 84
1 420
1 533
1 231
1 410
433 99
433 563
433 370
433 149
433 218
433 477
433 170
433 98
433 299
433 586
433 574
433 51
433 667
433 539
433 659
433 6...

output:

1 410 231 533 420 84 253 166 662 695 694 12 730 615 659 539 667 51 574 586 299 98 170 477 218 149 370 2 563 461 99 750 749 748 747 746 745 744 743 742 741 740 739 738 737 736 735 734 733 732 731 729 728 727 726 725 724 723 722 721 720 719 718 717 716 715 714 713 712 711 710 709 708 707 706 705 704 7...

result:

ok qwq

Test #37:

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

input:

750 1924
1 211
1 576
1 697
1 175
1 675
1 641
1 301
1 227
1 311
1 669
1 637
1 673
1 245
1 548
1 74
1 740
1 134
1 561
1 90
1 185
1 511
1 57
1 478
1 423
1 310
1 741
1 550
1 7
1 712
1 725
1 293
1 361
1 593
1 558
1 414
1 356
1 94
1 120
1 700
1 60
1 434
1 226
1 647
1 453
1 328
1 221
1 28
1 352
1 11
1 654
...

output:

1 91 750 749 748 747 745 743 742 741 740 739 738 737 736 735 734 733 732 731 730 729 728 727 726 725 724 723 722 721 720 719 718 717 716 715 714 713 712 711 710 709 708 707 706 705 704 703 702 701 700 699 698 697 696 695 694 693 692 691 690 688 687 686 685 684 683 682 681 679 678 677 676 675 674 673...

result:

ok qwq

Test #38:

score: 0
Accepted
time: 4ms
memory: 13328kb

input:

750 244699
1 235
1 228
1 716
1 27
1 55
1 706
1 313
1 247
1 131
1 120
1 446
1 25
1 615
1 351
1 712
1 606
1 406
1 324
1 356
1 182
1 622
1 230
1 497
1 511
1 163
1 137
1 630
1 434
1 273
1 350
1 297
1 674
1 605
1 109
1 707
1 101
1 78
1 691
1 133
1 705
1 354
1 115
1 735
1 384
1 211
1 364
1 386
1 663
1 54
...

output:

1 523 502 437 331 148 383 347 387 548 196 64 718 679 377 142 51 677 209 106 135 18 37 171 14 698 166 382 460 470 121 689 538 651 407 425 638 162 440 342 627 532 666 268 680 53 553 394 123 484 206 665 141 710 578 375 22 272 463 355 673 393 586 57 595 319 86 569 621 390 664 68 451 690 703 464 602 367 ...

result:

ok qwq

Test #39:

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

input:

1500 281624
1 1109
1 1191
1 775
1 218
1 867
1 1135
1 1484
1 72
1 523
1 502
1 1296
1 187
1 1241
1 1178
1 1099
1 305
1 962
1 431
1 813
1 368
1 755
1 722
1 404
1 1092
1 1263
1 999
1 704
1 1096
1 1234
1 645
1 504
1 246
1 365
1 624
1 838
1 1061
1 1458
1 430
1 738
1 1349
1 302
1 691
1 1098
1 1437
1 250
1 ...

output:

1 367 1499 1498 1496 1495 1493 1491 1487 1484 1482 1481 1474 1473 1472 1464 1461 1460 1459 1458 1456 1455 1453 1450 1449 1448 1443 1442 1440 1439 1437 1436 1430 1429 1426 1424 1421 1415 1414 1413 1412 1409 1407 1406 1404 1402 1401 1400 1397 1396 1395 1391 1387 1386 1385 1384 1383 1381 1379 1378 1377...

result:

ok qwq

Test #40:

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

input:

1500 281624
1 359
1 429
1 391
1 904
1 152
1 321
1 1361
1 435
1 1043
1 1059
1 669
1 1437
1 548
1 186
1 278
1 416
1 618
1 1472
1 634
1 806
1 503
1 713
1 1197
1 252
1 960
1 1341
1 366
1 302
1 623
1 226
1 52
1 1034
1 448
1 738
1 430
1 408
1 1366
1 874
1 727
1 18
1 240
1 1294
1 301
1 141
1 1046
1 369
1 9...

output:

1 1284 673 985 1144 170 584 145 1111 836 1303 765 246 259 258 649 1024 748 1317 104 1119 339 36 1033 1174 544 1460 464 288 780 698 606 920 899 502 689 1360 1030 722 495 917 1272 1205 1099 447 394 1177 163 635 842 438 1216 682 754 1483 95 285 150 955 805 393 921 62 770 224 668 330 564 732 162 1368 11...

result:

ok qwq

Test #41:

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

input:

1000 250000
1 576
1 827
1 255
1 901
1 254
1 217
1 553
1 531
1 436
1 209
1 339
1 765
1 21
1 610
1 235
1 613
1 495
1 918
1 299
1 512
1 628
1 68
1 4
1 421
1 422
1 858
1 587
1 458
1 154
1 487
1 205
1 687
1 227
1 279
1 394
1 608
1 802
1 656
1 548
1 286
1 752
1 544
1 821
1 328
1 751
1 175
1 801
1 871
1 99...

output:

1 935 705 466 420 397 134 950 216 555 813 285 889 390 723 875 540 860 259 513 927 832 354 183 894 774 981 912 218 574 786 910 139 251 355 764 147 987 913 652 692 696 362 762 694 327 294 707 180 324 686 380 396 702 960 725 127 925 943 86 767 400 238 887 338 274 423 122 178 819 231 176 326 322 356 642...

result:

ok qwq

Test #42:

score: 0
Accepted
time: 8ms
memory: 12792kb

input:

750 235576
1 584
1 479
1 457
1 589
1 456
1 195
1 284
1 120
1 220
1 340
1 566
1 134
1 661
1 666
1 742
1 702
1 563
1 246
1 370
1 415
1 388
1 159
1 532
1 209
1 121
1 157
1 573
1 272
1 77
1 454
1 487
1 471
1 545
1 600
1 256
1 262
1 612
1 58
1 131
1 607
1 403
1 124
1 691
1 571
1 534
1 740
1 43
1 482
1 19...

output:

1 576 507 323 213 301 258 541 559 35 514 238 327 132 443 673 266 494 546 228 310 459 504 396 89 649 68 281 714 283 62 700 741 30 171 436 337 175 698 544 389 227 493 670 567 212 15 426 608 87 651 316 27 430 467 452 166 747 522 105 371 445 719 681 303 289 196 512 263 490 344 604 179 126 254 243 574 63...

result:

ok qwq

Test #43:

score: 0
Accepted
time: 8ms
memory: 12120kb

input:

1000 250000
1 54
1 332
1 325
1 717
1 164
1 931
1 373
1 578
1 788
1 290
1 900
1 610
1 646
1 531
1 188
1 600
1 448
1 625
1 728
1 320
1 461
1 204
1 558
1 665
1 629
1 869
1 100
1 340
1 268
1 715
1 338
1 608
1 353
1 777
1 264
1 771
1 835
1 169
1 276
1 601
1 895
1 661
1 507
1 611
1 568
1 475
1 863
1 510
1...

output:

1 580 767 518 945 255 762 693 621 698 668 358 989 363 73 746 532 454 281 305 509 298 753 599 795 749 122 851 841 673 316 249 160 513 174 941 408 970 616 80 691 703 899 993 866 495 496 832 234 185 503 480 933 370 757 846 171 951 194 921 89 132 74 488 613 369 719 605 354 508 655 387 350 446 789 607 15...

result:

ok qwq

Test #44:

score: 0
Accepted
time: 4ms
memory: 13796kb

input:

700 226506
1 663
1 483
1 532
1 537
1 492
1 641
1 648
1 208
1 472
1 266
1 662
1 91
1 379
1 463
1 297
1 61
1 23
1 530
1 12
1 411
1 322
1 17
1 654
1 451
1 329
1 351
1 162
1 283
1 501
1 643
1 403
1 627
1 386
1 251
1 19
1 92
1 350
1 69
1 55
1 65
1 73
1 528
1 432
1 371
1 597
1 605
1 202
1 498
1 177
1 222
...

output:

1 30 296 602 272 74 5 368 684 141 700 634 275 363 209 695 300 360 616 122 474 405 34 261 656 693 144 52 418 486 420 559 42 221 366 552 187 235 625 589 639 394 469 506 286 47 392 454 477 586 337 207 281 355 346 22 509 81 673 8 596 336 172 609 649 216 240 212 107 354 59 541 262 465 291 176 414 106 274...

result:

ok qwq

Test #45:

score: 0
Accepted
time: 4ms
memory: 13860kb

input:

1000 249494
933 199
933 48
933 238
933 122
933 17
933 573
933 592
933 505
933 784
933 165
933 840
933 809
933 676
933 565
933 353
933 819
933 425
933 423
933 185
933 733
933 580
933 870
933 257
933 735
933 629
933 114
933 200
933 181
933 1000
933 951
933 538
933 658
933 318
933 171
933 841
933 258
9...

output:

1 17 48 122 199 238 933 573 618 592 787 505 453 784 663 165 858 840 564 809 38 676 958 565 230 353 39 819 444 425 995 423 130 185 874 733 558 580 57 870 188 257 75 735 30 629 836 114 337 200 125 181 42 1000 930 951 61 538 834 658 966 318 81 171 815 841 392 258 333 575 943 168 236 794 406 551 134 523...

result:

ok qwq

Test #46:

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

input:

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

output:

1 5 3 4 2 

result:

ok qwq

Test #47:

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

input:

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

output:

1 199999 199997 199995 199993 199991 199989 199987 199985 199983 199981 199979 199977 199975 199973 199971 199969 199967 199965 199963 199961 199959 199957 199955 199953 199951 199949 199947 199945 199943 199941 199939 199937 199935 199933 199931 199929 199927 199925 199923 199921 199919 199917 1999...

result:

ok qwq

Test #48:

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

input:

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

output:

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 102 10...

result:

ok qwq

Test #49:

score: 0
Accepted
time: 27ms
memory: 16204kb

input:

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

output:

1 7 9 10 14 15 16 18 19 25 28 29 31 33 35 36 38 39 40 41 42 45 47 50 53 56 59 62 63 65 66 68 70 73 75 77 81 83 84 85 88 89 91 95 99 101 103 106 107 109 111 113 120 121 122 125 133 134 135 137 141 142 143 144 145 147 148 149 154 160 163 164 166 167 168 169 172 173 174 180 181 182 183 184 185 186 188 ...

result:

ok qwq

Test #50:

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

input:

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

output:

1 4 8 19 22 39 45 53 55 57 69 72 86 88 93 110 112 120 122 148 151 155 159 164 165 166 172 180 214 215 218 224 230 252 269 273 277 283 287 308 309 310 342 345 365 375 377 388 397 398 421 425 426 438 440 445 460 461 462 463 469 470 475 478 493 498 505 508 512 525 528 537 567 576 577 578 582 591 598 60...

result:

ok qwq

Test #51:

score: 0
Accepted
time: 15ms
memory: 13888kb

input:

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

output:

1 78 87 90 108 142 180 297 306 307 337 424 460 501 511 526 529 546 608 628 640 643 653 731 754 799 830 894 900 967 989 1148 1161 1221 1287 1383 1388 1441 1444 1471 1477 1484 1583 1592 1632 1821 1846 1902 1913 1918 1995 2074 2084 2195 2308 2365 2390 2393 2463 2497 2511 2525 2550 2569 2611 2689 2700 2...

result:

ok qwq

Test #52:

score: 0
Accepted
time: 6ms
memory: 18436kb

input:

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

output:

1 100003 100002 100001 100000 99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 ...

result:

ok qwq

Test #53:

score: 0
Accepted
time: 12ms
memory: 18480kb

input:

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

output:

1 200001 200000 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960 1999...

result:

ok qwq

Test #54:

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

input:

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

output:

1 150002 150001 150000 149999 149998 149997 149996 149995 149994 149993 149992 149991 149990 149989 149988 149987 149986 149985 149984 149983 149982 149981 149980 149979 149978 149977 149976 149975 149974 149973 149972 149971 149970 149969 149968 149967 149966 149965 149964 149963 149962 149961 1499...

result:

ok qwq

Test #55:

score: 0
Accepted
time: 32ms
memory: 18836kb

input:

277777 299999
83480 84066
89447 138053
22019 117298
177566 275000
1 102260
1 243393
1 72575
1 158614
242036 131536
16114 153213
1 14416
173641 89066
64085 248261
25577 106882
137668 220979
226900 232508
180916 268690
1 197089
136413 2874
218273 106977
1 28628
1 66331
264247 167205
165667 194678
1 12...

output:

1 262144 135088 113787 241913 89644 87051 76714 206769 193994 187684 201384 4707 135899 118976 226178 235826 119384 133165 25937 151669 101771 254521 81213 255054 158255 210497 206863 270176 232746 113152 150297 123322 185332 198473 257377 4072 90419 224104 212984 244128 262361 102640 109303 178524 ...

result:

ok qwq

Test #56:

score: 0
Accepted
time: 8ms
memory: 12920kb

input:

1001 250000
277 821
646 178
815 340
54 841
141 706
257 155
376 969
1001 332
91 196
51 67
737 60
450 656
138 756
494 937
999 428
991 148
648 556
807 776
345 146
639 829
748 617
987 746
21 853
897 84
435 634
789 739
971 995
416 785
499 451
734 530
811 941
398 633
819 855
293 32
435 582
507 32
355 321
...

output:

1 925 246 32 978 966 362 645 628 98 408 997 866 524 926 553 805 184 695 594 445 186 539 675 590 477 864 578 225 201 89 604 627 268 341 907 933 884 681 700 856 323 40 43 870 589 348 508 224 643 119 346 999 333 244 586 502 294 180 740 326 420 435 491 193 792 409 279 359 202 63 674 355 799 738 245 329 ...

result:

ok qwq

Test #57:

score: 0
Accepted
time: 15ms
memory: 12092kb

input:

1001 233359
401 540
791 950
167 305
233 735
143 698
614 39
935 923
823 952
864 151
388 360
148 701
962 349
318 698
171 830
127 228
378 521
274 313
544 399
607 221
748 824
250 408
148 316
657 294
608 39
853 39
656 536
951 570
689 558
789 733
723 500
419 320
120 887
348 349
185 212
687 176
154 810
298...

output:

1 4 12 18 19 38 40 43 46 50 52 56 57 62 67 68 69 70 72 83 86 96 97 98 102 108 109 124 126 133 138 149 150 152 160 168 178 181 186 189 190 194 201 204 212 215 221 222 223 229 234 239 241 244 267 268 270 278 280 281 283 284 289 293 294 296 302 307 308 309 313 314 323 325 328 330 331 333 334 336 338 34...

result:

ok qwq

Test #58:

score: 0
Accepted
time: 22ms
memory: 13480kb

input:

2333 300000
625 896
1013 677
1737 1495
2126 2006
861 1177
719 967
1453 1465
43 2030
2089 1048
353 2229
844 1617
1471 2027
1126 2277
62 2198
799 397
470 1359
1266 252
2236 412
46 1548
783 1113
2231 1558
968 1599
1721 746
1032 939
2089 2117
1921 967
302 1581
343 1515
1371 1713
1532 464
864 1687
1894 7...

output:

1 4 17 20 23 26 28 29 31 35 43 44 55 56 58 63 75 77 80 86 88 89 107 121 126 127 133 146 150 153 158 159 160 166 170 173 182 185 186 199 204 213 224 230 234 241 242 254 261 263 265 266 272 278 286 290 293 296 302 309 320 324 329 330 331 332 333 337 341 343 346 351 361 363 365 368 369 374 380 383 387 ...

result:

ok qwq

Test #59:

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

input:

41337 289303
5168 20449
19925 39393
41187 16784
41187 34827
25451 30122
38242 23752
5168 9331
38242 34141
25451 30641
41187 28920
19925 12908
38242 8286
41187 34195
28038 1113
23216 9730
38242 27780
41187 6968
19925 33368
41187 40415
41187 2367
41187 12706
41187 7031
38242 23805
19925 9172
38242 336...

output:

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 102 10...

result:

ok qwq

Test #60:

score: 0
Accepted
time: 15ms
memory: 17004kb

input:

99999 299985
26299 90867
51122 17693
81891 51018
26299 98987
26299 66077
81891 54919
51122 65487
51122 27865
26299 23884
81891 36921
51122 22704
26299 3538
26299 82595
81891 70563
26299 63110
81891 58335
51122 67974
81891 94538
51122 30153
26299 11592
51122 99077
26299 38022
51122 21128
81891 19911
...

output:

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 102 10...

result:

ok qwq

Test #61:

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

input:

102311 300000
84558 28122
73800 60160
16887 2984
73800 2740
48666 79181
84558 49101
73800 66332
48666 87065
73800 20123
85294 20372
48666 10539
85294 68529
73800 72419
73800 65059
16887 91344
48666 4996
85294 98487
73800 81170
85294 77951
48666 67637
48666 60644
73800 50867
48666 23902
73800 52178
4...

output:

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 102 10...

result:

ok qwq

Test #62:

score: 0
Accepted
time: 12ms
memory: 17120kb

input:

149999 299992
139174 24744
139174 38713
32325 41832
139174 30995
139174 46952
139174 54496
139174 89954
32325 8291
139174 122154
139174 89004
32325 114391
32325 99295
32325 34620
32325 71999
139174 115054
32325 105559
32325 2277
139174 59806
139174 44962
32325 50155
32325 100720
32325 144804
32325 1...

output:

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 102 10...

result:

ok qwq

Test #63:

score: 0
Accepted
time: 6ms
memory: 13248kb

input:

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

output:

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 102 10...

result:

ok qwq