Using the Constant time formula for Maximum bishops on a chessboard, which is:
int maxBishops(N) return 2*(N-1);
Implemented for the value of N lesser than 10^100, as follows: http://ift.tt/1N4wdOc
Verified using Wolfram|Alpha but getting wrong answer on SPOJ's BISHOPS submission.
Am I missing something in the algorithm or is it an implementation issue?
Aucun commentaire:
Enregistrer un commentaire