What’s wrong with this code?
http://www.codechef.com/viewsolution/4208338
Problem is http://www.codechef.com/problems/BINTREE
What’s wrong with this code?
http://www.codechef.com/viewsolution/4208338
Problem is http://www.codechef.com/problems/BINTREE
Just change :
static char a[30];
static char b[30];
to:
static char a[32]
static char b[32]
got it thanx…
but why is it so? 10^9 can easily fit in 30 bits
you are missing the sign bit