Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Mover
Description Given a board of Each instruction can move one piece to an empty cell, which shares a common edge. Input The first line of input contains two integers Output The first line of output contains one integer Sample Input 4 4 1 1 2 2 3 3 4 4 Sample Output 4 1 1 2 1 4 4 3 4 3 4 2 4 2 4 2 3 Source POJ Founder Monthly Contest – 2008.10.05, Lou Tiancheng |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator