| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 157762 | 陈骏睿 | 朋友信息 | C++ | Accepted | 1 MS | 276 KB | 677 | 2026-08-17 11:30:10 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<algorithm> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; struct f{ string a; int b; string c; }s[11]; bool cmp(f x,f y){ if(x.b!=y.b)return x.b<y.b; else if(x.a!=y.a)return x.a<y.a; else return x.c<y.c; } int main(){ int n; cin>>n; for(int i=0;i<n;i++){ cin>>s[i].a>>s[i].b>>s[i].c; } sort(s,s+n,cmp); for(int i=0;i<n;i++){ cout<<s[i].a<<" "<<s[i].b<<" "<<s[i].c<<endl; } return 0; }