Reverse Problem.....can somebody give me hints.
Moderator: Board moderators
Reverse Problem.....can somebody give me hints.
Consider a Two-Operation Machine (TOM for short) with nine registers, numbered 1
-
- Experienced poster
- Posts: 169
- Joined: Wed Oct 31, 2001 2:00 am
- Location: Singapore
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).
about alorithm 2
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 ^^
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 ^^