Colorful Beans
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
[ABC348C] Colorful Beans
题目描述
有 种豆子,第 种豆子的美味度是 ,颜色是 。 豆子是混合的,只能通过颜色来区分。
每一种颜色都有一个美味度最小的豆子,你需要求出这里面最大的美味度。
输入格式
第一行一个整数 ,接下来 行每行两个整数 。
输出格式
一个整数表示答案。
输入输出样例 #1
输入 #1
4
100 1
20 5
30 5
40 1
输出 #1
40
输入输出样例 #2
输入 #2
10
68 3
17 2
99 2
92 4
82 4
10 3
100 2
78 1
3 1
35 4
输出 #2
35
说明/提示
数据范围
20250311集训
- Status
- Done
- Rule
- IOI
- Problem
- 7
- Start at
- 2025-3-11 19:30
- End at
- 2025-3-11 21:30
- Duration
- 2 hour(s)
- Host
- Partic.
- 9