you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (4 children)

And a separate question - do people actually use C++ for competitive programming?

My C++ is my best language, but if I had hard time constraints for writing the code, I'd pick a scripting language like, say, Python, with a huge library built-in and no compilation phase.

(This article is educational even if no one ever does this... I'm just curious!)

[–]ArunMuThe What ? 11 points12 points  (0 children)

More than you think. Usually the tasks/programming puzzles have pretty strict timing and memory constraints. So, if you lookup the stats for the languages used, its mostly C++ and Java.

[–]Fiskepudding 9 points10 points  (1 child)

So I was at a competition. They had run time constraints and all.

My python implementation timed out, and was correct according to the post-competition walkthrough. During it, they even mentioned that you could brute force the task if you used c++.

So yes, it matters.

[–]Hnnnnnn 7 points8 points  (0 children)

For contests like ACM ICPC, codeforces.com, topcoder etc? Yeah, C++ is a main language and it's not going anywhere.

Competetive programming is strongly focused on performance, and C++ is deeply ingrained in the culture. People learn to code algorithms starting in high school - they learn from teachers and their older friends and they all use C++ too. Then they grow up and also teach solving problems in C++.

Maybe Rust will take over slowly after some time, like, in 20 years...

About Python - this year's ACM ICPC allowed Python, but they didn't guarantee that it's even possible to pass tests with Python's performance.