文章
5
粉丝
0
获赞
3
访问
149
#include <bits/stdc++.h>
using namespace std;
// 定义普通比较函数
bool compare(const string& a, const string& b) {
return stod(a) < stod(b);
}
int main() {
int n;
cin >> n;
vector<string> s(n);
for(auto &i : s)
cin >> i;
sort(s.begin(), s.end(), compare);
for (auto &num : s) {
cout << num << endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发