Adolf Hitler • 9个月前
#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;
}
评论:
请先登录,才能进行评论