Issue with Python !

Revision en3, by HarendraSingh22, 2018-08-18 21:02:48

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://mirror.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 !

Tags time limit, python in competitions, python3, c++, tle

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English HarendraSingh22 2018-08-19 09:48:25 289
en4 English HarendraSingh22 2018-08-18 21:09:07 333
en3 English HarendraSingh22 2018-08-18 21:02:48 1179
en2 English HarendraSingh22 2018-08-18 19:38:58 34 (published)
en1 English HarendraSingh22 2018-08-18 19:32:55 1469 Initial revision (saved to drafts)