Overflow issue or what

When i declare all variable as -1e15 then it gives AC while when i declare all varibles in struct Tree as -1e18, i am getting WA.
why?

AC : https://www.codechef.com/viewsolution/29794433

WA : https://www.codechef.com/viewsolution/29794439