| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 363601 | 丁虞轩 | 【C5-8】字符串排序 | C++ | Runtime Error | 0 | 77 MS | 1528 KB | 324 | 2025-11-27 19:55:21 |
#include<bits/stdc++.h> using namespace std; bool cmp(string x,string y){ if(x.size()!=y.size())return x.size()<y.size(); return x<y; } int main(){ int n; cin>>n; string a[1800]; for(int i=1;i<=n;i++){ cin>>a[i]; } sort(a+1,a+n+1,cmp); for(int i=1;i<=n;i++){ cout<<a[i]<<endl; } return 0; }