I'm newbie and I'm solving problems in C++, but which one is better c++ or python, should i switch to python or better to stay in C++! Thank you!
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
I'm newbie and I'm solving problems in C++, but which one is better c++ or python, should i switch to python or better to stay in C++! Thank you!
Name |
---|
For competitive programming, C++ almost always wins, but knowing python would help in problems that require to work with big numbers. Maybe you can avoid it, but if solution with big numbers is easier, it's better to just code it in python
C++, I use python and sometime i just stuck on problem due to TLE but when somehow i do it with C++ it got AC so C++ is of course better than python don't switch on python.
Well if you are already writing code in c++, then continue writing code in c++. Why is it better? C++ is simply more functional and faster. BUT if you have to work with long numbers (more then 128 bits) people usually use python.
Well, there are some pros and cons of both: C++ has better execution time, with C++ you are more likely to find implementation of a certain algorithm or data structure, each problem can be solved in C++ (unlike python), it also has broad variaty of built-in data structures: red-black trees, hash tables etc. On the other side, there is python: it has extremely easy syntax but there are some issues with memory (python consumes tons of it), standard input is kinda slow. Although python is very slow, it's still viable.