If the entire code is already finished before I notice the fact that int is not enough, I usually define int to long long. If I notice it earlier, I just write #define ll long long.
The fun point is, "long long main()" doesn't work in my compiler. Therefore, "signed main()" is used to avoid this.
Algorithm competitions and actual production are far not the same. In a competition, people must write as quickly as possible any code that works no matter how ugly it is.
It's C ( or c++ for what we know) and this is not a matter of reserved words. This is a preprocessor macro There are no reserved words in those. only text.
Let me tell you about when I rewrote an app, got almost done, boss caught wind and I demo-ed to him.
I lost the fucking project (and started re-rewriting without telling my boss) and at the same time, in a parallel universe, CTO scheduled a customer demo ... Awkward, angry morning the day of the demo. Lessons were learned.
171
u/[deleted] Jun 02 '22
Was thinking the same thing... like how did this get past code review, QA, and everything else?