Hi all, I want to ask the time limit 1sec given in the contest questions, is it for c++ or all the languages because when I run my python code for a problem it is generally 4 times that of c++. should I consider coding in python or c++. In the long run, will I get stuck because I choose Python.
for example, if I write the solution to MYSARA problem of march Cookoff 2020 in python using functions
https://www.codechef.com/viewsolution/30750605
my time is 4.76 sec
if I write with the function, only the procedural programming without any function
https://www.codechef.com/viewsolution/30750567
I got 2.2 sec
validate time here(CodeChef: Practical coding for everyone)
Now if I write the code in c++ it will run under a second.
Questions: -
- Why is that so? if all the three codes are of time complexity O(NlogN)
- Should c++ be chosen over python for competitive coding?
- Are online platforms take the language runtimes into account(which I don’t think so in long challenges.)
- Are we living in the c++ dominated competitive world?