| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 334621 | 黄浙峰老师 | 【C5-8】字符串排序 | C++ | Time Limit Exceeded | 0 | 1000 MS | 3148 KB | 313 | 2025-07-18 16:55:35 |
#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; string a[10005]; cin>>n; for(int i=0;i<n;i++) cin>>a[i]; sort(a,a+n,cmp); for(int i=0;i<n;i++) cout<<a[i]<<endl; return 0; }