QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#865356 | #8446. Factor-Full Tree | ucup-team1005# | AC ✓ | 1ms | 3712kb | C++14 | 2.2kb | 2025-01-21 17:01:59 | 2025-01-21 17:02:01 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3584kb
input:
5 1 2 1 3 3 4 3 5
output:
1 5 2 6 4
result:
ok correct
Test #2:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
3 1 3 3 2
output:
1 4 2
result:
ok correct
Test #3:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
4 2 4 4 1 3 4
output:
1 6 4 2
result:
ok correct
Test #4:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
5 5 3 2 1 4 5 3 1
output:
1 3 2 8 4
result:
ok correct
Test #5:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
1
output:
1
result:
ok correct
Test #6:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
2 2 1
output:
1 2
result:
ok correct
Test #7:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
60 60 57 41 11 6 11 3 25 26 31 59 25 28 48 15 49 22 34 49 3 1 34 2 12 23 9 20 48 39 52 38 46 57 29 7 36 17 16 56 9 48 25 40 1 18 59 8 3 27 8 44 33 35 25 10 25 14 25 33 26 36 16 58 3 16 1 32 9 4 58 52 54 31 14 53 47 5 27 37 1 11 16 45 57 24 25 54 49 13 24 29 12 55 39 30 15 46 49 12 25 51 9 34 14 47 4...
output:
1 5432 16 26896 35152 867 1083 208 460 808 51 56 6728 4 1504 3 183 31672 10648 7688 10952 218 38180 232 8 100 2704 25544 392 70688 20 33580 500 2 88 57 53 59168 256 67 3009 9 1420 2500 19208 1376 27 248 32 968 10580 128 81 64 512 36340 2744 656 296 244216
result:
ok correct
Test #8:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
60 42 41 8 39 41 51 7 22 10 22 19 57 12 29 52 4 53 51 45 25 21 34 18 16 49 17 5 6 15 36 55 9 13 6 35 23 4 5 22 51 30 52 39 51 17 25 23 40 11 5 9 5 26 10 50 54 31 6 1 58 32 28 44 16 3 47 27 58 14 38 43 37 25 56 40 18 36 18 34 38 24 22 48 34 51 5 54 58 46 33 28 21 37 6 47 46 2 39 33 51 59 37 38 37 60 ...
output:
1 23104 5184 416 32 16 9344 74176 1312 3968 2656 2312 944 404 270848 256 16000 512 2662 22 196 128 2048 3712 3200 123008 206 1372 136 70304 848 9604 192 28 4096 11776 8 4 1216 1024 2368 87616 712 18176 214400 576 1728 2716 80000 3698 64 5408 5056 86 53792 640 242 2 376 107648
result:
ok correct
Test #9:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
59 3 21 28 35 2 50 29 1 52 38 24 41 13 21 7 43 4 58 32 19 31 46 48 22 46 35 53 11 54 32 45 35 12 46 23 5 19 35 41 11 49 8 39 19 6 8 11 21 57 46 40 44 44 21 30 2 58 44 9 19 34 37 8 45 27 10 25 38 1 5 10 31 33 44 21 35 56 9 16 39 5 31 50 47 17 53 20 19 59 35 37 24 43 48 55 39 15 16 22 6 36 13 26 12 47...
output:
1 2000 1488 63888 2 128 2048 64 4592 52 144 136 1392 4096 38416 5488 76176 2544 112 7952 48 256 178 1296 153328 2312 676 1328 97 10000 4 4816 31152 11664 16 40368 3888 4144 784 32208 432 46128 1024 528 32 8 80 512 5056 400 5776 277648 3312 207088 57232 188272 376 5808 304
result:
ok correct
Test #10:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
60 13 34 43 35 54 40 55 7 24 18 22 28 45 37 21 41 36 2 4 30 9 15 17 25 19 6 49 37 33 60 56 35 58 60 50 47 1 39 35 57 60 31 27 39 11 20 41 30 57 19 51 59 32 1 59 42 23 11 29 58 15 20 14 51 53 29 26 33 18 39 20 36 7 52 40 45 10 8 30 28 42 12 8 14 5 17 44 7 16 4 28 56 2 58 6 1 46 29 34 51 31 47 48 49 3...
output:
1 262144 123731968 28431 5619712 3 8 25600 16384 128000 1507328 8192 256 5120 32768 369603 802816 58 9 65536 19683 22599 34668544 1682 114688 378535936 122 729 8912896 2187 2097152 41 19922944 512 81 131072 128 385024 2 15488 6561 4096 2997 344 1408 151519232 4194304 32 64 8388608 1024 16 472383488 ...
result:
ok correct
Test #11:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
60 42 46 49 47 54 4 38 49 50 60 39 2 30 22 57 32 55 45 19 46 12 33 26 47 3 20 53 15 22 32 9 50 1 12 40 58 46 50 17 7 60 48 35 24 16 19 33 30 59 51 43 59 24 8 2 38 6 23 8 36 41 35 45 7 13 11 28 5 25 49 21 60 14 40 10 1 52 44 56 41 58 13 34 13 7 16 31 37 48 41 5 39 51 52 44 17 18 31 37 5 23 33 15 28 2...
output:
1 32 17179869184 200 128 1521 4194304 4096 10747904 2 536870912 3 1073741824 133143986176 6272 2097152 8388608 1024 1048576 8589934592 3014656 81 117 8192 40 76 34359738368 896 17 27 512 243 9 31138512896 16384 2048 256 16 64 4294967296 32768 19398656 268435456 16777216 46137344 524288 4 65536 8 262...
result:
ok correct
Test #12:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
60 12 40 40 29 48 22 59 42 16 21 60 37 30 50 45 9 5 41 11 19 50 39 38 12 24 49 29 35 56 33 39 38 23 54 8 56 10 18 31 51 27 53 17 58 19 26 52 7 2 25 14 16 32 45 21 2 1 52 35 55 58 44 9 5 36 32 33 3 7 24 6 15 22 8 28 48 57 46 34 31 44 36 54 59 3 17 53 10 26 28 15 1 18 20 55 4 49 43 13 47 46 14 4 34 43...
output:
1 1162261467 33554432 64 131072 4 9 268435456 262144 137438953472 17179869184 2048 6561 43046721 2 129140163 16777216 68719476736 8589934592 34359738368 387420489 536870912 59049 27 3486784401 4294967296 549755813888 2147483648 512 32768 16 1048576 67108864 32 256 2097152 2187 4096 8192 1024 65536 1...
result:
ok correct
Test #13:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
60 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53...
output:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719476736 137438953472 274877906944 549755813888 1099...
result:
ok correct
Test #14:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
60 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 31 33 31 34 31 35 31 36 31 37 31 38 31 39 31 40 31 41 31 42 31 43 31 44 31 45 31 46 31 47 31 48 31 49 31 50 31 51 31 52 31 53 31...
output:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 117037858816 114890375168 110595407872 108447924224 104152956928 95563022336 89120571392 84825604096 78383153152...
result:
ok correct
Test #15:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
60 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 31 33 31 34 31 35 31 36 31 37 31 38 31 39 31 40 31 41 31 42 31 43 31 44 31 45 31 46 31 47 31 48 31 49 31 50 31 51 31 52 31 53 31...
output:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 117037858816 114890375168 110595407872 108447924224 104152956928 95563022336 89120571392 84825604096 78383153152...
result:
ok correct
Test #16:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
60 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 26 28 26 29 26 30 26 31 26 32 26 33 26 34 26 35 26 36 26 37 26 38 26 39 26 40 26 41 26 42 26 43 26 44 26 45 26 46 26 47 26 48 26 49 26 50 29 51 15 52 16 53 40...
output:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 3791650816 3657433088 234881024 167772160 3590324224 3456106496 3388997632 3254779904 2986344448 2785017856 2650800128 2449473536 2382364672 100663296 2248146944 ...
result:
ok correct
Test #17:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
60 1 2 2 3 3 4 3 5 3 6 3 7 3 8 3 9 3 10 3 11 3 12 3 13 3 14 3 15 3 16 3 17 3 18 3 19 3 20 3 21 3 22 3 23 3 24 3 25 3 26 3 27 3 28 3 29 3 30 3 31 3 32 3 33 3 34 3 35 3 36 3 37 3 38 3 39 3 40 3 41 3 42 3 43 3 44 3 45 3 46 3 47 3 48 3 49 3 50 3 51 3 52 3 53 3 54 3 55 3 56 3 57 23 58 32 59 1 60
output:
1 2 4 1028 1004 964 956 932 916 908 892 844 796 788 772 764 724 716 692 668 652 628 12 604 596 556 548 524 508 452 436 8 428 412 404 388 356 332 316 292 284 268 244 236 212 188 172 164 148 124 116 92 76 68 52 44 28 36 16 5
result:
ok correct
Test #18:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
60 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53...
output:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719476736 137438953472 274877906944 549755813888 1099...
result:
ok correct
Test #19:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
60 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53...
output:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719476736 137438953472 274877906944 549755813888 1099...
result:
ok correct
Test #20:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
59 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 31 2 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 ...
output:
1 2 6 18 54 162 486 1458 4374 13122 39366 118098 354294 1062882 3188646 9565938 28697814 86093442 258280326 774840978 2324522934 6973568802 20920706406 62762119218 188286357654 564859072962 1694577218886 5083731656658 15251194969974 45753584909922 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 3...
result:
ok correct
Test #21:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
59 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 30 1 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 ...
output:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 3 9 27 81 243 729 2187 6561 19683 59049 177147 531441 1594323 4782969 14348907 43046721 129140163 387420489 1162261467 3486784401 104...
result:
ok correct
Test #22:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
60 2 1 3 1 4 2 5 2 6 3 7 3 8 4 9 4 10 5 11 5 12 6 13 6 14 7 15 7 16 8 17 8 18 9 19 9 20 10 21 10 22 11 23 11 24 12 25 12 26 13 27 13 28 14 29 14 30 15 31 15 32 16 33 16 34 17 35 17 36 18 37 18 38 19 39 19 40 20 41 20 42 21 43 21 44 22 45 22 46 23 47 23 48 24 49 24 50 25 51 25 52 26 53 26 54 27 55 27...
output:
1 3 2 21 9 10 4 399 147 153 27 130 50 44 8 18753 7581 6321 1029 6273 2601 999 81 4030 1690 1450 250 1012 484 16 424 2119089 881391 826329 144039 676347 271803 105987 7203 633573 257193 252297 44217 88911 36963 6723 243 318370 124930 123370 21970 102950 42050 16750 1250 61732 23276 28556 5324 32
result:
ok correct
Test #23:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
31 2 1 3 1 4 2 5 2 6 3 7 3 8 4 9 4 10 5 11 5 12 6 13 6 14 7 15 7 16 8 17 8 18 9 19 9 20 10 21 10 22 11 23 11 24 12 25 12 26 13 27 13 28 14 29 14 30 15 31 15
output:
1 3 2 21 9 10 4 399 147 153 27 130 50 44 8 21147 7581 6909 1029 6579 2601 1107 81 4810 1690 1550 250 1276 484 184 16
result:
ok correct
Test #24:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
60 2 1 3 1 4 1 5 2 6 2 7 2 8 3 9 3 10 3 11 4 12 4 13 4 14 5 15 5 16 5 17 6 18 6 19 6 20 7 21 7 22 7 23 8 24 8 25 8 26 9 27 9 28 9 29 10 30 10 31 10 32 11 33 11 34 11 35 12 36 12 37 12 38 13 39 13 40 13 41 14 42 14 43 14 44 15 45 15 46 15 47 16 48 16 49 16 50 17 51 17 52 17 53 18 54 18 55 18 56 19 57...
output:
1 2 5 3 22 14 4 115 95 25 51 39 9 902 814 242 434 406 98 8 412 404 11155 10235 2645 7885 7505 1805 1825 1775 125 3417 3111 867 2301 2067 507 423 387 27 156046 150634 36982 132682 127798 30118 36542 36058 2662 60326 59458 13454 53186 51562 11774 11074 10682 686 856 16
result:
ok correct
Test #25:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
60 58 18 38 39 60 19 19 55 44 32 17 44 26 36 30 47 45 30 24 25 46 49 18 57 43 51 2 8 49 13 57 26 28 37 42 31 29 56 9 7 13 33 56 15 3 23 36 28 25 38 14 54 4 2 15 5 48 9 10 1 21 41 27 20 5 34 41 53 53 29 55 43 39 27 51 42 35 4 16 21 12 59 47 40 31 17 50 3 40 33 59 52 7 46 20 14 1 45 6 60 52 48 37 35 5...
output:
1 16777216 27 33554432 387420489 14348907 512 8388608 1024 3 43046721 16384 64 65536 1162261467 847288609443 2187 4294967296 1594323 131072 282429536481 17179869184 9 4194304 2097152 1073741824 262144 268435456 10460353203 4 6561 243 32 129140163 67108864 536870912 134217728 1048576 524288 16 941431...
result:
ok correct
Test #26:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
60 36 45 50 23 12 3 35 54 42 43 19 46 52 29 30 38 54 25 16 53 48 60 28 7 32 4 13 55 9 11 17 34 55 24 38 47 46 9 49 19 41 1 11 37 20 27 25 6 7 15 8 20 45 33 14 18 37 25 18 21 60 57 51 39 22 32 58 5 4 30 44 22 23 13 5 56 47 49 2 36 39 16 1 40 57 59 33 42 25 10 21 58 25 26 3 17 27 14 15 41 56 35 31 12 ...
output:
1 8796093022208 2187 512 8388608 5767168 27 1073741824 65536 3670016 131072 6561 8589934592 134217728 9 35184372088832 729 67108864 16384 536870912 33554432 128 17179869184 2147483648 524288 2621440 268435456 81 68719476736 1024 19683 256 1099511627776 243 2097152 4398046511104 262144 2048 703687441...
result:
ok correct
Test #27:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
60 52 39 4 24 45 31 25 13 40 30 37 15 41 19 12 53 60 21 16 25 53 43 10 57 57 44 25 18 44 49 2 29 1 11 49 50 25 56 51 25 7 26 8 58 23 32 25 38 30 54 25 55 27 52 48 27 11 45 39 28 58 60 29 36 25 46 25 22 32 17 47 1 36 12 42 8 43 4 26 42 25 35 9 2 25 6 19 10 21 20 25 5 28 16 24 37 20 9 25 33 54 51 17 4...
output:
1 4294967296 2048 67108864 4456448 4980736 2199023255552 274877906944 8589934592 64 2 536870912 13893632 1835008 8388608 131072 9 12320768 32 17179869184 34359738368 7602176 81 33554432 262144 1099511627776 8192 65536 2147483648 2097152 8 27 3407872 1310720 6029312 1073741824 16777216 10747904 32768...
result:
ok correct
Test #28:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
60 16 6 22 42 34 11 18 35 53 4 53 36 41 46 2 7 53 10 37 9 53 20 25 53 43 23 52 17 59 48 28 24 12 41 7 18 46 44 53 54 53 29 53 38 53 26 53 1 53 15 14 22 60 16 53 47 30 32 50 14 53 58 6 49 53 40 53 39 53 51 24 33 53 56 3 25 48 52 19 13 17 50 53 5 53 27 11 43 35 19 42 34 53 31 32 3 53 21 33 60 53 55 53...
output:
1 118098 18 194 58 1062882 39366 14 262144 166 16 131072 486 256 118 3188646 1024 13122 1458 158 34 128 4 86093442 6 122 46 258280326 142 162 38 54 28697814 32 4374 178 524288 134 82 86 65536 64 8 16384 10 32768 106 4096 354294 512 74 2048 2 146 26 62 22 94 8192 9565938
result:
ok correct
Test #29:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
60 4 46 4 53 4 29 5 12 25 14 37 41 4 30 49 37 47 11 4 56 18 4 43 15 32 25 4 34 31 23 4 55 15 32 57 6 4 8 4 38 4 22 59 5 4 60 4 9 4 20 4 24 4 17 4 28 7 21 12 39 4 2 4 48 11 3 4 16 41 47 4 10 4 50 4 35 4 51 4 45 6 18 4 13 3 57 4 19 23 4 4 26 4 40 14 59 21 49 4 27 4 1 4 54 4 44 4 52 4 36 4 58 4 33 4 42...
output:
1 158 162 2 64 18 354294 254 206 134 486 32 86 256 2048 142 178 6 82 202 118098 218 4 194 512 74 58 166 302 298 8 1024 14 274 118 26 13122 226 16 62 4374 10 4096 38 94 326 1458 146 39366 122 106 34 314 46 262 278 54 22 128 214
result:
ok correct
Test #30:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
60 42 28 42 11 42 2 42 1 42 5 10 8 42 30 13 42 42 54 42 36 42 34 42 26 42 46 8 7 18 42 42 43 42 51 42 50 42 57 42 12 42 58 42 6 9 19 42 39 42 23 42 40 48 18 42 49 42 29 42 37 42 24 42 21 42 47 42 22 42 15 42 53 35 13 42 52 42 55 42 3 42 60 42 41 42 16 42 4 42 33 42 17 19 48 42 32 42 38 42 25 42 14 4...
output:
1 454 142 106 446 298 16 32 162 64 458 314 4 58 178 118 86 6 54 34 206 194 274 214 62 382 10 466 226 422 26 82 94 386 8 394 218 74 278 262 122 2 358 22 46 362 202 18 254 334 346 158 166 398 146 14 326 302 38 134
result:
ok correct
Test #31:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
60 2 1 3 1 4 2 5 3 6 4 7 5 8 6 9 7 10 8 11 9 12 10 13 11 14 12 15 13 16 14 17 15 18 16 19 17 20 18 21 19 22 20 23 21 24 22 25 23 26 24 27 25 28 26 29 27 30 28 31 29 32 30 33 31 34 32 35 33 36 34 37 35 38 36 39 37 40 38 41 39 42 40 43 41 44 42 45 43 46 44 47 45 48 46 49 47 50 48 51 49 52 50 53 51 54 ...
output:
1 2 3 4 9 8 27 16 81 32 243 64 729 128 2187 256 6561 512 19683 1024 59049 2048 177147 4096 531441 8192 1594323 16384 4782969 32768 14348907 65536 43046721 131072 129140163 262144 387420489 524288 1162261467 1048576 3486784401 2097152 10460353203 4194304 31381059609 8388608 94143178827 16777216 28242...
result:
ok correct
Test #32:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
60 2 1 3 2 4 2 5 3 6 4 7 5 8 6 9 7 10 8 11 9 12 10 13 11 14 12 15 13 16 14 17 15 18 16 19 17 20 18 21 19 22 20 23 21 24 22 25 23 26 24 27 25 28 26 29 27 30 28 31 29 32 30 33 31 34 32 35 33 36 34 37 35 38 36 39 37 40 38 41 39 42 40 43 41 44 42 45 43 46 44 47 45 48 46 49 47 50 48 51 49 52 50 53 51 54 ...
output:
1 2 6 4 18 8 54 16 162 32 486 64 1458 128 4374 256 13122 512 39366 1024 118098 2048 354294 4096 1062882 8192 3188646 16384 9565938 32768 28697814 65536 86093442 131072 258280326 262144 774840978 524288 2324522934 1048576 6973568802 2097152 20920706406 4194304 62762119218 8388608 188286357654 1677721...
result:
ok correct
Test #33:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
60 2 1 3 2 4 3 5 4 6 5 7 5 8 6 9 7 10 8 11 9 12 10 13 11 14 12 15 13 16 14 17 15 18 16 19 17 20 18 21 19 22 20 23 21 24 22 25 23 26 24 27 25 28 26 29 27 30 28 31 29 32 30 33 31 34 32 35 33 36 34 37 35 38 36 39 37 40 38 41 39 42 40 43 41 44 42 45 43 46 44 47 45 48 46 49 47 50 48 51 49 52 50 53 51 54 ...
output:
1 2 4 8 16 32 48 64 144 128 432 256 1296 512 3888 1024 11664 2048 34992 4096 104976 8192 314928 16384 944784 32768 2834352 65536 8503056 131072 25509168 262144 76527504 524288 229582512 1048576 688747536 2097152 2066242608 4194304 6198727824 8388608 18596183472 16777216 55788550416 33554432 16736565...
result:
ok correct
Test #34:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
60 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 14 16 15 17 16 18 16 19 17 20 18 21 19 22 20 23 21 24 22 25 23 26 24 27 25 28 26 29 27 30 28 31 29 32 30 33 31 34 32 35 33 36 34 37 35 38 36 39 37 40 38 41 39 42 40 43 41 44 42 45 43 46 44 47 45 48 46 49 47 50 48 51 49 52 50 53 51 54...
output:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 98304 65536 294912 131072 884736 262144 2654208 524288 7962624 1048576 23887872 2097152 71663616 4194304 214990848 8388608 644972544 16777216 1934917632 33554432 5804752896 67108864 17414258688 134217728 52242776064 268435456 156728328192 ...
result:
ok correct
Test #35:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
60 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 14 16 15 17 16 18 17 19 18 20 19 21 20 22 21 23 22 24 23 25 24 26 25 27 26 28 27 29 28 30 29 31 30 32 30 33 31 34 32 35 33 36 34 37 35 38 36 39 37 40 38 41 39 42 40 43 41 44 42 45 43 46 44 47 45 48 46 49 47 50 48 51 49 52 50 53 51 54...
output:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1610612736 1073741824 4831838208 2147483648 14495514624 4294967296 43486543872 8589934592 130459631616 17179869184 39137889...
result:
ok correct
Test #36:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
60 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 14 16 15 17 16 18 17 19 18 20 19 21 20 22 21 23 22 24 23 25 24 26 25 27 26 28 27 29 28 30 29 31 30 32 31 33 32 34 33 35 34 36 35 37 36 38 37 39 38 40 39 41 40 42 41 43 42 44 43 45 44 46 45 47 46 48 46 49 47 50 48 51 49 52 50 53 51 54...
output:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719476736 137438953472 274877906944 549755813888 1099...
result:
ok correct