阅读背景:

识别此算法:插槽和桩

来源:互联网 

I have a number of slots and pegs arranged in a straight line. The pegs can be moved and need to be moved to a slot each. A slot can be left empty only if all pegs are taken. When a peg is moved, it is not allowed to go past another peg. In other words the order of the pegs must be maintained. Preferably, the total distance moved by all pegs should be kept at a minimum. As far as possible, a peg should be placed in the nearest available slot.I have a number of slots and pegs arranged in a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: