Recently, I started competitive programming after practicing a programming language.
I use Python as the language, but compared to mainstream languages such as C ++ and Java, there is a section where competitive programming in Python is regarded as an "evil way", and the current situation is that it is not so popular. ..
This time, I would like to summarize the knowledge of Python that is often used in competitive programming, although it is not often used in practical development.
I will not explain the basic grammar of Python except what is necessary.
For those who have done competitive programming in other languages.
This article is incomplete at this time. The contents may be added or changed at any time.
The version of Python is 2.7.5 (Specifications such as input / output are significantly different in Python3).
There are various input formats in competitive programming, but this time we will introduce the type received from standard input.
Tips you should know when programming in Python2 (input / output)
Tips on control structure.
Tips (control structure) you should know when programming in Python2
Tips on data structure.
Tips (data structure) you should know when programming in Python2
Tips on useful libraries that can be used for competitive programming.
Tips you should know when programming competitive programming with Python2 (useful library)
Tips you should know when programming in Python2 (other language specifications)
Talk about calculation time, memory usage, recursive depth, etc. in Python.
Knowledge you need to know when programming competitive programming with Python2
Recommended Posts