QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#61727#1807. Distribute the BarsMaMengQiAC ✓12ms3716kbC++171.9kb2022-11-14 17:17:212022-11-14 17:17:23

详细

Test #1:

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

input:

4

output:

2
2 3 5
2 1 7

result:

ok OK (2 groups)

Test #2:

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

input:

2

output:

-1

result:

ok OK (impossible)

Test #3:

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

input:

3

output:

-1

result:

ok OK (impossible)

Test #4:

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

input:

1659

output:

21
79 1 45 89 133 177 221 265 309 353 397 441 485 529 573 617 661 705 749 793 837 881 883 3317 925 3275 967 3233 1009 3191 1051 3149 1093 3107 1135 3065 1177 3023 1219 2981 1261 2939 1303 2897 1345 2855 1387 2813 1429 2771 1471 2729 1513 2687 1555 2645 1597 2603 1639 2561 1681 2519 1723 2477 1765 24...

result:

ok OK (21 groups)

Test #5:

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

input:

8941

output:

-1

result:

ok OK (impossible)

Test #6:

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

input:

458

output:

229
2 457 459
2 455 461
2 453 463
2 451 465
2 449 467
2 447 469
2 445 471
2 443 473
2 441 475
2 439 477
2 437 479
2 435 481
2 433 483
2 431 485
2 429 487
2 427 489
2 425 491
2 423 493
2 421 495
2 419 497
2 417 499
2 415 501
2 413 503
2 411 505
2 409 507
2 407 509
2 405 511
2 403 513
2 401 515
2 399 ...

result:

ok OK (229 groups)

Test #7:

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

input:

5

output:

-1

result:

ok OK (impossible)

Test #8:

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

input:

9

output:

3
3 1 9 17 
3 3 11 13 
3 5 7 15 

result:

ok OK (3 groups)

Test #9:

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

input:

25

output:

5
5 1 13 25 37 49 
5 3 15 27 39 41 
5 5 17 29 31 43 
5 7 19 21 33 45 
5 9 11 23 35 47 

result:

ok OK (5 groups)

Test #10:

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

input:

143

output:

11
13 1 25 49 73 97 121 145 169 193 217 241 243 285 
13 3 27 51 75 99 123 147 171 195 219 221 245 283 
13 5 29 53 77 101 125 149 173 197 199 223 247 281 
13 7 31 55 79 103 127 151 175 177 201 225 249 279 
13 9 33 57 81 105 129 153 155 179 203 227 251 277 
13 11 35 59 83 107 131 133 157 181 205 229 2...

result:

ok OK (11 groups)

Test #11:

score: 0
Accepted
time: 8ms
memory: 3344kb

input:

85849

output:

293
293 1 589 1177 1765 2353 2941 3529 4117 4705 5293 5881 6469 7057 7645 8233 8821 9409 9997 10585 11173 11761 12349 12937 13525 14113 14701 15289 15877 16465 17053 17641 18229 18817 19405 19993 20581 21169 21757 22345 22933 23521 24109 24697 25285 25873 26461 27049 27637 28225 28813 29401 29989 30...

result:

ok OK (293 groups)

Test #12:

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

input:

99991

output:

-1

result:

ok OK (impossible)

Test #13:

score: 0
Accepted
time: 10ms
memory: 3716kb

input:

99997

output:

277
361 1 557 1113 1669 2225 2781 3337 3893 4449 5005 5561 6117 6673 7229 7785 8341 8897 9453 10009 10565 11121 11677 12233 12789 13345 13901 14457 15013 15569 16125 16681 17237 17793 18349 18905 19461 20017 20573 21129 21685 22241 22797 23353 23909 24465 25021 25577 26133 26689 27245 27801 28357 28...

result:

ok OK (277 groups)

Test #14:

score: 0
Accepted
time: 12ms
memory: 3268kb

input:

100000

output:

50000
2 99999 100001
2 99997 100003
2 99995 100005
2 99993 100007
2 99991 100009
2 99989 100011
2 99987 100013
2 99985 100015
2 99983 100017
2 99981 100019
2 99979 100021
2 99977 100023
2 99975 100025
2 99973 100027
2 99971 100029
2 99969 100031
2 99967 100033
2 99965 100035
2 99963 100037
2 99961 1...

result:

ok OK (50000 groups)

Test #15:

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

input:

28454

output:

14227
2 28453 28455
2 28451 28457
2 28449 28459
2 28447 28461
2 28445 28463
2 28443 28465
2 28441 28467
2 28439 28469
2 28437 28471
2 28435 28473
2 28433 28475
2 28431 28477
2 28429 28479
2 28427 28481
2 28425 28483
2 28423 28485
2 28421 28487
2 28419 28489
2 28417 28491
2 28415 28493
2 28413 28495
...

result:

ok OK (14227 groups)

Test #16:

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

input:

64338

output:

32169
2 64337 64339
2 64335 64341
2 64333 64343
2 64331 64345
2 64329 64347
2 64327 64349
2 64325 64351
2 64323 64353
2 64321 64355
2 64319 64357
2 64317 64359
2 64315 64361
2 64313 64363
2 64311 64365
2 64309 64367
2 64307 64369
2 64305 64371
2 64303 64373
2 64301 64375
2 64299 64377
2 64297 64379
...

result:

ok OK (32169 groups)

Test #17:

score: 0
Accepted
time: 11ms
memory: 3504kb

input:

88078

output:

44039
2 88077 88079
2 88075 88081
2 88073 88083
2 88071 88085
2 88069 88087
2 88067 88089
2 88065 88091
2 88063 88093
2 88061 88095
2 88059 88097
2 88057 88099
2 88055 88101
2 88053 88103
2 88051 88105
2 88049 88107
2 88047 88109
2 88045 88111
2 88043 88113
2 88041 88115
2 88039 88117
2 88037 88119
...

result:

ok OK (44039 groups)

Test #18:

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

input:

16831

output:

-1

result:

ok OK (impossible)

Test #19:

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

input:

10880

output:

5440
2 10879 10881
2 10877 10883
2 10875 10885
2 10873 10887
2 10871 10889
2 10869 10891
2 10867 10893
2 10865 10895
2 10863 10897
2 10861 10899
2 10859 10901
2 10857 10903
2 10855 10905
2 10853 10907
2 10851 10909
2 10849 10911
2 10847 10913
2 10845 10915
2 10843 10917
2 10841 10919
2 10839 10921
2...

result:

ok OK (5440 groups)

Test #20:

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

input:

28979

output:

-1

result:

ok OK (impossible)

Test #21:

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

input:

20173

output:

-1

result:

ok OK (impossible)

Test #22:

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

input:

78401

output:

-1

result:

ok OK (impossible)

Test #23:

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

input:

52067

output:

-1

result:

ok OK (impossible)

Test #24:

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

input:

94727

output:

-1

result:

ok OK (impossible)

Test #25:

score: 0
Accepted
time: 5ms
memory: 3592kb

input:

35657

output:

181
197 1 365 729 1093 1457 1821 2185 2549 2913 3277 3641 4005 4369 4733 5097 5461 5825 6189 6553 6917 7281 7645 8009 8373 8737 9101 9465 9829 10193 10557 10921 11285 11649 12013 12377 12741 13105 13469 13833 14197 14561 14925 15289 15653 16017 16381 16745 17109 17473 17837 18201 18565 18929 19293 1...

result:

ok OK (181 groups)

Test #26:

score: 0
Accepted
time: 5ms
memory: 3592kb

input:

41449

output:

181
229 1 365 729 1093 1457 1821 2185 2549 2913 3277 3641 4005 4369 4733 5097 5461 5825 6189 6553 6917 7281 7645 8009 8373 8737 9101 9465 9829 10193 10557 10921 11285 11649 12013 12377 12741 13105 13469 13833 14197 14561 14925 15289 15653 16017 16381 16745 17109 17473 17837 18201 18565 18929 19293 1...

result:

ok OK (181 groups)

Test #27:

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

input:

7367

output:

53
139 1 109 217 325 433 541 649 757 865 973 1081 1189 1297 1405 1513 1621 1729 1837 1945 2053 2161 2269 2377 2485 2593 2701 2809 2917 3025 3133 3241 3349 3457 3565 3673 3781 3889 3997 4105 4213 4321 4429 4537 4645 4753 4861 4969 5077 5185 5293 5401 5509 5617 5619 14733 5725 14627 5831 14521 5937 14...

result:

ok OK (53 groups)

Test #28:

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

input:

12191

output:

73
167 1 149 297 445 593 741 889 1037 1185 1333 1481 1629 1777 1925 2073 2221 2369 2517 2665 2813 2961 3109 3257 3405 3553 3701 3849 3997 4145 4293 4441 4589 4737 4885 5033 5181 5329 5477 5625 5773 5921 6069 6217 6365 6513 6661 6809 6957 7105 7253 7401 7549 7697 7845 7993 8141 8289 8437 8585 8733 88...

result:

ok OK (73 groups)

Test #29:

score: 0
Accepted
time: 6ms
memory: 3568kb

input:

43847

output:

163
269 1 329 657 985 1313 1641 1969 2297 2625 2953 3281 3609 3937 4265 4593 4921 5249 5577 5905 6233 6561 6889 7217 7545 7873 8201 8529 8857 9185 9513 9841 10169 10497 10825 11153 11481 11809 12137 12465 12793 13121 13449 13777 14105 14433 14761 15089 15417 15745 16073 16401 16729 17057 17385 17713...

result:

ok OK (163 groups)

Test #30:

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

input:

20819

output:

109
191 1 221 441 661 881 1101 1321 1541 1761 1981 2201 2421 2641 2861 3081 3301 3521 3741 3961 4181 4401 4621 4841 5061 5281 5501 5721 5941 6161 6381 6601 6821 7041 7261 7481 7701 7921 8141 8361 8581 8801 9021 9241 9461 9681 9901 10121 10341 10561 10781 11001 11221 11441 11661 11881 12101 12321 125...

result:

ok OK (109 groups)

Test #31:

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

input:

9943

output:

61
163 1 125 249 373 497 621 745 869 993 1117 1241 1365 1489 1613 1737 1861 1985 2109 2233 2357 2481 2605 2729 2853 2977 3101 3225 3349 3473 3597 3721 3845 3969 4093 4217 4341 4465 4589 4713 4837 4961 5085 5209 5333 5457 5581 5705 5829 5953 6077 6201 6325 6449 6573 6697 6821 6945 7069 7193 7317 7441...

result:

ok OK (61 groups)

Test #32:

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

input:

1369

output:

37
37 1 77 153 229 305 381 457 533 609 685 761 837 913 989 1065 1141 1217 1293 1369 1445 1521 1597 1673 1749 1825 1901 1977 2053 2129 2205 2281 2357 2433 2509 2585 2661 2737 
37 3 79 155 231 307 383 459 535 611 687 763 839 915 991 1067 1143 1219 1295 1371 1447 1523 1599 1675 1751 1827 1903 1979 2055...

result:

ok OK (37 groups)

Test #33:

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

input:

6241

output:

79
79 1 161 321 481 641 801 961 1121 1281 1441 1601 1761 1921 2081 2241 2401 2561 2721 2881 3041 3201 3361 3521 3681 3841 4001 4161 4321 4481 4641 4801 4961 5121 5281 5441 5601 5761 5921 6081 6241 6401 6561 6721 6881 7041 7201 7361 7521 7681 7841 8001 8161 8321 8481 8641 8801 8961 9121 9281 9441 960...

result:

ok OK (79 groups)

Test #34:

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

input:

841

output:

29
29 1 61 121 181 241 301 361 421 481 541 601 661 721 781 841 901 961 1021 1081 1141 1201 1261 1321 1381 1441 1501 1561 1621 1681 
29 3 63 123 183 243 303 363 423 483 543 603 663 723 783 843 903 963 1023 1083 1143 1203 1263 1323 1383 1443 1503 1563 1623 1625 
29 5 65 125 185 245 305 365 425 485 545...

result:

ok OK (29 groups)

Test #35:

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

input:

69169

output:

263
263 1 529 1057 1585 2113 2641 3169 3697 4225 4753 5281 5809 6337 6865 7393 7921 8449 8977 9505 10033 10561 11089 11617 12145 12673 13201 13729 14257 14785 15313 15841 16369 16897 17425 17953 18481 19009 19537 20065 20593 21121 21649 22177 22705 23233 23761 24289 24817 25345 25873 26401 26929 274...

result:

ok OK (263 groups)

Test #36:

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

input:

121

output:

11
11 1 25 49 73 97 121 145 169 193 217 241 
11 3 27 51 75 99 123 147 171 195 219 221 
11 5 29 53 77 101 125 149 173 197 199 223 
11 7 31 55 79 103 127 151 175 177 201 225 
11 9 33 57 81 105 129 153 155 179 203 227 
11 11 35 59 83 107 131 133 157 181 205 229 
11 13 37 61 85 109 111 135 159 183 207 2...

result:

ok OK (11 groups)