- 问答
问答群
- 2023-11-10 22:50:43 @
#include <iostream> #include <algorithm> #include <vector>
using namespace std;
int main() { int n, m; cin >> n >> m;
vector<int> art_values(n);
for (int i = 0; i < n; ++i) {
cin >> art_values[i];
} sort(art_values.begin(), art_values.end());
for (int i = 0; i < m;i++) {
cout << art_values[i] << endl;
}
return 0;
}
0 comments
No comments so far...