wa求助

P5740 【深基7.例9】最厉害的学生

第16行 `i=i` 是什么鬼
by _th_tw_on_ @ 2024-05-14 12:59:29


```cpp #include <bits/stdc++.h> using namespace std; struct a{ string a; int b,c,d,e; }student[1000]; int main(){ int n; cin>>n; for(int i=0;i<n;i++){ cin>>student[i].a>>student[i].b>>student[i].c>>student[i].d; student[i].e=student[i].b+student[i].c+student[i].d; } int sum=student[0].e; int m=0; for(int i=0;i<n;i++){ if(student[i].e>sum){ m=i,sum=student[i].e; } } cout<<student[m].a<<" "<<student[m].b<<" "<<student[m].c<<" "<<student[m].d; return 0; } ```
by _th_tw_on_ @ 2024-05-14 13:00:50


@[_th_tw_on_](/user/987530) 谢谢
by Pharaoh_ @ 2024-05-14 23:34:13


|