Lines 2..N+1: Line i+1 describes cow i with two space-separated
integers, W_i and S_i.
输出格式
Line 1: A single integer, giving the largest risk of all the cows in
any optimal ordering that minimizes the risk.
样例
样例输入
3
10 3
2 5
3 3
样例输出
2
OUTPUT DETAILS:
Put the cow with weight 10 on the bottom. She will carry the other
two cows, so the risk of her collapsing is 2+3-3=2. The other cows
have lower risk of collapsing.