Recently, I was trying to solve the problem: 1288A - Deadline The submission: 68862578 The submission got accepted. If the compiler is changed to "GNU C++14" with the same code it gives the wrong answer in test 22; also, on test 50 it will give the same wrong answer it will output ("YES \n YES \n") I don't know which line that made the compilers give different output. Submission with "GNU C++14": 68867586 I tried to optimize the solution by this submission: 68864007 it gave the output ("YES \n YES \n") in test 50 No matter which compiler used. could anyone explain this behaviour? update: I found the problem. the problem was in using float instead of double. So, float accuracy was less than double.