#24487: 簡易解(懶)


10930089 (why_520)

School : No School
ID : 134281
IP address : [123.193.250.61]
Last Login :
2021-08-11 23:37:42
d587. 參貳壹真好吃 -- jack1 | From: [140.124.241.44] | Post Date : 2021-02-25 19:28

直接 include 演算法,sort 一遍就好了

-

#include <iostream>

#include <algorithm>

using namespace std;

int main()

{

int n;

cin>>n;

unsigned long long int a[n];

for(int i=0;i<n;i++)

{

cin>>a[i];

}

sort(a,a+n);

for(int i=0;i<n;i++)

{

cout<<a[i]<<" ";

}

    return 0;

}

 

 
ZeroJudge Forum