QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#233252#4996. Icy ItineraryMaMengQiWA 178ms48396kbC++20746b2023-10-31 15:45:292023-10-31 15:45:29

詳細信息

Test #1:

score: 100
Accepted
time: 4ms
memory: 19748kb

input:

4 4
1 2
1 3
1 4
3 4

output:

1 4 2 3 

result:

ok qwq

Test #2:

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

input:

5 0

output:

1 2 3 4 5 

result:

ok qwq

Test #3:

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

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

result:

ok qwq

Test #4:

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

input:

2 1
1 2

output:

1 2 

result:

ok qwq

Test #5:

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

input:

2 0

output:

1 2 

result:

ok qwq

Test #6:

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

input:

3 1
1 3

output:

1 2 3 

result:

ok qwq

Test #7:

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

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

result:

ok qwq

Test #8:

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

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

result:

ok qwq

Test #9:

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

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

result:

ok qwq

Test #10:

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

input:

15 1
13 6

output:

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

result:

ok qwq

Test #11:

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

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 15 16 2 17 3 18 4 19 5 20 6 21 7 22 8 23 9 24 10 25 11 26 12 27 13 28 14 29 31 30 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 71 70 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 #12:

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

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 528 529 2 530 3 531 4 532 5 533 6 534 7 535 8 536 9 537 10 538 11 539 12 540 13 541 14 542 15 543 16 544 17 545 18 546 19 547 20 548 21 549 22 550 23 551 24 552 25 553 26 554 27 555 28 556 29 557 30 558 31 559 32 560 33 561 34 562 35 563 36 564 37 565 38 566 39 567 40 568 41 569 42 570 43 571 44 5...

result:

ok qwq

Test #13:

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

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 500 501 2 502 3 503 4 504 5 505 6 506 7 507 8 508 9 509 10 510 11 511 12 512 13 513 14 514 15 515 16 516 17 517 18 518 19 519 20 520 21 521 22 522 23 523 24 524 25 525 26 526 27 527 28 528 29 529 30 530 31 531 32 532 33 533 34 534 35 535 36 536 37 537 38 538 39 539 40 540 41 541 42 542 43 543 44 5...

result:

ok qwq

Test #14:

score: 0
Accepted
time: 14ms
memory: 20376kb

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: 15ms
memory: 20200kb

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: 19ms
memory: 20388kb

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: 39ms
memory: 29564kb

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 230115 230116 2 230117 3 230118 4 230119 5 230120 6 230121 7 230122 8 230123 9 230124 10 230125 11 230126 12 230127 13 230128 14 230129 15 230130 16 230131 17 230132 18 230133 19 230134 20 230135 21 230136 22 230137 23 230138 24 230139 25 230140 26 230141 27 230142 28 230143 29 230144 30 230145 31...

result:

ok qwq

Test #18:

score: 0
Accepted
time: 119ms
memory: 48396kb

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 155793 155794 2 155795 3 155796 4 155797 5 155798 6 155799 7 155800 8 155801 9 155802 10 155803 11 155804 12 155805 13 155806 14 155807 15 155808 16 155809 17 155810 18 155811 19 155812 20 155813 21 155814 22 155815 23 155816 24 155817 25 155818 26 155819 27 155820 28 155821 29 155822 30 155823 31...

result:

ok qwq

Test #19:

score: 0
Accepted
time: 172ms
memory: 47068kb

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 2 23 38 36 41 45 46 50 49 52 71 67 72 66 74 62 75 79 81 77 82 64 85 91 93 88 96 97 94 98 86 99 61 100 101 56 105 108 110 111 113 117 119 125 126 128 130 140 141 142 135 143 138 144 147 155 159 158 160 162 163 164 165 167 170 175 177 172 178 166 180 181 182 184 161 185 187 188 153 190 191 151 192 1...

result:

ok qwq

Test #20:

score: 0
Accepted
time: 178ms
memory: 46800kb

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 9 13 18 17 19 21 20 24 16 25 34 35 36 32 38 39 37 40 30 41 42 43 44 15 49 53 55 58 54 62 61 63 64 60 66 47 70 46 71 29 72 28 73 27 74 75 14 77 12 78 10 80 81 85 94 102 101 104 100 105 98 106 99 107 96 108 93 109 92 110 113 86 114 91 117 119 120 123 122 126 88 127 128 87 130 2 131 133 134 137 138 1...

result:

ok qwq

Test #21:

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

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 109 110 2 111 3 112 4 113 5 114 6 115 7 116 8 117 9 118 10 119 11 120 12 121 13 122 14 123 15 124 16 125 17 126 18 127 19 128 20 129 21 130 22 131 23 132 24 133 25 134 26 135 27 136 28 137 29 138 30 139 31 140 32 141 33 142 34 143 35 144 36 145 37 146 38 147 39 148 40 149 41 150 42 151 43 152 44 1...

result:

ok qwq

Test #22:

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

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

result:

ok qwq

Test #23:

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

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 2 72 3 4 5 6 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 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 

result:

ok qwq

Test #24:

score: 0
Accepted
time: 90ms
memory: 48036kb

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

result:

ok qwq

Test #25:

score: 0
Accepted
time: 84ms
memory: 46912kb

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 40 2 66 3 80 4 88 5 196 6 202 7 206 8 241 9 253 10 255 11 261 12 277 13 280 14 306 15 316 16 317 17 319 18 323 19 364 20 395 21 432 22 441 23 442 24 465 25 539 26 556 27 605 28 624 29 644 30 671 31 798 32 834 33 913 34 957 35 1037 36 1069 37 1085 38 1134 39 1156 41 1171 42 1172 43 1259 44 1269 45 ...

result:

ok qwq

Test #26:

score: 0
Accepted
time: 75ms
memory: 47776kb

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 707 2 1131 3 1488 4 2145 5 2349 6 2428 7 2560 8 3419 9 3859 10 4505 11 4573 12 4595 13 4607 14 4623 15 5337 16 5394 17 5399 18 5837 19 6149 20 6566 21 6572 22 6820 23 7531 24 8835 25 8934 26 9020 27 9532 28 9652 29 9659 30 9798 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 5...

result:

ok qwq

Test #27:

score: 0
Accepted
time: 80ms
memory: 47616kb

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 1513 2 5018 3 8681 4 15643 5 18782 6 23833 7 31561 8 39633 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 ...

result:

ok qwq

Test #28:

score: 0
Accepted
time: 105ms
memory: 47852kb

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 10856 2 15583 3 97406 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 ...

result:

ok qwq

Test #29:

score: 0
Accepted
time: 127ms
memory: 48316kb

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

result:

ok qwq

Test #30:

score: -100
Wrong Answer
time: 74ms
memory: 42180kb

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 27 28 26 1000 998 996 995 994 992 991 989 988 987 984 983 979 974 973 971 966 965 961 960 958 957 953 952 951 950 948 947 945 943 942 941 940 939 938 937 932 931 929 927 926 924 922 919 918 914 913 911 907 906 903 902 901 899 898 896 894 893 892 891 888 886 881 880 878 876 875 873 872 869 868 866 ...

result:

wrong answer Changed color too many times (3)