社区讨论
20分求大佬调整,谢谢
P5740【深基7.例9】最厉害的学生参与者 2已保存回复 2
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 2 条
- 当前快照
- 1 份
- 快照标识符
- @mhk7gbl6
- 此快照首次捕获于
- 2025/11/04 14:45 4 个月前
- 此快照最后确认于
- 2025/11/04 14:45 4 个月前
CPP
#include <bits/stdc++.h>
using namespace std;
int n;
struct student{
string name;
int chineses,math,english;
}now,top;
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>now.name>>now.chineses>>now.math>>now.english;
if(now.chineses>>now.english>>now.math>top.chineses+top.english+top.math||i==1){
top=now;
}
}
cout<<top.name<<" "<<top.chineses<<" "<<top.math<<" "<<top.english;
return 0;
}
回复
共 2 条回复,欢迎继续交流。
正在加载回复...