estoy-re-sebado's blog

By estoy-re-sebado, history, 4 weeks ago, In English

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

  • Vote: I like it
  • +21
  • Vote: I do not like it

»
4 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

This will help.

»
4 weeks ago, # |
  Vote: I like it -11 Vote: I do not like it

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?

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

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