风铃
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.
题目描述
共有 n个风铃悬挂在屋檐下,从左到右给风铃从 1 至n 编号,第 i个风铃的音调是ai 。你要在 n个的风铃中取出 m个。
输入格式
第一行是两个整数,表示风铃的个数n 和挑选出风铃的个数m 。
第二行有 n 个整数,表示每个风铃的音调。第 i个整数表示 ai。
输出格式
输出一行一个整数,表示最小的
样例
样例输入 1复制
5 3
1 2 3 4 5
样例输出 1复制
2
样例输入 2复制
6 4
1 7 8 3 4 6
样例输出 2复制
4
样例解释 2
数据范围与提示
2024年狂欢节C++程序设计比赛
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 4
- Start at
- 2024-12-31 9:00
- End at
- 2024-12-31 10:30
- Duration
- 1.5 hour(s)
- Host
- Partic.
- 15