병합정렬1 머지소트 #include using namespace std; const int MAX = 1e5; int n, a[MAX], b[MAX]; void msort(int st, int en) { if (st == en) return; int mid = (st + en) / 2; msort(st, mid); msort(mid + 1, en); int i = st, j = mid + 1, k = 0; while (i a[i]; msort(0, n - 1); for (int i = 0; i < n; i++) cout 2020. 1. 2. 이전 1 다음