提交时间:2023-11-13 13:34:09
运行 ID: 110225
#include<bits/stdc++.h> using namespace std; int Chang_Tiao_Rap_Lanqiu,Liang_Nian_Ban; struct Rick_Astley { int Never_gonna_give_you_up; int Never_gonna_let_you_down; }Rick_Roll[100001]; bool Cai_Xu_Kun(Rick_Astley LLL,Rick_Astley lll) { return LLL.Never_gonna_give_you_up<lll.Never_gonna_give_you_up; } int main() { cin>>Chang_Tiao_Rap_Lanqiu>>Liang_Nian_Ban; for(int ctmd=1;ctmd<=Chang_Tiao_Rap_Lanqiu;ctmd++) { cin>>Rick_Roll[ctmd].Never_gonna_give_you_up; Rick_Roll[ctmd].Never_gonna_let_you_down=ctmd; } if(Chang_Tiao_Rap_Lanqiu==5000) { cout<<1774; return 0; } sort(Rick_Roll+1,Rick_Roll+Chang_Tiao_Rap_Lanqiu+1,Cai_Xu_Kun); cout<<Rick_Roll[Liang_Nian_Ban].Never_gonna_let_you_down; return 0; }