Can the Problem be Solved
All submissions for this problem are available.
You will be given a 3 X 3 board with 8 tiles (each tile is numbered from 1 to 8) and an empty one.
Your task is to place the numbers on tiles in order using the empty space. You can slide 4 adjacent slides into the empty space.
You will be given a state of the problem. If Goal state can be reached from the given state then that problem is said to be solvable otherwise it is not solvable.
Input consists of three rows with three columns in each row
0 in the input indicates empty tile
Print "Solvable" if given input state is solvable else print "Not Solvable" (Without quotes)
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.