| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 157752 | 陈骏睿 | 朋友信息 | C++ | Compile Error | 0 MS | 0 KB | 678 | 2026-08-17 11:11:45 |
#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; long long c; }; 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<f.a; else return x.c<y.c; } int main(){ f s[10]={}; int n; for(int i=1;i<=n;i++){ cin>>s[i].a>>s[i].b>>s[i].c; } spor(s+1,s+n+1,cmp) for(int i=1;i<=n;i++){ cour<<s[i].a<<' '<<s[i].b<<' '<<s[i].c; } return 0; }
Main.cc: In function 'bool cmp(f, f)':
Main.cc:14:34: error: expected primary-expression before '.' token
else if(x.a!=x.a)return x.a