w为什么会TLE????
查看原帖
w为什么会TLE????
565070
2345A楼主2023/11/15 12:10

我已经加快了cin和cout的读取速度.....

#include <iostream>
#include <algorithm>
using namespace std;
int a[6000000],k,chuchun=0;
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin>>n>>k;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	sort(a,a+n);
  cout<<a[k];	
	return 0;
}
2023/11/15 12:10
加载中...