eolymp
bolt
Try our new interface for solving problems
Problems

Домино

Домино

Домино

Time limit 2 seconds
Memory limit 64 MiB
Input example #1
7
2 6
5 6
2 5
2 2
6 8
2 2
0 2
Output example #1
6