10884 - Persephone

All about problems in Volume 108. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
xiaomengxian
New poster
Posts: 7
Joined: Mon Mar 12, 2007 4:41 am
Location: Changsha, Hunan, China

10884 - Persephone

Post by xiaomengxian » Wed Apr 25, 2007 3:44 pm

Could anyone help me please? I've been thinking for quite a long time, but I can't solve it... :(
Thanx in advance.

xiaomengxian
New poster
Posts: 7
Joined: Mon Mar 12, 2007 4:41 am
Location: Changsha, Hunan, China

Post by xiaomengxian » Fri Apr 27, 2007 3:21 am

I've thought of a way using Dynamic Programming, but it doesn't match with the example. Here is some inputs and my program's outputs:
input

Code: Select all

10
4
6
8
10
12
14
16
18
20
22
output

Code: Select all

Case #1: 1
Case #2: 2
Case #3: 7
Case #4: 28
Case #5: 121
Case #6: 545
Case #7: 2525
Case #8: 12005
Case #9: 58783
Case #10: 298592
Is that right?

xiaomengxian
New poster
Posts: 7
Joined: Mon Mar 12, 2007 4:41 am
Location: Changsha, Hunan, China

Post by xiaomengxian » Fri Apr 27, 2007 3:49 am

I'm terribly sorry... I made a stupid mistake.
Correct outputs are here:

Code: Select all

Case #1: 1
Case #2: 2
Case #3: 7
Case #4: 28
Case #5: 120
Case #6: 528
Case #7: 2344
Case #8: 10416
Case #9: 46160
Case #10: 203680

Post Reply

Return to “Volume 108 (10800-10899)”