Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
157751 陈骏睿 朋友信息 C++ Compile Error 0 MS 0 KB 678 2026-08-17 11:11:00

Tests(0/0):


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; 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; }


Run Info:

Main.cc:12:11: error: expected ',' or '...' before '.' token
 bool cmp(f.x,f.y){
           ^
Main.cc: In function 'bool cmp(f)':
Main.cc:13:8: error: 'x' was not declared in this scope
     if(x.b!=y.b)return x.b