Hi All,
Why should we choose C++ for Competitive Programming?
Please give the detailed explanation with reasons. Thanks In Advance
Warm Regards, Akshay Kumar Software Developer 9310279350
# | User | Rating |
---|---|---|
1 | jiangly | 3898 |
2 | tourist | 3840 |
3 | orzdevinwang | 3706 |
4 | ksun48 | 3691 |
5 | jqdai0815 | 3682 |
6 | ecnerwala | 3525 |
7 | gamegame | 3477 |
8 | Benq | 3468 |
9 | Ormlis | 3381 |
10 | maroonrk | 3379 |
# | User | Contrib. |
---|---|---|
1 | cry | 168 |
2 | -is-this-fft- | 165 |
3 | Dominater069 | 161 |
4 | Um_nik | 159 |
4 | atcoder_official | 159 |
6 | djm03178 | 157 |
7 | adamant | 153 |
8 | luogu_official | 150 |
9 | awoo | 149 |
10 | TheScrasse | 146 |
Hi All,
Why should we choose C++ for Competitive Programming?
Please give the detailed explanation with reasons. Thanks In Advance
Warm Regards, Akshay Kumar Software Developer 9310279350
Name |
---|
It is very fast, noticeably faster than Java, C#, Python, Kotlin etc. Most competitions only have one time limit, and participating in C++ gives you an advantage. Even if competitions have separate time limits for slower languages, it is often less reliable (and from a problemsetter's POV, a major headache).
Some other fast languages like C and (or assembly :P) are unsuitable, because programming in them is much less convenient — you lose all of C++-s standard library, which is pretty important.
It is the industry standard, so to speak. Almost all CP-specific libraries, tutorials and code examples are written in C++. I can copy-paste someone else's FFT, dynamic CHT, geometry lib or whatever. If I participated in something else, there's a good chance that I'd have to implement a lot myself. Rust or D might be comparable to (or better than) C++ in terms of speed and standard library, but they have nothing like this kind of support.
It is supported on every platform.
Currently I see no reason to not choose C++. The only possible reason might be that other languages are more convenient to write in, but the benefits of C++ far outweigh this.