题目描述
Problem Description
There are $ N $ pairs of integers. The $ i $ -th pair of integers is $ (A_i, B_i) $.
For each pair, calculate the sum of the two integers, and then output the maximum sum among them.
Input Format
The input is given from the standard input in the following format:
$ N $ $ A_1 $ $ B_1 $ $ A_2 $ $ B_2 $ $ : $ $ A_N $ $ B_N $
Output Format
Output the maximum value of $ A_i + B_i $.
Sample Input and Output
Sample Input #1
3
4 4
3 7
8 1
Sample Output #1
10
Sample Input #2
2
12345678 111111111
103050709 20406080
Sample Output #2
123456789
Notes/Hints
Constraints
The input satisfies the following conditions:
- $1 \leq N \leq 2 \times 10^5$
- $1 \leq A_i, B_i \leq 10^9$
- All input values are integers.
Sample Explanation 1
The sums of the integers in each pair are as follows:
- 1st pair: $ 4 + 4 = 8 $
- 2nd pair: $ 3 + 7 = 10 $
- 3rd pair: $ 8 + 1 = 9 $
The maximum value among these sums is $ 10 $, so output $ 10 $.
Sample Explanation 2
The sum is $ 123456789 $ for both pairs.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
3
4 4
3 7
8 1
样例输出
10