#39218: sort 很好用


210627@st.chsh.chc.edu.tw (11905吳品諒)

學校 : 不指定學校
編號 : 246247
來源 : [122.117.197.171]
最後登入時間 :
2024-04-30 10:03:30
a233. 排序法~~~ 挑戰極限 -- 24TH 成功電研社內考 | From: [122.117.197.171] | 發表日期 : 2024-01-24 14:34

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    int arr[n];
    for(int i = 0;i<n;i++){
        cin>>arr[i];
    }
    sort(arr,arr+n);
    for(int i = 0;i<n;i++){
        cout<<arr[i]<<" ";
    }
    cout<<endl;
}

 
#39219: Re: sort 很好用


210641@st.chsh.chc.edu.tw (11919)

學校 : 不指定學校
編號 : 260838
來源 : [61.223.72.178]
最後登入時間 :
2024-01-24 15:42:16
a233. 排序法~~~ 挑戰極限 -- 24TH 成功電研社內考 | From: [122.117.197.171] | 發表日期 : 2024-01-24 14:52

好強喔!



 
ZeroJudge Forum