11384 - Help is needed for Dexter

All about problems in Volume 113. 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
zuluaga
New poster
Posts: 5
Joined: Sat Jan 05, 2008 9:17 pm

11384 - Help is needed for Dexter

Post by zuluaga »

Hi,

Is the following io generated correct? I'm getting wa. Thank you.

Input:

Code: Select all

6
7
15
16
100
1000
10000
1000000000
Output:

Code: Select all

3
4
5
6
14
45
141
44721
rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan

Post by rio »

No. Its not correct.
For example, with n=7, need only 3 steps.

-----
Rio
zuluaga
New poster
Posts: 5
Joined: Sat Jan 05, 2008 9:17 pm

Post by zuluaga »

No. Its not correct.
For example, with n=7, need only 3 steps.
Maybe, I'm not understanding the problem correctly, but
in my interpretation, 7 requires 4 steps, because 7-3=4,
and 4 requires 3 steps. I interpret it as you can subtract
a maximum of L, to get L moves.

This is one of the optimal sequence.. (subtract 3, then we need 4 steps, so L=4).

Code: Select all

1 2 3 4 5 6 7
1 2 0 1 2 3 4
1 2 0 1 2 0 1
0 1 0 0 1 0 0
0 0 0 0 0 0 0
rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan

Post by rio »

This is the optimal move for n=7.

Code: Select all

1 2 3 4 5 6 7
1 2 3 0 1 2 3
1 0 1 0 1 0 1
0 0 0 0 0 0 0
-----
Rio
ThanhNhan
New poster
Posts: 15
Joined: Sun Aug 08, 2004 12:24 am

problem description

Post by ThanhNhan »

Problem description is not up. Someone should fix this.
sonyckson
New poster
Posts: 49
Joined: Tue Feb 06, 2007 9:29 pm
Location: Cordoba, Argentina

Post by sonyckson »

By the moment you can see it in the contest page... http://icpcres.ecs.baylor.edu/onlinejud ... 11384.html
gl!.Eric.
yiuyuho
A great helper
Posts: 325
Joined: Thu Feb 21, 2002 2:00 am
Location: United States
Contact:

Re: 11384 - Help is needed for Dexter

Post by yiuyuho »

Hi. Can anyone proof for me that the optimal solution always only subtracts powers of 2 from the set of selected numbers?
rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan

Re: 11384 - Help is needed for Dexter

Post by rio »

yiuyuho wrote:Hi. Can anyone proof for me that the optimal solution always only subtracts powers of 2 from the set of selected numbers?
I think it could be proven with induction.

-----
Rio
plamplam
Experienced poster
Posts: 150
Joined: Fri May 06, 2011 11:37 am

Re: 11384 - Help is needed for Dexter

Post by plamplam »

Awesome problem lol.....I found out all the minimum moves from 1 to 16 on paper first :wink: , may be this is not the way to solve this problem, but I like do it in my way. Nice recurrence relation. Thanks to the problem setter :)
You tried your best and you failed miserably. The lesson is 'never try'. -Homer Simpson
Post Reply

Return to “Volume 113 (11300-11399)”