QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#515292#4930. LCS of Permutationsegypt_ioi2024_05#3 32ms3712kbC++20575b2024-08-11 16:51:592024-08-11 16:51:59

详细

Subtask #1:

score: 3
Accepted

Test #1:

score: 3
Accepted
time: 22ms
memory: 3708kb

input:

632
512 1 1 512 1
201 1 1 201 1
155 1 1 155 1
129 1 1 129 1
345 1 1 345 1
454 1 1 454 1
614 1 1 614 1
11 1 1 11 1
492 1 1 492 1
357 1 1 357 1
300 1 1 300 1
295 1 1 295 1
607 1 1 607 1
442 1 1 442 1
14 1 1 14 1
79 1 1 79 1
584 1 1 584 1
431 1 1 431 1
343 1 1 343 1
64 1 1 64 1
548 1 1 548 1
101 1 1 10...

output:

YES
512 511 510 509 508 507 506 505 504 503 502 501 500 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483 482 481 480 479 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 446 445 444 443 442 441 440 439 ...

result:

ok Correct (632 test cases)

Test #2:

score: 3
Accepted
time: 27ms
memory: 3624kb

input:

1
200000 1 1 200000 1

output:

YES
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 199959 19...

result:

ok Correct (1 test case)

Test #3:

score: 3
Accepted
time: 23ms
memory: 3712kb

input:

2
118278 1 1 118278 1
81722 1 1 81722 1

output:

YES
118278 118277 118276 118275 118274 118273 118272 118271 118270 118269 118268 118267 118266 118265 118264 118263 118262 118261 118260 118259 118258 118257 118256 118255 118254 118253 118252 118251 118250 118249 118248 118247 118246 118245 118244 118243 118242 118241 118240 118239 118238 118237 11...

result:

ok Correct (2 test cases)

Test #4:

score: 3
Accepted
time: 22ms
memory: 3648kb

input:

5
24223 1 1 24223 1
41513 1 1 41513 1
15442 1 1 15442 1
19470 1 1 19470 1
99352 1 1 99352 1

output:

YES
24223 24222 24221 24220 24219 24218 24217 24216 24215 24214 24213 24212 24211 24210 24209 24208 24207 24206 24205 24204 24203 24202 24201 24200 24199 24198 24197 24196 24195 24194 24193 24192 24191 24190 24189 24188 24187 24186 24185 24184 24183 24182 24181 24180 24179 24178 24177 24176 24175 24...

result:

ok Correct (5 test cases)

Test #5:

score: 3
Accepted
time: 26ms
memory: 3628kb

input:

20
11481 1 1 11481 1
53318 1 1 53318 1
13359 1 1 13359 1
8929 1 1 8929 1
15918 1 1 15918 1
509 1 1 509 1
11385 1 1 11385 1
10829 1 1 10829 1
5628 1 1 5628 1
1270 1 1 1270 1
2232 1 1 2232 1
3011 1 1 3011 1
4020 1 1 4020 1
23225 1 1 23225 1
215 1 1 215 1
1094 1 1 1094 1
10463 1 1 10463 1
708 1 1 708 1...

output:

YES
11481 11480 11479 11478 11477 11476 11475 11474 11473 11472 11471 11470 11469 11468 11467 11466 11465 11464 11463 11462 11461 11460 11459 11458 11457 11456 11455 11454 11453 11452 11451 11450 11449 11448 11447 11446 11445 11444 11443 11442 11441 11440 11439 11438 11437 11436 11435 11434 11433 11...

result:

ok Correct (20 test cases)

Test #6:

score: 3
Accepted
time: 26ms
memory: 3644kb

input:

100
1273 1 1 1273 1
1503 1 1 1503 1
2935 1 1 2935 1
4875 1 1 4875 1
2328 1 1 2328 1
2048 1 1 2048 1
4128 1 1 4128 1
2855 1 1 2855 1
6624 1 1 6624 1
2447 1 1 2447 1
2266 1 1 2266 1
1875 1 1 1875 1
2960 1 1 2960 1
2432 1 1 2432 1
8 1 1 8 1
516 1 1 516 1
127 1 1 127 1
5844 1 1 5844 1
2060 1 1 2060 1
10...

output:

YES
1273 1272 1271 1270 1269 1268 1267 1266 1265 1264 1263 1262 1261 1260 1259 1258 1257 1256 1255 1254 1253 1252 1251 1250 1249 1248 1247 1246 1245 1244 1243 1242 1241 1240 1239 1238 1237 1236 1235 1234 1233 1232 1231 1230 1229 1228 1227 1226 1225 1224 1223 1222 1221 1220 1219 1218 1217 1216 1215 1...

result:

ok Correct (100 test cases)

Test #7:

score: 3
Accepted
time: 27ms
memory: 3712kb

input:

10000
13 1 1 13 1
2 1 1 2 1
43 1 1 43 1
5 1 1 5 1
19 1 1 19 1
20 1 1 20 1
15 1 1 15 1
2 1 1 2 1
68 1 1 68 1
9 1 1 9 1
6 1 1 6 1
40 1 1 40 1
6 1 1 6 1
40 1 1 40 1
12 1 1 12 1
21 1 1 21 1
38 1 1 38 1
26 1 1 26 1
1 1 1 1 1
18 1 1 18 1
59 1 1 59 1
16 1 1 16 1
12 1 1 12 1
2 1 1 2 1
12 1 1 12 1
1 1 1 1 1
...

output:

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

result:

ok Correct (10000 test cases)

Test #8:

score: 3
Accepted
time: 30ms
memory: 3620kb

input:

50000
2 1 1 2 1
3 1 1 3 1
5 1 1 5 1
1 1 1 1 1
5 1 1 5 1
2 1 1 2 1
2 1 1 2 1
2 1 1 2 1
2 1 1 2 1
6 1 1 6 1
4 1 1 4 1
3 1 1 3 1
4 1 1 4 1
1 1 1 1 1
2 1 1 2 1
2 1 1 2 1
3 1 1 3 1
3 1 1 3 1
2 1 1 2 1
10 1 1 10 1
1 1 1 1 1
1 1 1 1 1
6 1 1 6 1
1 1 1 1 1
6 1 1 6 1
1 1 1 1 1
5 1 1 5 1
14 1 1 14 1
1 1 1 1 1
...

output:

YES
2 1 1 2 
1 2 
YES
3 2 1 1 2 3 
1 2 3 
YES
5 4 3 2 1 1 2 3 4 5 
1 2 3 4 5 
YES
1 1 
1 
YES
5 4 3 2 1 1 2 3 4 5 
1 2 3 4 5 
YES
2 1 1 2 
1 2 
YES
2 1 1 2 
1 2 
YES
2 1 1 2 
1 2 
YES
2 1 1 2 
1 2 
YES
6 5 4 3 2 1 1 2 3 4 5 6 
1 2 3 4 5 6 
YES
4 3 2 1 1 2 3 4 
1 2 3 4 
YES
3 2 1 1 2 3 
1 2 3 
YES
4 ...

result:

ok Correct (50000 test cases)

Subtask #2:

score: 0
Wrong Answer

Test #9:

score: 0
Wrong Answer
time: 32ms
memory: 3636kb

input:

40011
1 1 1 1 1
2 1 1 1 1
2 1 1 2 1
2 1 2 2 1
2 2 2 2 1
3 1 1 1 1
3 1 1 2 1
3 1 1 3 1
3 1 2 2 1
3 1 2 3 1
3 1 3 3 1
3 2 2 2 1
3 2 2 3 1
3 2 3 3 1
3 3 3 3 1
4 1 1 1 1
4 1 1 2 1
4 1 1 3 1
4 1 1 4 1
4 1 2 2 1
4 1 2 3 1
4 1 2 4 1
4 1 3 3 1
4 1 3 4 1
4 1 4 4 1
4 2 2 2 1
4 2 2 3 1
4 2 2 4 1
4 2 3 3 1
4 2 ...

output:

YES
1 1 
1 
YES
2 1 1 2 
1 2 
YES
2 1 1 2 
1 2 
YES
2 1 1 2 
1 2 
YES
2 1 1 2 
1 2 
YES
3 2 1 1 2 3 
1 2 3 
YES
3 2 1 1 2 3 
1 2 3 
YES
3 2 1 1 2 3 
1 2 3 
YES
3 2 1 1 2 3 
1 2 3 
YES
3 2 1 1 2 3 
1 2 3 
YES
3 2 1 1 2 3 
1 2 3 
YES
3 2 1 1 2 3 
1 2 3 
YES
3 2 1 1 2 3 
1 2 3 
YES
3 2 1 1 2 3 
1 2 3 
...

result:

wrong answer LCS of q and r is not c (test case 2)

Subtask #3:

score: 0
Wrong Answer

Dependency #1:

100%
Accepted

Test #10:

score: 0
Wrong Answer
time: 22ms
memory: 3584kb

input:

7545
31 1 4 31 1
15 8 13 15 1
34 12 18 34 1
9 1 9 9 1
28 5 12 28 1
21 1 11 21 1
33 9 11 33 1
28 10 14 28 1
33 30 30 33 1
33 19 31 33 1
31 2 25 31 1
24 13 18 24 1
22 11 16 22 1
33 20 20 33 1
28 7 8 28 1
31 5 28 31 1
30 17 18 30 1
22 3 9 22 1
12 6 12 12 1
30 7 21 30 1
31 3 10 31 1
34 24 27 34 1
35 21 ...

output:

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

result:

wrong answer LCS of p and r is not b (test case 1)

Subtask #4:

score: 0
Wrong Answer

Dependency #1:

100%
Accepted

Test #34:

score: 0
Wrong Answer
time: 26ms
memory: 3620kb

input:

7545
31 1 1 4 1
15 1 8 13 1
34 1 12 18 1
9 1 1 9 1
28 1 5 12 1
21 1 1 11 1
33 1 9 11 1
28 1 10 14 1
33 1 30 30 1
33 1 19 31 1
31 1 2 25 1
24 1 13 18 1
22 1 11 16 1
33 1 20 20 1
28 1 7 8 1
31 1 5 28 1
30 1 17 18 1
22 1 3 9 1
12 1 6 12 1
30 1 7 21 1
31 1 3 10 1
34 1 24 27 1
35 1 21 26 1
26 1 7 13 1
31...

output:

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

result:

wrong answer LCS of q and r is not c (test case 1)

Subtask #5:

score: 0
Wrong Answer

Test #58:

score: 0
Wrong Answer
time: 27ms
memory: 3580kb

input:

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

output:

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

result:

wrong answer Wrong answer (test case 1)

Subtask #6:

score: 0
Skipped

Dependency #2:

0%