NAKANJC  Minimum knight moves Challenge
Anjali and Nakul are good friends. They had quarrelled and you had written a program for Anjali to know the
minimum number of moves a knight takes to reach from one square to another square of a chess board
(8X8).
Nakul is brilliant and knows Anjali didn't write it herself and says her program is too slow by all standards. He is
unimpressed so she asks you to try solve the problem faster this time using as few keystrokes as possible.
She wants to know whether you can actually do it. Anjali is very weak in programming. Help her to solve the
problem.
Since you are busy and tend to forget she reminds you that "A knight can move in the shape of an "L" in a chessboard  two squares either forward, backward, left, or right and then one square to its left or right. A knight move is valid if it moves as mentioned above and it is within the boundary of the chessboard (8 X 8).Since you are busy and tend to forget she reminds you that
"A knight can move in the shape of an "L" in a chessboard  two squares either forward, backward, left,
or right and then one square to its left or right. A knight move is valid if it moves as mentioned above and
it is within the boundary of the chessboard (8 X 8)."
first solve problem http://www.spoj.com/problems/NAKANJ/
Input
There are T test cases in total. The next T lines contain two strings (start and destination) separated by a
space.
T<=200001
The strings start and destination will only contain two characters  First character is an alphabet between
'a' and 'h' (inclusive), Second character is a digit between '1' and '8' (inclusive)  (Quotes just for clarity).
Output
Print the minimum number of moves a knight takes to reach from start to destination in a separate line.
Example
Input:
EDIT: Time limit increased 28112012. All submissions rejudged3 a1 h8 a1 c2 h8 c3Output:6Score:
1
4Your source code length (if you are successful in avoiding TLE and WA)
The smaller code the better
hide comments
hwb_worwa:
20180301 06:18:52
Cut 4059 B of fully documented wonderfull C++ code to 658 B of unreadable junk. And still did not crack top 100 :(. Last edit: 20180301 06:24:40 

e869120:
20160801 07:44:45
C in 365B. 

nadavishe:
20140413 10:00:56
Haskell  319 B Last edit: 20140413 10:01:23 

Aditya Pande:
20121226 07:27:08
i would like to congratulate language wise best submissions:


Aditya Pande:
20121213 08:28:36

Added by:  Aditya Pande 
Date:  20121126 
Time limit:  0.100s0.393s 
Source limit:  5000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 
Resource:  own 