114514

天下为公 · 发布于 2024-06-27 · 浏览 541 回复 0
#include <bits/stdc++.h>
using namespace std;

int main() {
	list<int>s1;
	int x;
	cin >> x;
	while (x != -1) {
		s1.push_back(x);
		cin >> x;
	}
	cin >> x;
	while (x != -1) {
		s1.push_back(x);
		cin >> x;
	}
	s1.sort();
	for (auto ak = s1.begin(); ak != s1.end(); ak++) {
		cout << *ak << " ";
	}

	return 0;
}

全部回复 共 0 条

还没有人回复。往下写第一条。

发表回复