Codeforces Round 511 (Div. 2)
翻译中…
There are $n$ points on the plane, $(x_1,y_1), (x_2,y_2), \ldots, (x_n,y_n)$.
翻译中…
You need to place an isosceles triangle with two sides on the coordinate axis to cover all points (a point is covered if it lies inside the triangle or on the side of the triangle). Calculate the minimum length of the shorter side of the triangle.
翻译中…
Input
翻译中…
First line contains one integer $n$ ($1 \leq n \leq 10^5$).
翻译中…
Each of the next $n$ lines contains two integers $x_i$ and $y_i$ ($1 \leq x_i,y_i \leq 10^9$).
翻译中…
Output
翻译中…
Print the minimum length of the shorter side of the triangle. It can be proved that it's always an integer.
翻译中…
Note
翻译中…
Illustration for the first example: 
翻译中…
Illustration for the second example: 
翻译中…
样例
Input #1
3
1 1
1 2
2 1
Output #1
3
InputCopy
OutputCopy
Input #2
4
1 1
1 2
2 1
2 2
Output #2
4
InputCopy
OutputCopy
题目信息
标签
计算几何
数学
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。