| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 165381 | 孔声豪 | 奖学金 | C++ | Compile Error | 0 MS | 0 KB | 565 | 2026-11-15 10:14:16 |
#include<bits/stdc++.h> using namespace std; struct{ if(x.z<y.z)return true; else if(x.z==y.z){ if(x.yw<y.yw)return true; else if(x.yw==y.yw)return x.xh>y.xh; } return false; } int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>s[i].yw>>s[i].sx>>s[i].yy; s[i].xh=i; s[i].z=s[i].yw+s[i].sx+s[i].yy; } for(int i=1;i<n;i++){ for(int j=1 stu{ int xh; int yw; int sx; int yy; double z; }s[301]; bool cup(stu x,stu y);j<n-i;j++)if(cup(s[j],s[j+1]))swap(s[j],s[j+1]); } for(int i=1;i<=5;i++)cout<<s[i].xh<<' '<<s[i].z<<endl; return 0; }
Main.cc:4:1: error: expected unqualified-id before 'if'
if(x.z' used as declaration
Main.cc: In function 'int main()':
Main.cc:15:6: error: 's' was not declared in this scope
cin>>s[i].yw>>s[i].sx>>s[i].yy;
^
Main.cc:20:13: error: expected ';' before 'stu'
for(int j=1 stu{
^
Main.cc:20:13: error: 'stu' was not declared in this scope
Main.cc:20:16: error: expected ';' before '{' token
for(int j=1 stu{
^
Main.cc:20:16: error: expected primary-expression before '{' token
Main.cc:20:16: error: expected ')' before '{' token
Main.cc:21:5: warning: unused variable 'xh' [-Wunused-variable]
int xh;
^
Main.cc:22:5: warning: unused variable 'yw' [-Wunused-variable]
int yw;
^
Main.cc:23:5: warning: unused variable 'sx' [-Wunused-variable]
int sx;
^
Main.cc:24:5: warning: unused variable 'yy' [-Wunused-variable]
int yy;
^
Main.cc:25:8: warning: unused variable 'z' [-Wunused-variable]
double z;
^
Main.cc:20:9: warning: unused variable 'j' [-Wunused-variable]
for(int j=1 stu{
^
Main.cc:26:2: error: 's' was not declared in this scope
}s[301];
^
Main.cc:27:10: error: 'stu' was not declared in this scope
bool cup(stu x,stu y);j