BOJ : https://www.acmicpc.net/problem/11728
github : https://github.com/junho0956/Algorithm/blob/master/11728/11728/%EC%86%8C%EC%8A%A4.cpp
문제는 사실 분할정복을 통한 해결을 요구하고 있지만..
그냥 합쳤습니다..
더보기
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <iostream>
#include <algorithm>
using namespace std;
int N, M;
int arr[2000000];
int main() {
ios::sync_with_stdio(0), cin.tie(0);
cin >> N >> M;
for (int i = 0; i < N; i++) cin >> arr[i];
for (int i = 0; i < M; i++) cin >> arr[i + N];
sort(arr, arr + N + M);
for (int i = 0; i < N + M; i++) cout << arr[i] << ' ';
return 0;
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
'algorithm > BOJ' 카테고리의 다른 글
| BOJ 1992번 쿼드트리 (0) | 2020.01.17 |
|---|---|
| BOJ 1780번 종이의 개수 (0) | 2020.01.17 |
| BOJ 11662번 민호와 강호 (0) | 2020.01.16 |
| BOJ 10816번 숫자 카드2 (0) | 2020.01.16 |
| BOJ 10815번 숫자 카드 (0) | 2020.01.16 |