eolymp
bolt
Try our new interface for solving problems
Problems

Master Oogway

Master Oogway

Master Oogway

Time limit 0.5 seconds
Memory limit 64 MiB
Input example #1
3 3
4
1 2
2 2
1 3
3 2
Output example #1
2