QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#534898#4927. Bounded Spanning Treeegypt_ioi2024_02#0 153ms18892kbC++201.3kb2024-08-27 17:17:172024-08-27 17:17:17

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 4
Accepted
time: 149ms
memory: 18892kb

input:

1
500001 500000
254401 281557 349855 349855
181158 183050 7695 7695
168649 393239 182447 182447
275491 426002 407013 407013
412840 430191 81351 81351
180729 474744 468590 468590
167128 233022 352396 352396
56562 410078 411755 411755
28611 28934 27783 27783
250615 303207 495889 495889
348947 377767 2...

output:

YES
349855 7695 182447 407013 81351 468590 352396 411755 27783 495889 279148 126532 371490 46443 75037 440945 17872 376183 227217 256463 268704 93994 142674 221161 313215 423148 348655 110097 61558 138416 182869 460629 101134 233433 485321 293910 161637 31401 388370 43691 103888 258050 186588 285649...

result:

ok all is ok (1 test case)

Test #2:

score: 4
Accepted
time: 153ms
memory: 18248kb

input:

1
300001 500000
146540 236321 23350 23350
110737 197257 49315 49315
87807 244200 2878 2878
27529 179675 90834 90834
39761 204225 209751 209751
175226 239307 945 945
25136 248902 243667 243667
215811 229229 48401 48401
152882 243088 63537 63537
136220 210273 244339 244339
31127 43815 196573 196573
31...

output:

YES
23350 49315 2878 90834 209751 945 243667 48401 63537 244339 196573 170759 346610 33502 342292 86136 71174 153543 40008 300022 342991 305551 95289 63927 127147 133670 78873 57350 134796 242512 238031 153963 69392 220900 21326 171023 3218 211851 322418 63540 88200 109095 157709 6644 136208 86952 2...

result:

ok all is ok (1 test case)

Test #3:

score: 4
Accepted
time: 149ms
memory: 17924kb

input:

1
250001 500000
68287 196901 480106 480106
49342 196901 304518 304518
22416 49342 304522 304522
22416 155670 304523 304523
64466 155670 298516 298516
64466 91061 298511 298511
91061 107764 270019 270019
107764 145633 270023 270023
9967 145633 270022 270022
9967 74786 270020 270020
35298 74786 260981...

output:

YES
480106 304518 304522 304523 298516 298511 270019 270023 270022 270020 260981 260987 260975 260980 260999 260988 260553 260552 260551 255267 255249 255252 255206 255247 255246 255192 255270 255224 255251 255255 255296 255277 255189 255254 255245 255239 255217 255250 255289 255190 255276 255223 25...

result:

ok all is ok (1 test case)

Test #4:

score: 4
Accepted
time: 147ms
memory: 17808kb

input:

1
200001 500000
98193 105041 166701 166701
27762 114229 186133 186133
75089 79073 10507 10507
17865 143051 14801 14801
61475 66112 65966 65966
95929 145141 111474 111474
48331 68416 51667 51667
84658 174834 185681 185681
58072 88891 182212 182212
70612 148690 33041 33041
16155 127708 166666 166666
6...

output:

YES
166701 186133 10507 14801 65966 111474 51667 185681 182212 33041 166666 174410 126973 124348 104 167323 109299 22852 163302 119217 152431 288663 55933 2494 119959 58498 108854 313804 18466 166913 48980 9910 343607 193963 105226 272155 404993 191288 158308 131805 92742 84214 63930 160422 96427 12...

result:

ok all is ok (1 test case)

Test #5:

score: 4
Accepted
time: 137ms
memory: 17484kb

input:

1
100001 500000
27575 40895 44938 44938
3625 19411 38012 38012
3655 84852 11318 11318
1152 91041 28632 28632
221 39962 65491 65491
35918 79361 78583 78583
41888 68339 40937 40937
82334 93242 62129 62129
66333 67583 113798 113798
75883 82560 2019 2019
43643 57947 122462 122462
16229 42734 54831 54831...

output:

YES
44938 38012 11318 28632 65491 78583 40937 62129 113798 2019 122462 54831 63084 16263 70129 58780 69845 51401 33811 865 27448 134237 60986 98507 57992 123479 8086 75165 12759 68854 23507 138812 87299 48771 33602 41920 53104 17098 132939 44566 25731 172500 15616 100033 9986 83815 20839 27119 1501 ...

result:

ok all is ok (1 test case)

Test #6:

score: 4
Accepted
time: 109ms
memory: 5820kb

input:

100
2501 4850
1396 1781 772 772
1019 1580 1529 1529
1146 2063 2944 2944
1883 1912 158 158
443 1995 1378 1378
450 871 504 504
1737 2297 2571 2571
447 1804 3367 3367
1159 1917 1789 1789
1478 2444 2775 2775
1783 2412 479 479
2245 2412 2839 2839
73 1403 4729 4729
747 2463 1469 1469
1107 2377 2034 2034
1...

output:

YES
772 1529 2944 158 1378 504 2571 3367 1789 2775 479 2839 4729 1469 2034 2085 1526 747 1638 1356 2158 979 1042 290 919 1304 1555 430 1380 301 1100 2407 900 4497 1318 958 878 432 667 594 1152 763 552 642 3625 463 2885 2992 1630 851 4742 893 2265 1999 83 348 2176 212 3311 629 3246 1360 2114 186 1457...

result:

ok all is ok (100 test cases)

Test #7:

score: 4
Accepted
time: 108ms
memory: 3592kb

input:

1000
251 483
203 224 371 371
75 104 172 172
147 218 64 64
65 94 6 6
123 131 122 122
17 238 119 119
59 151 27 27
157 239 133 133
67 246 225 225
169 220 138 138
63 212 103 103
2 9 33 33
55 201 191 191
103 181 91 91
12 134 62 62
124 227 315 315
106 243 4 4
158 246 49 49
62 142 202 202
2 139 178 178
133...

output:

YES
371 172 64 6 122 119 27 133 225 138 103 33 191 91 62 315 4 49 202 178 199 182 139 234 284 201 75 156 28 101 143 290 129 233 286 44 160 231 208 25 90 73 104 461 15 56 287 429 83 106 45 115 128 194 17 311 24 71 95 70 50 92 67 111 65 358 80 99 282 382 66 167 147 21 52 125 43 195 48 162 57 170 326 2...

result:

ok all is ok (1000 test cases)

Test #8:

score: 4
Accepted
time: 92ms
memory: 5880kb

input:

10000
26 52
6 26 13 13
8 22 23 23
1 4 8 8
12 26 19 19
2 25 6 6
4 23 3 3
7 11 9 9
8 16 5 5
7 20 7 7
2 5 29 29
12 15 1 1
10 21 10 10
4 16 21 21
4 24 2 2
7 25 30 30
14 15 24 24
17 22 22 22
6 13 18 18
18 24 14 14
15 24 12 12
9 24 43 43
3 20 49 49
7 15 4 4
19 20 11 11
10 18 16 16
21 24 20 20
13 20 45 45
...

output:

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

result:

ok all is ok (10000 test cases)

Test #9:

score: 4
Accepted
time: 82ms
memory: 5688kb

input:

50000
6 12
3 6 8 8
2 6 4 4
3 4 7 7
1 2 1 1
1 5 2 2
2 5 3 3
3 4 12 12
2 6 6 6
1 4 9 9
2 6 5 5
2 5 11 11
4 6 10 10
6 12
3 5 2 2
2 4 3 3
3 4 1 1
4 6 4 4
1 2 5 5
4 5 8 8
2 4 11 11
3 6 12 12
3 5 10 10
2 5 6 6
1 4 9 9
2 4 7 7
6 7
2 3 1 1
3 4 3 3
1 4 2 2
2 5 6 6
3 6 5 5
5 6 7 7
1 2 4 4
6 10
3 5 4 4
1 4 3 3...

output:

YES
8 4 7 1 2 3 12 6 9 5 11 10 
YES
2 3 1 4 5 8 11 12 10 6 9 7 
YES
1 3 2 6 5 7 4 
YES
4 3 5 1 2 7 6 9 8 10 
YES
2 4 5 3 1 10 6 9 11 7 8 
YES
2 6 5 4 1 8 7 10 3 9 
YES
1 6 3 5 2 7 10 12 9 8 4 11 
YES
3 1 10 4 2 7 9 5 11 8 12 6 
YES
5 4 2 8 1 10 7 9 3 11 6 
YES
2 1 5 3 6 4 7 
YES
2 7 1 5 3 8 4 6 
NO
...

result:

ok all is ok (50000 test cases)

Test #10:

score: 4
Accepted
time: 138ms
memory: 18040kb

input:

1
250001 500000
58145 72387 235237 235237
58145 124192 125607 125607
61444 72387 20858 20858
58145 210560 75907 75907
15080 61444 417136 417136
58145 144891 443143 443143
61444 113315 217104 217104
113315 219614 495886 495886
31702 210560 453336 453336
72387 147061 299803 299803
72387 234856 355629 ...

output:

NO

result:

ok all is ok (1 test case)

Test #11:

score: 0
Wrong Answer
time: 1ms
memory: 5604kb

input:

1
3 4
1 2 1 1
2 3 2 2
1 3 4 4
1 3 4 4

output:

YES
1 2 4 4 

result:

wrong answer p is not a permutation (test case 1)

Subtask #2:

score: 0
Wrong Answer

Test #22:

score: 0
Wrong Answer
time: 0ms
memory: 5708kb

input:

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

output:

YES
1 8 5 1 1 6 10 8 6 1 

result:

wrong answer p is not a permutation (test case 1)

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Wrong Answer

Test #45:

score: 0
Wrong Answer
time: 1ms
memory: 5856kb

input:

1
501 500
127 170 433 434
26 98 284 285
179 379 82 82
136 270 253 254
100 391 474 476
175 393 170 171
247 311 223 225
32 318 270 270
87 434 294 294
335 417 308 310
249 356 292 294
327 331 42 44
325 498 334 336
73 133 260 262
276 394 493 495
74 289 330 331
29 83 244 245
7 486 482 483
115 368 90 90
22...

output:

YES
433 284 82 253 474 170 223 270 294 308 292 42 334 260 493 330 244 482 90 277 32 114 416 106 240 385 479 444 125 500 487 305 399 86 474 407 455 458 14 86 41 140 24 127 33 383 27 341 333 381 448 214 346 365 2 25 396 12 499 357 326 310 391 139 366 486 449 361 498 284 436 153 481 412 83 328 84 187 3...

result:

wrong answer p is not a permutation (test case 1)

Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Wrong Answer

Test #93:

score: 0
Wrong Answer
time: 109ms
memory: 5924kb

input:

1000
500 500
100 331 2 8
162 182 272 276
133 415 393 397
144 176 499 500
64 273 47 55
37 463 424 428
96 481 127 127
115 341 333 336
79 95 246 248
266 473 473 476
117 140 113 120
112 309 323 330
251 438 39 45
22 339 275 285
83 474 264 266
185 212 282 291
377 425 25 31
42 436 351 357
35 69 173 182
159...

output:

YES
2 272 393 499 47 424 127 333 246 473 113 323 39 275 264 282 25 351 173 485 147 10 9 345 359 259 18 81 343 371 194 480 454 401 213 86 482 110 275 192 153 487 120 224 155 263 356 367 315 393 29 103 444 392 284 93 202 335 181 240 379 198 303 362 213 94 371 19 300 114 373 344 165 398 81 311 38 363 2...

result:

wrong answer p is not a permutation (test case 1)

Subtask #7:

score: 0
Skipped

Dependency #3:

0%

Subtask #8:

score: 0
Wrong Answer

Test #143:

score: 0
Wrong Answer
time: 90ms
memory: 5688kb

input:

1000
251 500
1 2 280 287
2 3 251 256
3 4 249 249
4 5 252 253
5 6 252 256
6 7 250 250
7 8 254 261
8 9 245 256
9 10 123 127
10 11 45 49
11 12 122 128
12 13 164 167
13 14 153 156
14 15 210 217
15 16 53 64
16 17 205 208
17 18 136 149
18 19 132 135
19 20 24 27
20 21 45 51
21 22 21 30
22 23 5 7
23 24 178 ...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
126 57 69 108 209 107 39 37 19 174 198 205 187 223 219 220 10 218 20 191 57 98 169 84 155 216 237 177 152 35 16 23 106 130 62 115 14 142 227 50 87 212 159 110 91 70 71 148 168 182 201 176 53 187 103 229 19 162 234 67 229 170 17...

result:

wrong answer p is not a permutation (test case 24)

Subtask #9:

score: 0
Skipped

Dependency #7:

0%

Subtask #10:

score: 0
Skipped

Dependency #1:

0%