Dolphins의 HelloWorld

[백준]Baekjoon2751(정렬) 본문

Algorithm/baekjoon문제풀이

[백준]Baekjoon2751(정렬)

돌핀's 2018. 8. 11. 17:22

문제링크 : https://www.acmicpc.net/problem/2751




#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int main()
{
	long long N, num;
	scanf("%lld", &N);
	vector<long long> v;

	while (N--) {
		scanf("%lld", &num);
		v.push_back(num);
	}
	sort(v.begin(), v.end());
	for (int i = 0; i < v.size(); i++)
		printf("%lld\n", v[i]);
}


Comments