Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
157760 陈骏睿 朋友信息 C++ Wrong Answer 1 MS 264 KB 658 2026-08-17 11:27:20

Tests(0/3):


Code:

#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!=x.a)return x.a<y.a; else return x.c<y.c; } int main(){ int 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; } return 0; }


Run Info:

------Input------
4 lele 19990302 13685930581 lema 19990302 13592039485 Kity 20010912 1872749501 Joy 19990302 18792049590
------Answer-----
Joy 19990302 18792049590 lele 19990302 13685930581 lema 19990302 13592039485 Kity 20010912 1872749501
------Your output-----