CodeForces 412B 手速题

//CodeForces 412B

 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 #include "algorithm"
 5 #include "vector"
 6 using namespace std;
 7 int k, n, ans[110];
 8 
 9 int main()
10 {
11     int i, j;
12     scanf("%d%d", &n ,&k);
13     for(i = 1; i <= n; ++i) {
14         scanf("%d", &ans[i]);
15     }
16     sort(ans + 1, ans + 1 + n);
17     printf("%d\n", ans[n - k + 1]);
18 }

 

posted @ 2015-02-24 18:12  AC_Phoenix  阅读(215)  评论(0编辑  收藏  举报