thusharakart's blog

By thusharakart, history, 5 years ago, In English

In almost all of coding competitions the winners are using c++. However those codes are more longer compared to python codes. Why this is happening? Why they don't get more time? I guess all the problems can be solved in both languages.

Another thing.. if one knows both languages equally what should he/she use in competitive coding competitions?

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it -8 Vote: I do not like it

The length of your code has no correlation with execution time. That's almost stupid to think off. In the end it's all broken into machine code and that's what matters. What do you think happens when you include <bits\stdc++.h>? You technically include almost the entire STL. But, does every bit of code in the STL get compiled? No. Only the parts that you use in your program end up getting compiled. It's the same for every language (AFAIK). So, what makes C++ code faster than Python? Well, only if someone had developed a search engine by now...

what should he/she use in competitive coding competitions?

Whatever he/she/they like. My opinion: C++

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    It's obvious that the length has no correlation with execution time but it may take time to code. Then why can't python programmers do a great job?

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I'm not well versed with c++..but i know some python..so for easier codes of A and B I mostly do it in python..coz being a noob and less typing speed ..short and easy syntax can literally save time for easier codes..not talking about about much tougher ones tho

»
5 years ago, # |
  Vote: I like it +2 Vote: I do not like it

I guess all the problems can be solved in both languages.

Seeing is believing. Try solving every problem in CF using Python only. After that, tell everyone whether your guess is correct.

»
5 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Because C++ is sexy.