QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#296009#4996. Icy Itineraryucup-team1005TL 481ms54784kbC++143.1kb2024-01-01 21:53:222024-01-01 21:53:22

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 14636kb

input:

4 4
1 2
1 3
1 4
3 4

output:

1 3 4 2 

result:

ok qwq

Test #2:

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

input:

5 0

output:

1 5 2 4 3 

result:

ok qwq

Test #3:

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

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

result:

ok qwq

Test #4:

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

input:

2 1
1 2

output:

1 2 

result:

ok qwq

Test #5:

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

input:

2 0

output:

1 2 

result:

ok qwq

Test #6:

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

input:

3 1
1 3

output:

1 3 2 

result:

ok qwq

Test #7:

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

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 2 10 4 5 7 9 6 8 

result:

ok qwq

Test #8:

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

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

result:

ok qwq

Test #9:

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

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 9 11 8 2 4 15 14 7 10 6 3 5 12 13 

result:

ok qwq

Test #10:

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

input:

15 1
13 6

output:

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

result:

ok qwq

Test #11:

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

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 141 94 140 67 22 63 21 111 115 149 81 45 131 71 109 49 28 13 73 70 92 31 130 79 118 78 23 52 59 12 138 122 10 113 41 147 108 40 133 102 35 87 25 33 98 17 15 4 30 2 97 80 34 54 44 60 8 116 127 95 69 29 55 137 27 135 39 32 20 26 5 119 136 99 126 104 124 123 64 85 37 143 18 91 142 101 24 83 100 146 1...

result:

ok qwq

Test #12:

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

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 459 1314 1242 715 642 24 654 66 63 21 347 1436 149 219 1171 131 1365 628 993 644 1403 73 834 785 850 1346 650 1274 224 547 794 1193 325 1438 418 250 994 1030 673 528 755 1431 133 478 1108 222 1411 953 594 359 813 1033 289 1332 403 1047 955 889 203 661 571 297 294 835 723 1328 1329 826 974 639...

result:

ok qwq

Test #13:

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

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 909 8316 6872 4410 13802 8650 5699 5039 11118 11170 14600 3161 12887 3260 5689 13780 13714 10659 12167 5723 10501 14906 9491 13784 1751 13412 13929 4616 794 6060 325 4426 418 250 12839 12516 11658 10644 10532 1431 9250 12959 3282 12609 4727 7862 6783 2894 12938 2649 5803 10557 5066 1047 5509...

result:

ok qwq

Test #14:

score: 0
Accepted
time: 24ms
memory: 16272kb

input:

300000 0

output:

1 91641 287710 73214 24027 262665 254316 261276 68976 57703 70680 87308 58239 2041 247432 252849 237080 263561 274032 138425 100879 42030 245067 125009 41281 107598 196376 173783 104690 213370 140795 80940 205627 24253 46204 264124 103311 89834 227323 183207 223043 287178 295281 175859 292272 298275...

result:

ok qwq

Test #15:

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

input:

300000 1
80856 110687

output:

1 91641 287710 73214 24027 262665 254316 261276 68976 57703 70680 87308 58239 2041 247432 252849 237080 263561 274032 138425 100879 42030 245067 125009 41281 107598 196376 173783 104690 213370 140795 80940 205627 24253 46204 264124 103311 89834 227323 183207 223043 287178 295281 175859 292272 298275...

result:

ok qwq

Test #16:

score: 0
Accepted
time: 29ms
memory: 16276kb

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 91641 287710 73214 24027 262665 254316 261276 68976 57703 70680 87308 58239 2041 247432 252849 237080 263561 274032 138425 100879 42030 245067 125009 41281 107598 196376 173783 104690 213370 140795 80940 205627 24253 46204 264124 103311 89834 227323 183207 223043 287178 295281 175859 292272 298275...

result:

ok qwq

Test #17:

score: 0
Accepted
time: 140ms
memory: 30236kb

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 132201 91641 287710 73214 24027 262665 254316 261276 68976 57703 70680 87308 58239 2041 247432 252849 237080 263561 274032 138425 100879 42030 245067 125009 41281 107598 196376 173783 104690 213370 140795 80940 205627 24253 46204 264124 103311 89834 227323 183207 223043 287178 295281 175859 292272...

result:

ok qwq

Test #18:

score: 0
Accepted
time: 481ms
memory: 52776kb

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 208399 87341 107766 99483 234142 245800 91641 287710 73214 24027 262665 254316 261276 68976 57703 70680 87308 58239 2041 247432 252849 237080 263561 274032 138425 100879 42030 245067 125009 41281 107598 196376 173783 104690 213370 140795 80940 205627 24253 46204 264124 103311 89834 227323 183207 2...

result:

ok qwq

Test #19:

score: 0
Accepted
time: 351ms
memory: 46460kb

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 21 913 149 644 386 834 785 850 934 650 983 332 325 718 418 250 729 673 178 755 592 133 682 222 414 953 359 813 234 421 289 403 80 955 889 571 297 294 835 723 341 55 826 974 790 878 233 32 64 949 903 478 384 517 700 126 803 37 427 810 278 439 854 920 630 563 505 750 885 604 988 645 756 48 820 225 2...

result:

ok qwq

Test #20:

score: 0
Accepted
time: 317ms
memory: 44396kb

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 392 63 225 347 1436 101 149 23 219 1403 850 650 1274 994 528 992 755 813 403 297 723 974 1169 864 240 233 615 727 1213 1324 1255 1434 279 246 509 1139 1318 445 1311 1369 1051 573 1420 1433 1466 1124 1056 1306 837 539 405 326 237 1429 1333 1226 1010 1128 713 900 146 1336 558 918 972 601 338 772 110...

result:

ok qwq

Test #21:

score: 0
Accepted
time: 350ms
memory: 47268kb

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 1622 3245 4574 9205 4023 1983 5172 8264 4589 1103 1674 5985 4954 8602 6243 5355 8847 5168 9149 3606 9482 2228 5662 6246 4481 1702 1731 6164 7644 6299 4049 8220 9666 2994 613 9337 8570 9627 5214 1198 681 4003 8442 9194 5344 6392 8746 8491 9838 5282 8443 2713 8061 5639 3808 6506 3333 9607 9367 2383 ...

result:

ok qwq

Test #22:

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

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

result:

ok qwq

Test #23:

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

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

result:

ok qwq

Test #24:

score: 0
Accepted
time: 122ms
memory: 45764kb

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 63 21 347 913 149 219 948 262 628 993 644 386 834 785 850 572 650 983 224 547 794 325 718 418 250 729 673 528 755 40 133 478 421 289 2 80 955 203 661 571 297 294 723 341 727 517 605 700 126 342 803 37 427 544 810 439 726 854 630 563 505 750 885 96 988 11 756 225 158 812 979 384 984 934 484 402 745...

result:

ok qwq

Test #25:

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

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 1171 131 644 2500 834 785 605 700 2671 1441 539 2515 2702 170 2831 713 1798 738 1447 2673 2464 1839 2525 1235 2167 2572 88 1187 1912 1446 1813 1131 2945 1560 1765 2710 2805 304 2345 2560 196 758 2613 2787 280 1374 1710 2695 319 479 1259 1045 2455 1804 2958 962 1172 273 2828 2956 1861 2284 2763 223...

result:

ok qwq

Test #26:

score: 0
Accepted
time: 125ms
memory: 46880kb

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 9798 4506 1131 7402 6149 4231 8835 9781 3859 8657 1488 1190 6572 7322 4573 8363 4623 8421 3419 3272 9659 9830 8934 1198 707 3970 4595 9257 9532 1963 6566 4788 2145 785 4505 2984 5399 8893 5837 7774 5394 739 4607 548 9652 6103 5337 7007 9020 1248 2428 1641 7531 6714 2349 5504 2560 3292 6820 6956 56...

result:

ok qwq

Test #27:

score: 0
Accepted
time: 150ms
memory: 46820kb

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 8681 39593 1513 36448 31561 12870 23833 35247 39633 27732 15643 8968 5018 22793 6611 12719 38222 5039 11118 11170 14600 3161 16798 38140 34851 13780 13714 28806 12167 35778 10501 14906 27326 13784 29400 30101 16412 4616 26298 6060 33998 4426 418 37334 22445 12516 15768 25912 10532 1431 23489 34798...

result:

ok qwq

Test #28:

score: 0
Accepted
time: 162ms
memory: 47332kb

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 97406 33101 15583 6355 10856 85110 91641 90388 73214 24027 76458 28526 6117 68976 57703 70680 87308 58239 2041 81493 76025 82498 95718 65715 67435 87526 42030 29193 34463 41281 68189 80291 9095 89182 32176 10574 80940 54465 24253 46204 81076 45467 89834 48318 11837 66152 82603 94444 80810 75...

result:

ok qwq

Test #29:

score: 0
Accepted
time: 210ms
memory: 54784kb

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 114068 91641 287710 73214 24027 262665 254316 261276 68976 57703 70680 87308 58239 2041 247432 252849 237080 263561 274032 138425 100879 42030 245067 125009 41281 107598 196376 173783 104690 213370 140795 80940 205627 24253 46204 264124 103311 89834 227323 183207 223043 287178 295281...

result:

ok qwq

Test #30:

score: 0
Accepted
time: 137ms
memory: 39040kb

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 347 913 219 948 131 628 993 850 224 794 418 250 528 133 222 414 359 813 421 2 955 203 297 723 341 826 949 903 517 605 930 64 803 37 427 911 810 278 439 726 920 563 719 505 885 988 592 820 225 158 812 979 877 246 934 509 16 76 114 50 445 334 419 866 804 600 401 535 701 761 757 643 647 837 8 91 406 ...

result:

ok qwq

Test #31:

score: 0
Accepted
time: 143ms
memory: 38920kb

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 63 597 149 650 224 729 673 579 421 135 39 630 563 150 592 107 658 322 625 206 677 172 584 146 43 574 651 227 683 191 98 705 614 249 518 268 591 655 305 604 344 139 657 596 688 85 451 273 181 351 315 129 554 4 368 691 254 357 681 398 47 740 292 330 112 306 215 476 410 15 627 311 670 516 720 307 125...

result:

ok qwq

Test #32:

score: 0
Accepted
time: 141ms
memory: 38872kb

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 332 325 403 80 661 297 339 723 662 298 26 517 64 342 427 646 241 156 656 600 290 706 72 710 86 361 508 249 185 654 519 578 591 527 396 252 629 596 688 676 93 487 415 495 382 117 287 609 94 598 218 102 177 162 477 120 372 542 379 611 732 174 501 717 196 373 389 583 735 330 161 586 45 504 627 573 53...

result:

ok qwq

Test #33:

score: 0
Accepted
time: 46ms
memory: 25320kb

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 21 347 597 219 686 131 262 424 644 730 546 224 547 325 718 418 250 442 673 528 133 478 682 222 354 594 359 421 289 2 403 80 204 494 203 661 571 297 294 339 723 39 233 32 180 231 385 64 342 37 427 646 544 278 642 726 369 241 156 630 563 750 74 96 150 592 11 82 48 66 225 158 323 57 395 384 145 279 2...

result:

ok qwq

Test #34:

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

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 63 21 347 597 149 219 686 131 262 628 424 386 73 546 251 572 650 224 547 52 332 325 718 418 250 255 40 133 478 682 222 354 594 579 421 289 2 403 80 204 494 203 661 571 723 341 55 662 298 639 135 233 32 180 26 727 517 605 700 126 231 385 324 737 64 342 140 37 427 646 544 142 278 642 439 726 369 241...

result:

ok qwq

Test #35:

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

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 63 730 546 572 650 224 547 332 325 233 32 142 278 145 279 246 110 334 568 690 30 33 511 105 396 481 165 329 377 54 124 259 740 292 430 211 493 488 307 257 450 284 692 101 749 497 113 741 302 660 743 366 684 308 320 739 265 21 347 597 149 219 686 131 262 628 424 644 386 73 251 593 52 718 418 250 44...

result:

ok qwq

Test #36:

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

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 63 21 347 597 149 219 686 131 262 628 424 644 386 73 730 546 251 572 650 593 224 547 52 332 325 718 418 250 442 729 673 528 255 40 133 478 682 222 414 354 594 359 579 421 289 2 403 80 204 494 203 661 571 297 294 339 723 341 55 662 298 639 135 39 233 32 180 26 727 517 605 700 126 231 385 324 737 64...

result:

ok qwq

Test #37:

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

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 63 551 21 202 347 597 149 220 219 686 131 262 628 424 644 386 73 730 546 251 572 650 593 224 547 52 332 325 718 418 250 442 729 673 528 255 40 133 478 682 222 414 354 594 359 579 421 289 2 403 80 204 494 203 661 571 297 294 339 723 341 55 662 298 639 135 39 233 32 180 26 727 517 605 700 126 231 38...

result:

ok qwq

Test #38:

score: 0
Accepted
time: 144ms
memory: 39740kb

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 21 347 686 131 593 224 332 325 718 180 26 646 544 74 96 66 225 145 279 110 90 535 677 507 405 237 170 176 556 659 35 28 213 591 527 105 396 252 447 510 165 329 482 470 95 565 415 495 178 624 441 358 555 607 103 590 632 731 254 335 130 553 87 357 370 196 258 327 513 709 631 169 340 275 89 276 7 44 ...

result:

ok qwq

Test #39:

score: 0
Accepted
time: 166ms
memory: 43784kb

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 63 1436 149 219 1171 131 1365 628 993 644 1403 1346 650 1274 224 250 994 1030 673 528 755 1431 133 478 594 359 813 1033 1332 403 1047 955 889 203 661 723 1328 1329 974 639 1041 233 32 903 727 1439 605 700 126 385 324 1359 37 1324 1255 1209 1395 278 1444 563 719 885 96 988 592 645 11 756 1500 820 1...

result:

ok qwq

Test #40:

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

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 63 21 347 1436 149 219 1171 131 1365 993 644 1403 73 850 1346 1274 224 547 794 1193 325 1438 418 250 994 1030 133 478 1108 222 1411 953 594 813 1033 289 1332 203 661 571 297 294 835 723 1041 1270 233 32 1439 605 700 126 231 1359 1213 1137 1044 37 1324 1255 1209 1395 278 1444 439 726 854 630 563 71...

result:

ok qwq

Test #41:

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

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 63 347 149 948 131 262 628 386 834 785 572 224 547 794 332 325 729 673 755 40 478 222 594 813 421 2 955 889 571 297 835 723 55 826 974 639 790 949 700 231 385 930 64 803 427 810 439 726 854 920 630 563 719 505 750 885 96 988 592 11 756 48 820 225 979 384 877 246 984 934 484 16 240 445 107 419 675 ...

result:

ok qwq

Test #42:

score: 0
Accepted
time: 129ms
memory: 39484kb

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 347 597 149 686 131 262 628 424 644 386 73 730 546 251 572 650 593 224 547 52 418 250 442 729 673 528 255 40 133 222 414 354 359 579 421 289 2 403 80 204 494 203 661 571 297 294 339 723 341 55 662 298 639 135 39 233 32 180 26 517 605 700 126 231 385 427 646 544 142 278 642 439 726 630 563 719 505 ...

result:

ok qwq

Test #43:

score: -100
Time Limit Exceeded

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:


result: