#P9401. [POI 2020/2021 R3] 收藏家 2 / Kolekcjoner Bajtemonów 2
[POI 2020/2021 R3] 收藏家 2 / Kolekcjoner Bajtemonów 2
Background
Translated from XXVIII Olimpiada Informatyczna - stage III Kolekcjoner Bajtemonów 2.
This is a sample judging problem.
Problem Description
You are given pairs of numbers. You need to make binary choices (choose one number from each pair), so that you end up with numbers, and maximize the of these numbers.
Input Format
The first line contains a positive integer .
The next lines each contain two integers .
Output Format
Output one number in one line: the maximum possible .
4
5 7
10 15
13 20
7 5
5
2
18900 22050
14700 17640
7350
见附件
2
Hint
Constraints: for all testdata, , , .
For the pts testdata, .
Translated by ChatGPT 5