[中译] Puzzleup 2015 (14) Jumping Pawns

楼主: LPH66 (-6.2598534e+18f)   2015-10-28 21:42:31
题目网址: http://www.puzzleup.com/2015/
http://www.puzzleup.com/2015/puzzle/?14
答题时限: 10月30日7PM-比赛结束(约12月16日)
加分时限: 10月30日7PM-11月4日6:59PM
答对可得基本分100分。答案可上传5次,每改1次答案从基本分扣20分。 
比赛期间内可随时上传答案,加分时限内答对第n天加(6-n)分       
另依题目的难易有额外加分(如有80%的人这题答错,答对者加80分)  
◆JUMPING PAWNS
There is a 1x20 board and 10 pawns are placed on the leftmost squares. Your
task is to move these 10 pawns to the rightmost squares in minimum steps.
A step consists of either a MOVE or a JUMP
- MOVE: Pawn can move to the empty adjacent square to its right.
- JUMP: Pawn can jump over adjacent right pawn to the next square if it is
empty. Jumping must continue till the pawn can't jump.
What is the minimum number of steps to accomplish this task?
现有一个 1x20 的棋盘及 10 个小兵放在棋盘的最左边。
你要将所有小兵以最少步数移到最右边。
每一步可以做以下两种动作:移动或跳跃。
* 移动:小兵可以移到它右边和它相邻的空格当中。
* 跳跃:小兵可以跳过它右边和它相邻的小兵到达再相邻的空格。
一步跳跃要跳到这个小兵无法再跳为止。
试问这最少步数为多少?
If the probem was asked for 1x6 board and 3 pawns, then the answer would be 5:
若此问题改问 1x6 棋盘及 3 个小兵,则答案为 5:
0PPP   
1PP P  
2 P PP 
3  PPP 
4  P PP
5   PPP

Links booklink

Contact Us: admin [ a t ] ucptt.com