please help me solve the problem on SPOJ
https://www.spoj.pl/problems/BISHOPS/
The logic of the problem is very easy i.e. 2*n-2
but i am getting WA bcoz i am not able to deal with the large inputs.[?]
plz help me how to get this AC.
#includestdio.h
int main()
{
long long int
C/C++ user : Take input in a char array or string(if using C++) : a
now do string addition. : a = a + a;
now do string substraction. : a = a - 2.
Java user : Use BigInt class
On Fri, Feb 4, 2011 at 8:12 PM, Logic King crazy.logic.k...@gmail.comwrote:
please help me solve the problem on SPOJ
Use python for arithmetic operation of large numbers.. :)
Cheers
~ Jeeva ~
On Fri, Feb 4, 2011 at 8:32 PM, Manmeet Singh mans.aus...@gmail.com wrote:
C/C++ user : Take input in a char array or string(if using C++) : a
now do string addition. : a = a + a;
now do string
Hi all, I guess the bishops problem has a generic solution. The
formula is 2n-2. Where n is the chess board size n * n . Regarding the
arrangement one can place n bishops in one side of the board and on
the opposite side you can place n-2 bishops starting from the position
n/2 to n-2 position, and