PRETNUM : AC IN C++ 4.3.2, WA IN C++ 4.8.1

I had submitted the same code for PRETNUM this time in C++ 4.3.2 and in C++ 4.8.1 and C++ 11. i was shocked to see that i had gotten AC for this code in C++ 4.3.2 and WA for the same code in C++ 4.8.1 and also in C++ 11.

Can somebody explain where the error might have occured and the difference in behaviour of these 2 versions of C++ ? Also which one should we use from a long term point of view ?

3 Likes

I don’t have an answer, but I experienced almost the same problem. I was getting SIGFPE floating point error on 4.8.1 but AC on 4.3.2. No divisions by zero however. I have no clue what the reason is, but it might be similar to yours.

I’ve reverse case. For same code, tle in c++(4.3.2) http://www.codechef.com/viewsolution/2945527 and AC in c++(4.8.1) http://www.codechef.com/viewsolution/2945542
for MCHAIRS, don’t know why.

//