Блог пользователя FahimSifnatul

Автор FahimSifnatul, 6 лет назад, По-английски

Can someone tell me about the fastest python i/o ??? For 984C - Finite or not? , I have implemented the logic same as tutorial. But TLE on test 13 ( 44136959 ). If someone helps me telling about optimized fastest python 3 i/o then it will be a great help not only for me but also for others who will see this blog.

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
6 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Use pypy

»
6 лет назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

Unfortunately, this is not a problem of the I/O (and you are using practically the fastest possible I/O already).

As LanceTheDragonTrainer said, you are better off using PyPy 2 to get the fastest runtime.

As a matter of fact, after the contest, many people had complained about the problem having a strict time limit even for C++ (what can one say then for Python?)

So you are better off doing it in C/C++ or think of some other way to get it fit in the TL using PyPy.

PS: You can filter the submissions for that problem with Accepted verdict using PyPy 2 to get the only accepted solution.