2

Don't use std::array in ICPC contests

 6 months ago
source link: https://codeforces.com/blog/entry/127116
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Don't use std::array in ICPC contests

By AmmarDab3an, 6 hours ago,

I don't know why, but using std::array causes RTE in official contests.

In a local contest, there was a problem that I solved using matrices, and because I was used to using Array<> to store the values of the matrices, I faced weird run time errors if I compiled my solution using the Test button on the PC2 on my machine, or if I submitted my solution to the judge. Not just in the local, but also in the recent 2023 ACPC competition, there was a similar problem and some teams that didn't know of the problem faced the same issue which caused them to lose most of the contest's time trying to figure things out without any luck.

It's also a good idea to use the Test button on the PC2 before submitting any problem to catch such errors or to check if the problem was solved.

If anyone know why such a behavior is happening or how to use Array<> without getting an RTE, please share the solution.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK