QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#82651#5594. Greedy Increasing Subsequencesxiaowuc1AC ✓135ms24812kbC++17745b2023-02-28 15:44:032023-02-28 15:44:04

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

7
2 2 1 5 3 4 6

output:

3
2 5 6
2 3 4
1

result:

ok 4 lines

Test #2:

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

input:

7
8 6 7 5 3 0 9

output:

5
8 9
6 7
5
3
0

result:

ok 6 lines

Test #3:

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

input:

1
1

output:

1
1

result:

ok 2 lines

Test #4:

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

input:

2
238746 238746

output:

2
238746
238746

result:

ok 3 lines

Test #5:

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

input:

2
1000000000 999999999

output:

2
1000000000
999999999

result:

ok 3 lines

Test #6:

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

input:

2
999999999 1000000000

output:

1
999999999 1000000000

result:

ok 2 lines

Test #7:

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

input:

100
480 478 477 477 477 476 475 472 472 472 471 471 470 468 467 467 466 463 463 462 460 459 458 457 457 457 457 455 453 453 453 453 451 451 450 448 448 447 447 446 444 443 442 442 441 440 440 439 438 437 435 435 435 434 433 433 432 430 428 427 426 426 425 424 424 424 423 422 421 420 420 419 419 417 ...

output:

100
480
478
477
477
477
476
475
472
472
472
471
471
470
468
467
467
466
463
463
462
460
459
458
457
457
457
457
455
453
453
453
453
451
451
450
448
448
447
447
446
444
443
442
442
441
440
440
439
438
437
435
435
435
434
433
433
432
430
428
427
426
426
425
424
424
424
423
422
421
420
420
419
419
417
...

result:

ok 101 lines

Test #8:

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

input:

1000
6256 6252 6232 6228 6223 6217 6216 6214 6214 6212 6210 6210 6208 6207 6205 6204 6201 6195 6192 6189 6186 6174 6148 6130 6126 6124 6119 6117 6115 6109 6101 6099 6095 6094 6093 6077 6074 6066 6065 6061 6060 6053 6044 6043 6036 6034 6030 6010 5991 5990 5987 5986 5976 5970 5965 5958 5955 5943 5935 ...

output:

1000
6256
6252
6232
6228
6223
6217
6216
6214
6214
6212
6210
6210
6208
6207
6205
6204
6201
6195
6192
6189
6186
6174
6148
6130
6126
6124
6119
6117
6115
6109
6101
6099
6095
6094
6093
6077
6074
6066
6065
6061
6060
6053
6044
6043
6036
6034
6030
6010
5991
5990
5987
5986
5976
5970
5965
5958
5955
5943
5935
...

result:

ok 1001 lines

Test #9:

score: 0
Accepted
time: 128ms
memory: 24812kb

input:

200000
101234 101233 101232 101232 101232 101231 101231 101230 101230 101230 101229 101227 101227 101227 101226 101226 101226 101222 101222 101222 101221 101221 101221 101220 101220 101220 101220 101220 101220 101219 101219 101218 101218 101217 101217 101216 101215 101215 101215 101215 101215 101214...

output:

200000
101234
101233
101232
101232
101232
101231
101231
101230
101230
101230
101229
101227
101227
101227
101226
101226
101226
101222
101222
101222
101221
101221
101221
101220
101220
101220
101220
101220
101220
101219
101219
101218
101218
101217
101217
101216
101215
101215
101215
101215
101215
101214...

result:

ok 200001 lines

Test #10:

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

input:

100
991472819 991152223 990258111 984558133 964406046 961040770 941425019 939617817 912128613 907395137 904584779 899650944 890519443 886119717 882043706 874527132 871479690 858378322 856776201 853176975 851826327 813471023 785430573 758664544 757345667 757292285 751861428 750892139 733900803 729580...

output:

100
991472819
991152223
990258111
984558133
964406046
961040770
941425019
939617817
912128613
907395137
904584779
899650944
890519443
886119717
882043706
874527132
871479690
858378322
856776201
853176975
851826327
813471023
785430573
758664544
757345667
757292285
751861428
750892139
733900803
729580...

result:

ok 101 lines

Test #11:

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

input:

904
6262 6259 6256 6250 6245 6244 6243 6239 6238 6230 6221 6219 6216 6210 6207 6197 6188 6187 6183 6182 6181 6174 6163 6152 6147 6144 6135 6133 6125 6115 6114 6112 6104 6096 6069 6068 6052 6050 6046 6038 6036 6034 6030 6020 6019 6015 6013 6008 6007 6005 5996 5958 5947 5933 5929 5928 5909 5907 5905 5...

output:

904
6262
6259
6256
6250
6245
6244
6243
6239
6238
6230
6221
6219
6216
6210
6207
6197
6188
6187
6183
6182
6181
6174
6163
6152
6147
6144
6135
6133
6125
6115
6114
6112
6104
6096
6069
6068
6052
6050
6046
6038
6036
6034
6030
6020
6019
6015
6013
6008
6007
6005
5996
5958
5947
5933
5929
5928
5909
5907
5905
5...

result:

ok 905 lines

Test #12:

score: 0
Accepted
time: 135ms
memory: 24776kb

input:

199985
999998633 999978006 999977602 999977139 999972938 999971205 999961124 999940457 999937782 999934920 999931022 999929521 999923492 999906832 999899471 999886543 999883215 999882210 999880908 999880744 999871002 999869072 999864886 999857051 999842324 999833913 999832784 999830670 999825578 999...

output:

199985
999998633
999978006
999977602
999977139
999972938
999971205
999961124
999940457
999937782
999934920
999931022
999929521
999923492
999906832
999899471
999886543
999883215
999882210
999880908
999880744
999871002
999869072
999864886
999857051
999842324
999833913
999832784
999830670
999825578
999...

result:

ok 199986 lines

Test #13:

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

input:

100
400 401 401 402 402 403 404 405 405 405 407 407 407 407 408 409 409 410 410 411 412 412 412 414 415 415 415 415 416 417 418 419 420 420 421 422 423 423 424 424 425 426 426 428 428 430 432 432 433 433 435 436 438 439 439 442 442 443 444 445 445 445 445 447 449 449 450 450 452 453 454 454 455 456 ...

output:

4
400 401 402 403 404 405 407 408 409 410 411 412 414 415 416 417 418 419 420 421 422 423 424 425 426 428 430 432 433 435 436 438 439 442 443 444 445 447 449 450 452 453 454 455 456 458 459 460 461 464 465 467 468 469 471 472 473 475 476 477 478 479
401 402 405 407 409 410 412 415 420 423 424 426 42...

result:

ok 5 lines

Test #14:

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

input:

1000
1235 1239 1242 1244 1246 1256 1257 1261 1267 1272 1286 1290 1291 1295 1300 1302 1307 1307 1315 1318 1321 1331 1341 1350 1355 1355 1361 1361 1367 1369 1374 1377 1380 1383 1399 1403 1403 1406 1415 1420 1424 1430 1432 1436 1449 1455 1457 1457 1460 1470 1480 1489 1490 1496 1498 1498 1503 1516 1517 ...

output:

4
1235 1239 1242 1244 1246 1256 1257 1261 1267 1272 1286 1290 1291 1295 1300 1302 1307 1315 1318 1321 1331 1341 1350 1355 1361 1367 1369 1374 1377 1380 1383 1399 1403 1406 1415 1420 1424 1430 1432 1436 1449 1455 1457 1460 1470 1480 1489 1490 1496 1498 1503 1516 1517 1518 1524 1539 1541 1544 1547 155...

result:

ok 5 lines

Test #15:

score: 0
Accepted
time: 64ms
memory: 5500kb

input:

200000
1234 1235 1235 1235 1237 1237 1237 1237 1238 1238 1238 1239 1239 1239 1240 1241 1241 1242 1242 1243 1243 1243 1243 1243 1243 1245 1246 1249 1249 1249 1250 1251 1251 1251 1252 1252 1252 1253 1253 1254 1254 1254 1255 1256 1256 1257 1257 1257 1259 1260 1264 1264 1264 1264 1264 1266 1266 1267 126...

output:

10
1234 1235 1237 1238 1239 1240 1241 1242 1243 1245 1246 1249 1250 1251 1252 1253 1254 1255 1256 1257 1259 1260 1264 1266 1267 1268 1269 1270 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1288 1289 1290 1291 1292 1293 1294 1295 1296 1298 1299 1301 1302 1303 1304 1305 13...

result:

ok 11 lines

Test #16:

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

input:

100
1227090 15077163 43469774 66872193 67628852 79180333 86378037 97942385 100149904 101823754 106046332 108127102 149544007 150050892 153002189 157798603 205156724 219556307 234551095 238052748 256211902 261897307 268979134 278009743 279701489 302621085 325679555 333018423 339513622 343656009 34918...

output:

1
1227090 15077163 43469774 66872193 67628852 79180333 86378037 97942385 100149904 101823754 106046332 108127102 149544007 150050892 153002189 157798603 205156724 219556307 234551095 238052748 256211902 261897307 268979134 278009743 279701489 302621085 325679555 333018423 339513622 343656009 3491855...

result:

ok 2 lines

Test #17:

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

input:

916
1235 1236 1242 1249 1259 1260 1264 1265 1270 1282 1286 1292 1297 1303 1308 1309 1310 1312 1313 1315 1316 1323 1335 1337 1345 1355 1359 1360 1362 1369 1373 1390 1399 1401 1402 1403 1411 1414 1433 1435 1441 1443 1447 1452 1457 1460 1462 1470 1474 1480 1485 1499 1506 1509 1514 1520 1522 1524 1528 1...

output:

1
1235 1236 1242 1249 1259 1260 1264 1265 1270 1282 1286 1292 1297 1303 1308 1309 1310 1312 1313 1315 1316 1323 1335 1337 1345 1355 1359 1360 1362 1369 1373 1390 1399 1401 1402 1403 1411 1414 1433 1435 1441 1443 1447 1452 1457 1460 1462 1470 1474 1480 1485 1499 1506 1509 1514 1520 1522 1524 1528 153...

result:

ok 2 lines

Test #18:

score: 0
Accepted
time: 83ms
memory: 5620kb

input:

199983
13143 14080 15282 15753 18635 24999 40762 42728 45484 51346 54078 69170 69786 96244 118577 120660 128230 134428 141003 146039 150843 152018 154391 156596 159103 175188 175792 176162 176530 186821 202657 216029 219142 230103 232417 234076 234760 236964 245371 251168 253388 267554 269753 274306...

output:

1
13143 14080 15282 15753 18635 24999 40762 42728 45484 51346 54078 69170 69786 96244 118577 120660 128230 134428 141003 146039 150843 152018 154391 156596 159103 175188 175792 176162 176530 186821 202657 216029 219142 230103 232417 234076 234760 236964 245371 251168 253388 267554 269753 274306 2786...

result:

ok 2 lines

Test #19:

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

input:

100
363199584 836892543 666297725 38295508 44241330 289504574 175943922 160434248 626475934 310881390 387520526 423904662 588930532 139200900 315043376 123369088 513318028 784391739 257382448 51814876 330583381 192829906 920236023 561620907 782393528 76088442 324990146 432899575 897175440 352746432 ...

output:

16
363199584 836892543 920236023 975663622 987508378 988006422
666297725 784391739 897175440 902854019 960354456
38295508 44241330 289504574 626475934 782393528 856711072 872231259 882595046
175943922 310881390 387520526 423904662 588930532 602186610 751184724 788932867 865563138 867339193
160434248...

result:

ok 17 lines

Test #20:

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

input:

1000
190601225 73167014 819138514 121232113 932969725 422940582 248318283 313400882 671917328 115148869 456698138 673178920 626501156 317080506 581103632 976601239 33425015 607774438 52654567 434077927 796526753 442810621 562391901 394898600 244095106 952552612 832914274 263495187 175078786 70163510...

output:

61
190601225 819138514 932969725 976601239 991611817 993303820 994080147 999021933 999594814
73167014 121232113 422940582 671917328 673178920 796526753 952552612 957281613 957832864 990321658 993908592 997858929 997964784
248318283 313400882 456698138 626501156 832914274 834730439 944906289 94630177...

result:

ok 62 lines

Test #21:

score: 0
Accepted
time: 109ms
memory: 5832kb

input:

200000
924306859 397324097 448079804 952896554 970130787 245545450 529311649 344298107 784605462 622825577 615692176 890481040 284081657 902669522 266487372 448869260 987539557 319314764 204534048 803347007 462214742 250077299 3982025 745570876 304880176 788578064 487257181 121025439 742376652 29513...

output:

880
924306859 952896554 970130787 987539557 999135637 999558107 999581428 999653365 999731726 999769091 999995962 999999707
397324097 448079804 529311649 784605462 890481040 902669522 975546436 992271713 998797097 999517295 999947436 999965265 999979738
245545450 344298107 622825577 803347007 934523...

result:

ok 881 lines

Test #22:

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

input:

100
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

output:

100
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

result:

ok 101 lines

Test #23:

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

input:

1000
98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 98765 9...

output:

1000
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
98765
9...

result:

ok 1001 lines

Test #24:

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

input:

1000
100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 100007 1...

output:

1000
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
100007
1...

result:

ok 1001 lines