PSA: Increase your stack size before the Meta Hacker Cup, here's how

This post was originally written on Codeforces; relevant discussion can be found here. Disclaimer: Please verify that whichever of the following solutions you choose to use indeed increases the stack limit for the execution of the solution, since different OSes/versions can behave differently. On Linux (and probably MacOS), running ulimit -s unlimited in every instance of the shell you use to execute your program will work just fine (assuming you don’t have a hard limit). On some compilers, passing -Wl,--stack=268435456 to the compiler options should give you a 256MB stack. ...

September 25, 2023 · 2 min · 253 words · nor

On using C on Codeforces (and some compiler update requests)

This post was originally written on Codeforces; relevant discussion can be found here. This post was initially meant to request updates to the C compiler on Codeforces (given the large number of posts complaining about “mysterious” issues in their submissions in C). While writing it, I realized that the chances of the said updates would be higher if I mentioned a few reasons why people would like to code in C instead of C++ (some of the reasons are not completely serious, as should be evident from the context). ...

December 31, 2022 · 9 min · 1804 words · nor

GCC Optimization Pragmas

This post was originally written on Codeforces; relevant discussion can be found here. Introduction A while ago ToxicPie9 and I made and posted this meme: To my surprise, many people are quite confused about it. In fact, I realized there are a lot of misconceptions about pragmas. Most C++ users on Codeforces put a few lines of pragmas at the start of every submission. However, I believe many of them don’t fully understand what they’re doing or how pragmas work; the only thing people seem to think is that “add pragmas -> code go brr”. ...

October 26, 2021 · 12 min · 2466 words · nor
>