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: Diamond Puzzle
Description A diamond puzzle is played on a tessellated hexagon like the one shown in Starting from any configuration, some series of moves can always make the puzzle look identical to either one shown in Input The input contains multiple test cases. The first contains an integer Output For each test cases, output the minimum number of moves the configuration takes to reach the one shown in Sample Input 3 1324506 2410653 0123456 Sample Output 10 -1 0 Source PKU Local 2007 (POJ Monthly--2007.04.28), wenxichang |

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

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

Any problem, Please Contact Administrator