Thanks to Andrey Mokhov for pointing out about the Strcmp() return values. Yes, Strcmp() doesn't always return +/- 1
So, I have changed the strcmp() values to >0 and <0 and got 'AC'. I have left the swap (from,to) option unchanged and got AC, which means , the Judge input doesn't have any value ...
What is the Problem with 10183? Is there anything exceptional case in the problem? I have used the fibonacci series from 1 2 3 5 8 13 ... and got WA.
Since the input range is a ,b <=10^100... I used string operation to generate all the first 5000 fibo. (allthough 5000th fibo is of 1045 digit long ...
I am getting Correct answer for a Board of less than 300x300 I have checked all the suggested inputs above and it seems to count the Knights correctly. But For a board of 500x500 or less, I am getting 'Time Limit Exceeds'.
I did simple backtracking To place the nights statring from (0,0) Can ...