Блог пользователя estoy-re-sebado

Автор estoy-re-sebado, история, 5 недель назад, По-английски

I was trying a problem related to a recent blog (1009F - Dominant Indices). When I submitted I got a compilation error with this message:

Can't compile file:
Compiled file is too large [34657593 bytes], but maximal allowed size is 33554432 bytes [CompileRequest {id='program.cpp', description='', file='program.cpp', resources='', type='cpp.gcc13-64-winlibs-g++20'}].

In this case I just resubmitted with a few different compilers until it worked. Any idea of what could be triggering this so I can avoid it during contests? (ik compilation error doesn't cost penalty but it is a time loss that could be prevented) I had never gotten this message before and I found it really strange because the source code is barely over 1.2kB and I'm not doing any heavy compile-time computations.

Submission: 285079574

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

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

This will help.

»
5 недель назад, # |
  Проголосовать: нравится -11 Проголосовать: не нравится

Wow, this is incredibly bad from the compiler standpoint, given that this pattern is so common. Are there not any tickets on the GCC board about this? Does this happen locally as well?

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

I remember seeing some blogs a while ago that also involved issues when declaring a giant global array of some structs. I added a basic constructor to your struct and it AC's in ~4 seconds.

Submission: 285203536