牛浩宇 • 9个月前
using namespace std;
int main() {
list<int>a1;
int x;
cin >> x;
while (x != -1) {
a1.push_back(x);
cin >> x;
}
cin >> x;
while (x != -1) {
a1.push_back(x);
cin >> x;
}
a1.sort();
for (auto k = a1.begin(); k != a1.end(); k++) {
cout << *k << " ";
}
return 0;
}
评论:
请先登录,才能进行评论