Tips you should know when programming competitive programming with Python2

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.

important point

The version of Python is 2.7.5 (Specifications such as input / output are significantly different in Python3).

change history

input

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)

Control structure

Tips on control structure.

Tips (control structure) you should know when programming in Python2

data structure

Tips on data structure.

Tips (data structure) you should know when programming in Python2

Convenient library

Tips on useful libraries that can be used for competitive programming.

Tips you should know when programming competitive programming with Python2 (useful library)

Other language specifications

Tips you should know when programming in Python2 (other language specifications)

Knowledge to deal with various restrictions

Talk about calculation time, memory usage, recursive depth, etc. in Python.

Knowledge you need to know when programming competitive programming with Python2

Recommended Posts

Tips you should know when programming competitive programming with Python2
Tips you should know when programming competitive programming with Python2 (useful library)
Tips (input / output) that you should know when programming competitive programming with Python2
Tips (control structure) that you should know when programming competitive programming with Python2
Tips (data structure) that you should know when programming competitive programming with Python2
Knowledge you need to know when programming competitive programming with Python2
Competitive programming with python
Tips to know when programming competitively with Python2 (Other language specifications)
Competitive programming with python Local environment settings
I made a competitive programming glossary with Python
Personal tips when doing various things with Python 3
[python] [vscode] When you get angry with space-tab-mixed
You should know if you use Python! 10 useful libraries
What are you using when testing with Python?
Python programming with Atom
Competitive programming diary python 20201220
Competitive programming diary python
Programming with Python Flask
Programming with Python and Tkinter
[Tips] Handle Athena with Python
Python Competitive Programming Site Summary
Error when playing with python
Network programming with Python Scapy
Solution when you want to use cv_bridge with python3 (virtualenv)
I know? Data analysis using Python or things you want to use when you want with numpy
Python3 standard input for competitive programming
If you know Python, you can make a web application with Django
Competitive programming, coding test template: Python3
Nice to meet you with python
[Python] Object-oriented programming learned with Pokemon
Easy Python + OpenCV programming with Canopy
Knowledge of linear algebra that you should know when doing AI
Until you run python with apache
When matplotlib doesn't work with python2.7
When using MeCab with virtualenv python
Precautions when using six with Python 2.5
[VS Code] ~ Tips when using python ~
Python | What you can do with Python
[Python] Format when to_csv with pandas
Python Note: When you want to know the attributes of an object
What Emacs users should know when writing python code in Sublime Text
Snippet when searching all bits with python
Note when creating an environment with python
What Rubyist should know when using pyenv
Tips for using python + caffe with TSUBAME
What you can do with programming skills
[Competitive programming] [Python3] Required knowledge, for myself
Until you can use opencv with python
python tips
python tips
Get all standard inputs used in paiza and competitive programming with int (python)
What to do if you get an error when installing python with pyenv
Solve with Python [100 past questions that beginners and intermediates should solve] (053 --055 Dynamic programming: Others)
Python Tips
Python tips
[Tips] Easy-to-read writing when connecting functions in Python
Error when installing a module with Python pip
How to enjoy programming with Minecraft (Ruby, Python)
Recommended environment and usage when developing with Python
You can easily create a GUI with Python
Precautions when dealing with control structures in Python 2.6