Different output on C++ 14 and C++ 17

Revision en1, by zoro_2278, 2020-10-05 14:00:55

I am getting different output for this problem. While using C++14, I am getting 50 instead of 42 in second subtask of test case 1 (My submission- 94759038). But I am getting correct answer on my pc, other online IDE link and if I use C++17. Can somewhat point out what is causing this unusual behaviour so that I can avoid it in the future.
Note: Though my logic is not correct for whole problem, it should pass the 1st test case.

Tags c++ 14, c++ 17, unusual behaviour

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English zoro_2278 2020-10-05 14:00:55 585 Initial revision (published)