5307: 【GESP202403六级】好斗的牛
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:1
Description

Input

Output

Sample Input Copy
2
1 2
1 2
Sample Output Copy
4
HINT
样例解释 1
你可以留下4个⽜棚,并如此安排你的⽜: