Nonsense
I’m almost at one hundred fans, ninety-nine fans, and the last fan is depending on you!
topic
P1051 [NOIP2005 提高组] Who received the most scholarships?
Ideas
Explosive search hanging machine, hit the meter out of the province!
Code
#include
using namespace std;
signed main() {
int n,score1,score2,sum=0,max=0,total=0,x,i;
char a,b;
string name,maxn;
cin>>n;
for(i=1; i>name>>score1>>score2>>a>>b>>x;
if(score1>80&&x>0) { //ÅжÏÊÇ·ñ»ñµÃԺʿ½±Ñ§½ð
sum+=8000;
}
if(score1>85&&score2>80) { //ÅжÏÊÇ·ñ»ñµÃÎåËĽ±Ñ§½ð
sum+=4000;
}
if(score1>90) { //ÅжÏÊÇ·ñ»ñµÃ³É¼¨ÓÅÐã½±
sum+=2000;
}
if(score1>85&&b==’Y’) { //ÅжÏÊÇ·ñ»ñµÃÎ÷²¿½±Ñ§½ð
sum+=1000;
}
if(score2>80&&a==’Y’) { //ÅжÏÊÇ·ñ»ñµÃ°à¼¶¹±Ï×½±
sum+=850;
}
total+=sum;//ÀÛ¼Ó½±Ñ§½ð
if(sum>max) { //ÕÒ³ö×îţѧÉú
maxn=name;
max=sum;//sumµÄÓô¦
}
sum=0;
}
cout
Conclusion
Please like and follow us now!