Miracle_InDream @ 2024-01-22 22:26:21
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long n,k;
cin>>n>>k;
long long a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
sort(a,a+n);
cout<<a[k];
return 0;
}
by Sky_Candle @ 2024-01-22 22:33:22
@Vsinger_LuoTianYi 这是谁啊
by Vsinger_LuoTianYi @ 2024-01-22 22:34:27
@Sky_Candle 是我认为应该和天波齐名的伟大人物
by Sky_Candle @ 2024-01-22 22:37:05
@Vsinger_LuoTianYi 好吧反正我不认识其中任何一个(
by mashduihca @ 2024-01-22 22:40:09
@云雷心柠檬听 VLA 可以吧.
by hjxhjx @ 2024-01-22 22:42:19
@云雷心柠檬听 sort 一秒能跑n=1e7的
by lgydkkyd @ 2024-01-22 22:52:37
@shooting__star sort的复杂度不稳定的吧,最优为
by Misaka_Mik0t0 @ 2024-01-22 23:03:04
@lgydkkyd sort 优化得很好,就是
by Miyamizu_Mitsuha @ 2024-01-22 23:18:07
符合我对流星老师的想象
by Miracle_InDream @ 2024-01-23 17:43:14
@p_Hydroxy ???
by Miracle_InDream @ 2024-01-23 17:43:46
@Vsinger_LuoTianYi ?????