Exit code is -1073741571 at test case 4 with GNU C++14 but Accepted ✅ with GNU C++17

Revision en1, by MuhammadSawalhy, 2022-08-21 14:26:22

I can't understand what is happening here or even find a bug in my code. I found a similar issue with someone else here in codeforces.

What can really cause such a runtime error with this version of the GNU C++ compiler? The only thing I thought about was a bug in this version, which was fixed later in GNU C++17.

My accepted submission with GNU C++17: https://codeforces.net/contest/1696/submission/169228991 The submission with the same code but with GNU C++14: https://codeforces.net/contest/1696/submission/169229016

Tags segment tree, cpp, segmentation fault

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English MuhammadSawalhy 2022-09-03 21:54:14 181
en3 English MuhammadSawalhy 2022-08-21 14:28:21 0 (published)
en2 English MuhammadSawalhy 2022-08-21 14:27:43 79
en1 English MuhammadSawalhy 2022-08-21 14:26:22 655 Initial revision (saved to drafts)