Description: In an n* n squares on the chess board, horse (knight) starting from any given square, erected in accordance with step 1 step 2 horizontal, vertical or horizontal-step 1 step 2 vault rules, traveled to every board lattice, and each grid only take 1. This step is called a successful vault knights journey. For example, when n = 5 when a successful knight journey as shown below.
12345
125,141,819
24,918,132
315,243,207
4105221712
5231611621
Algorithm Design:
For a given n and n* n grid starting position of the x and y. Using branch and bound method to find out from the specified grid (x, y) starting a successful journey Knight.
Data entry:
The first line has a positive integer n (1 ≤ n ≤ 10) the second line has two positive integers
Number of x and y, said Cleveland s starting position (x, y).
The resulting output:
If not from the (x, y) the success of the Knights start the journey is the output No Solution! .
Input:
5
13
Export
25,141,819
4918132
- [knight] - Knight, in an n* n box at the internatio
- [upload] - asdf lkjadsf lkjadfkljadsffda
- [TSP] - This procedure achieved by using the bra
File list (Check if you may need any files):
knight\Debug\knight.exe
......\.....\knight.ilk
......\.....\knight.obj
......\.....\knight.pch
......\.....\knight.pdb
......\.....\vc60.idb
......\.....\vc60.pdb
......\knight.cpp
......\knight.dsp
......\knight.dsw
......\knight.ncb
......\knight.opt
......\knight.plg
......\Debug
knight