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 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
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.