记录编号 |
449424 |
评测结果 |
AAAAAAAAAA |
题目名称 |
爱摔跤的比利海灵顿 |
最终得分 |
100 |
用户昵称 |
软软糖 |
是否通过 |
通过 |
代码语言 |
C++ |
运行时间 |
2.081 s |
提交时间 |
2017-09-14 13:33:54 |
内存使用 |
38.71 MiB |
显示代码纯文本
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int tall[10000000],n,k;
inline char getc(void) {
static char buf[1 << 18], *fs, *ft;
return (fs == ft && (ft = (fs = buf) + fread(buf, 1, 1 << 18, stdin)), fs == ft) ? EOF : *fs++;
}
inline int read(void) {
register int res = 0;
register char tmp = getc(), f = 1;
while(!isgraph(tmp)) tmp = getc();
if(tmp == '-') f = -1, tmp = getc();
while(isdigit(tmp))
res = ((res + (res << 2)) << 1) + (tmp ^ 0x30),
tmp = getc();
return res * f;
}
int main()
{
freopen("find_k.in","r",stdin);
freopen("find_k.out","w",stdout);
n = read(),k=read();
for(int i=1, *p = tall;i<=n;i++)
{
*(++p)=read();
}
sort(tall+1,tall+n+1);
printf("%d",tall[k]);
return 0;
}