Reverse Problem.....can somebody give me hints.

Let's talk about algorithms!

Moderator: Board moderators

Post Reply
nonstop
New poster
Posts: 14
Joined: Fri Oct 03, 2003 5:13 am

Reverse Problem.....can somebody give me hints.

Post by nonstop »

Consider a Two-Operation Machine (TOM for short) with nine registers, numbered 1
makbet
New poster
Posts: 44
Joined: Tue Nov 26, 2002 11:01 pm
Location: Wejherowo

Post by makbet »

This task is from the recent IOI.
As far as I recall, nobody scored
a perfect 100 on it, so for the
optimal algorithm you'd have to ask
somebody very smart :P.
junjieliang
Experienced poster
Posts: 169
Joined: Wed Oct 31, 2001 2:00 am
Location: Singapore

Post by junjieliang »

If you want the link the suggested algorithm is http://www.ioi2003.org/ioitasks/data-reverse.pdf. But I think if you want answers that are proven to be optimal perhaps you need to use DP or brute force (though I have no idea how to DP it).
nonstop
New poster
Posts: 14
Joined: Fri Oct 03, 2003 5:13 am

thanx

Post by nonstop »

thanks...
the information is useful~~~
thank you many much!!!
nonstop
New poster
Posts: 14
Joined: Fri Oct 03, 2003 5:13 am

about alorithm 2

Post by nonstop »

as the algorithm 2 mentioned in http://www.ioi2003.org/ioitasks/data-reverse.pdf
i still can't understand it's spirit completely.
for the case of N=44,i initialize the registers' value as :
register 1 2 3 4 5 6 7 8 9
N N-2 N-5 N-9 N-14 N-20 N-27 N-35 0

and i know no matter what value N is, the last register9 must always
be zero....

also,i suppose i've got the idea of the performance steps as N=44;

but i am confused with the initial values when N is bigger than 44

for example,N=70, N=120............

please give me some hints!!
thank you ^^
Post Reply

Return to “Algorithms”