Hello!
Can anyone tell me how to update my g++ compiler for C++ to the exact version that's used by the judge on codeforces? I'm using Windows 7 and I'm not using any IDE (i compile from the commandline). Currently I have g++ version 4.8.1 and I can't find where to download 5.1.0. Tried to download minGW but it keeps installing the old 4.8.1 version.
Before, I didn't care that the compiler versions didn't match, but this last competition (330 div 2) got me really pissed off. I figured out the solution to the B problem, but I kept getting WA on pretests. After the contest, I tried submitting the solution and I saw that my solution was giving the wrong answer on their machine, while I was getting the corrent answer on my PC. After some tweaking I figured it was the pow() function that was causing the trouble. After i manually calculated 10^k instead of calling pow(10,k), I got accepted.
This thing with different compiler versions is REALLY annoying and unpredictable because god knows how many more functions like pow() work differently on different compiler versions.
Also, what are the compiler options (like -Wall) used by the judge?
Thanks