Baubro's blog

By Baubro, history, 16 months ago, In English

Hey,

I'm a beginner in competitive programming, training on CSES and Codeforces and I'm facing an issue with some CSES problems that seem impossible to solve in Python because of time limits, though I see others have done it according to the statistics.

After hours of struggling with the "Concert Tickets" problem and failing to pass the time limit, I'd like to know if anyone has tips, solutions, or editorials to help me pass it using Python3 compiled with PyPy3.

Thanks in advance!

  • Vote: I like it
  • +5
  • Vote: I do not like it

| Write comment?
»
16 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Submission AC code for Concert Tickets in PyPy3, use sys.stdin.readline() for input, this is a lot more faster than normal input.

Also it is gonna be really frustating to do the problem set in Python due to the time constraints of CSES, I end up optimizing small stuff like using bitwise operations rather than arithmetic and stuff like that.