본문 바로가기

알고리즘

2750 정렬하는방법


#include<stdio.h>

#include<algorithm>


using namespace std; 


int main(){

    int n;

    int buf[1000];

    scanf("%d",&n);

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

        scanf("%d",&buf[i]);

    }

    sort(buf,buf+n);

    

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

    {

        printf("%d\n",buf[i]);

    }

    return 0;

}

'알고리즘' 카테고리의 다른 글

[Algorithm] BruteForce  (0) 2019.01.11
1094 [시뮬레이션2]  (0) 2019.01.07
2455 [시뮬레이션1]  (0) 2019.01.07
10872 팩토리얼 구하기  (0) 2019.01.06
2839 설탕배달 (구현)  (0) 2018.12.31