高级守护
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
struct xs{
string name;
int age;
int yw,sx,yy;
int zf;
}a,b;
int main{
cin>>a.name>>a.age>>a.yw>>a.sx>>a.yy;
cin>>b.name>>b.age>>b.yw>>b.sx>>b.yy;
int s1,s2;
s.zf=a.yw+a.sx+a.yy;
s.zf=b.y+b.s+b.yy;
if(s1>s2){
cout<<a.name;
}else if(s2>s1){
cout<<b.name;
}else{
cout<<a.name<<" "<<b.name;
}
return 0;
}
...................................(都和答案一样了...)怀疑是
cin>>a.name>>a.age>>a.yw>>a.sx>>a.yy;
cin>>b.name>>b.age>>b.yw>>b.sx>>b.yy;
int s1,s2;有问题
中级守护
第四个测试点有问题
xpSqSslEqvdLIu 16 85 13 71
dubz 14 55 21 93
xpSqSslEqvdLIu:185
dubz : 183
结果他说输出xpSqSslEqvdLIu dubz
求采纳
新手天翼
if(a.math+a.english+a.c>b.math+b.english+b.c){ cout<<a.name; } if(a.math+a.english+a.c<b.math+b.english+b.c){ cout<<b.name; } if(a.math+a.english+a.c==b.math+b.english+b.c){ cout<<a.name<<" "<<b.name; }
缔造者之神
c=a.chinese+a.math+a.english;
d=b.chinese+b.math+b.english;
if(c>d) cout<<a.name;
if(d>c) cout<<b.name;
if(c==d) cout<<a.name<<" "<<b.name;
望采纳!