Блог пользователя rebornplusplus

Автор rebornplusplus, история, 7 лет назад, По-английски

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.

  • Проголосовать: нравится
  • +17
  • Проголосовать: не нравится

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

After careful reading of your code, I found that your code works perfectly with C++17. Link: 49288096

»
7 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by rebornplusplus (previous revision, new revision, compare).

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

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.

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

Thanks a lot Anachor,CodingKnight and Len.

I added an empty constructor to the SegmentTree class and it worked smooth.