提交时间:2024-01-12 20:55:18

运行 ID: 119802

#include<bits/stdc++.h> #include<algorithm> using namespace std; typedef unsigned long long ull; typedef long long ll; string a[510],s; int n,m,cnt=1; int main() { cin>>n>>m; getchar(); for(int i=1;i<=n;i++) { getline(cin,a[i]); } sort(a+1,a+n+1); for(int i=1;i<=n;i++) { cout<<a[i]<<"\n"; } return 0; }