QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#112910#3523. Keeping the Dogs Outlmq26052003AC ✓116ms3812kbC++201.4kb2023-06-15 10:37:592023-06-15 10:38:16

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3600kb

input:

2
21 3 3

output:

9 9

result:

ok single line: '9 9'

Test #2:

score: 0
Accepted
time: 112ms
memory: 3508kb

input:

2
0 3 2

output:

impossible

result:

ok single line: 'impossible'

Test #3:

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

input:

0
1

output:

1 1

result:

ok single line: '1 1'

Test #4:

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

input:

4
0 2 0 1 3

output:

impossible

result:

ok single line: 'impossible'

Test #5:

score: 0
Accepted
time: 116ms
memory: 3508kb

input:

4
4 9 9 4 2

output:

impossible

result:

ok single line: 'impossible'

Test #6:

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

input:

3
42 47 13 8

output:

10 95

result:

ok single line: '10 95'

Test #7:

score: 0
Accepted
time: 68ms
memory: 3420kb

input:

24
12 17 23 16 10 8 11 8 14 10 10 8 8 1 2 1 1 0 0 0 0 1 1 0 3

output:

impossible

result:

ok single line: 'impossible'

Test #8:

score: 0
Accepted
time: 68ms
memory: 3680kb

input:

24
22 16 15 21 24 28 33 17 18 10 7 2 9 8 4 7 4 0 0 3 1 0 2 1 3

output:

impossible

result:

ok single line: 'impossible'

Test #9:

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

input:

7
1488127222 3719868394368 1859562261865 0 4 9219 23247935 58111320115

output:

134 7438992982401

result:

ok single line: '134 7438992982401'

Test #10:

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

input:

20
0 396514800 0 0 0 34142 12408157 6204077 3102037 1551017 0 387753 0 96937 0 24233 0 0 4 0 756

output:

1092546 793029600

result:

ok single line: '1092546 793029600'

Test #11:

score: 0
Accepted
time: 68ms
memory: 3576kb

input:

23
65008973 4096950 10244698 7832051 1795180 44218 111061 276520 134907 60515 12294 31276 8862 5158 3857 1065 524 216 0 0 16 29 20 7

output:

31574813 31619209

result:

ok single line: '31574813 31619209'

Test #12:

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

input:

24
1 1 0 2 2 2 0 1 1 1 2 2 1 1 0 1 3 0 0 0 0 3 0 2 3

output:

impossible

result:

ok single line: 'impossible'

Test #13:

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

input:

17
0 0 60588 0 223455977 111727987 3786 27931995 946 6982997 0 118 872873 436435 14 109107 54550 27275

output:

242352 3575053300

result:

ok single line: '242352 3575053300'

Test #14:

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

input:

21
0 169457904 0 0 0 10671007 39944 19972 9986 661944 0 0 624 312 156 0 5209 2603 1292 0 2 161

output:

2556450 338915808

result:

ok single line: '2556450 338915808'

Test #15:

score: 0
Accepted
time: 39ms
memory: 3536kb

input:

24
62538897 0 0 7817361 0 0 977169 0 0 122145 0 0 0 7633 0 0 953 0 237 117 57 0 13 5 1

output:

31269449 31269449

result:

ok single line: '31269449 31269449'

Test #16:

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

input:

17
704 652 805 1035 1314 1631 2070 2563 3262 4188 5403 6500 8600 10687 13391 16494 21051 26213

output:

131072 4294967296

result:

ok single line: '131072 4294967296'

Test #17:

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

input:

22
2005328436 334212743 139217231 58038407 24187637 10074170 4201033 1749297 730395 304244 126577 52643 22242 9266 3730 1610 664 317 125 55 27 13 9

output:

4194304 67108864

result:

ok single line: '4194304 67108864'

Test #18:

score: 0
Accepted
time: 68ms
memory: 3508kb

input:

24
0 0 1 3 0 4 1 2 1 1 5 6 6 3 0 2 0 0 0 1 0 1 3 0 3

output:

impossible

result:

ok single line: 'impossible'

Test #19:

score: 0
Accepted
time: 92ms
memory: 3676kb

input:

23
1155107984450 96259050633 32086658485 10695472911 3565133662 1188383151 396107469 132067184 44013566 14666811 4887565 1629164 543793 181618 60416 19944 6776 2144 741 277 72 31 9 4

output:

impossible

result:

ok single line: 'impossible'

Test #20:

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

input:

24
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 3

output:

16777216 54525952

result:

ok single line: '16777216 54525952'

Test #21:

score: 0
Accepted
time: 88ms
memory: 3572kb

input:

1
999992309171737 1

output:

31622377 31622933

result:

ok single line: '31622377 31622933'

Test #22:

score: 0
Accepted
time: 116ms
memory: 3672kb

input:

1
999998727899995 1

output:

impossible

result:

ok single line: 'impossible'

Test #23:

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

input:

0
999998727899999

output:

1 999998727899999

result:

ok single line: '1 999998727899999'

Test #24:

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

input:

11
337786088640 0 84446522160 0 0 0 40 20 0 659738454 2 164934613

output:

2565 337786088640

result:

ok single line: '2565 337786088640'

Test #25:

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

input:

0
866421317361600

output:

1 866421317361600

result:

ok single line: '1 866421317361600'

Test #26:

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

input:

20
864955301857900 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

output:

1048800 826107282

result:

ok single line: '1048800 826107282'

Test #27:

score: 0
Accepted
time: 38ms
memory: 3696kb

input:

24
0 30919985 0 0 3864997 1932497 0 0 241561 0 60389 30193 0 0 3773 1885 941 469 233 0 57 0 13 5 1

output:

30919986 30919986

result:

ok single line: '30919986 30919986'