全RE了,在DEV里编译通过

P1923 【深基9.例4】求第 k 小的数

LINYUHENG2 @ 2024-10-10 19:33:07


#include <bits/stdc++.h>
using namespace std;
int a[5000005],n,k;

int main(){
    scanf("%d %d",&n,&k);
    for(int i=0;i<n;i++) scanf("%d",a[i]);
    sort(a,a+n);
    printf("%d",a[k]);
    return 0;
}

by _chicken_ @ 2024-10-10 19:34:51

scanf("%d",&a[i]); @LINYUHENG2


by LINYUHENG2 @ 2024-10-10 19:36:14

@chicken


|