Hello.
Um, I faced an issue during the div 2 round today which I am not sure how to handle. My submission for problem E is getting Compilation Error and showing this message in the following image. It runs okay in my machine and several online workspaces like csacademy, cpp.sh, etc.
Any help would be really appreciated. Submission Link.
After careful reading of your code, I found that your code works perfectly with C++17. Link: 49288096
Thanks. Didn't think to try that out.
I am still confused though, as to what is the problem with C++11. :/
The following slight update to your code was compiled successfully with C++11.
49301119
The main update is removing the macros and the user-defined class definition. I wonder if it is reasonable to send such error in a bug report to the GNU project, as it is clear that the mysterious issue that caused it is already resolved in C++17.
Auto comment: topic has been updated by rebornplusplus (previous revision, new revision, compare).
If I remember correctly, it's a compiler bug when you create large pair array inside struct/class. If you add empty constructor it starts working for some reason.
Thanks a lot Anachor,CodingKnight and Len.
I added an empty constructor to the SegmentTree class and it worked smooth.