P3103 [USACO14FEB] Airplane Boarding G
题目描述
FJ's cows have decided to take a vacation, and have miraculously managed to find an airline willing to sell them tickets. When they arrive at the airport and start boarding their plane, they face an interesting problem, however.
The airplane has N seats, which we model as the points x=1 through x=N on the number line. All N cows (1
输入格式
\* Line 1: A single integer, N.
\* Lines 2..N+1: Two space-separated integers, S\_i and T\_i.
输出格式
\* Line 1: A single line indicating the amount of time it takes to seat all cows.
说明/提示
Initially, the cows are situated like this:
cows -> 123
123