HarendraSingh22's blog

By HarendraSingh22, history, 5 years ago, In English

I use Python3 as my primary language while programming and recently started using CodeForces ( I used only CodeChef untill now and never faced a problem !) and today, in the 3rd contest that I was participating in on CodeForces I faced severe problems because of using Python3 !!!

Faced the following problem in the Problem B of Contest #1027(Educational Codeforces Round 49 )

I coded a perfectly correct Solution in Python3 but got a TLE in 3rd test case !

Then I coded the same solution in C++, but I'm not that good with C++ so I actually got a WA in test 7 which I figured was due to my data type, I tried around with that, read online and was finally able to get it working by changing the data type and some minor adjustments to my initial code ! All this took me 1 hour ! Now wasting 1 hour in a live contest just because CodeForces doesn't have a different Time Limit for different languages is insane !!!!!!!!

I found a blog(https://codeforces.com/blog/entry/45228) pointing out the same issue which was posted 2 years back ! But it seems that still nothing has been done !

I'm attaching as a proof a screenshot showing my submissions, anyone can go ahead and see my codes and realise that I wasted my 1 hour because I wasn't as well versed with C++ as with Python ! And a having different a Time Limit for Python would have saved my time because the logic and the solution remains exactly the same !!!!!!!

Edit : I am seeing that this blog is also starting to follow the downvote trend as the one I have linked ! Guys stop downvoting ! I get the point being made by the downvoters ! I understand that Python is slow and this is a competitive space !

I agree that there should not be a multiplier but there could be then a defined time limit for each question in each language using the same solution ! I agree multipliers don't work well and always keeps someone at an advantage or a disadvantage ! But there are a lot of languages that CodeForces supports, so either is stops supporting them in contests or has a defined time limit for each question serperately for each problem because the current scenario won't allow any other language to progress in the competitive world ! And just to counter the logic being given by some people that the fastest should be used, then why aren't we all using Assembly ? ! Same is what I want to say for the case of Python !

And also, I have found a solution for the problem I faced today(pointed out by @vovuh) : Using sys.stdin.readline() instead of input() does help a bit and may solve the problem sometimes !

Edit 2: Nice point made by @manetsus. I think I'll now look a bit deeper into both the languages to understand them and be able to decide which one to use beforehand !

Glad I posted my problem, learning a lot from the guys out here ! Anyone reading this, do leave out your tips in the comments !

Edit 3: I'm astonished at the amount of downvotes I'm getting ! The community here at CodeForces doesn't seem to be welcoming of Python ! I think I should have removed this blog after I got some help because now I don't see anymore helpful comment and all I'm getting is downvotes :/ !

Full text and comments »

  • Vote: I like it
  • -24
  • Vote: I do not like it