TETRA : Wrong Answer

please help…i’m getting wrong answer. i don’t know wats wrong with the code . Here is the link to my solution

Click here

UPDATE:-

2nd soln still getting WA

Click here

The most possible reason can be integer overflow error… in line

vol=((4*A*A*B*B*C*C)-((A*A)*((B*B)+(C*C)-(c*c)))-((B*B)*((C*C)+(A*A)-(b*b)))-((C*C)*((A*A)+(B*B)-(a*a)))+(((B*B)+(C*C)-(c*c))*((C*C)+(A*A)-(b*b))*((A*A)+(B*B)-(a*a))));

Maximum edge length is 1000 and 4 * A * A * B * B * C * C can result in (10^18 * 4) which may result in integer overflow…

I am using float data type, so there shouldn’t be any overflow error.
My solution and solution submitted in this link are nearly same…but this solution has been accpted. HOW??

The 1st diff(2nd soln and the soln you are comparing to) that i can see is the o/p format…urs is “4lf" and the others is ".4lf”…the 2nd format states that print the number with precision of 4 decimal places…while the 1st says that print a floating pt number with width 4!!!

http://www.codechef.com/viewsolution/2285063
corrected it …but still getting wa :frowning: