南开acm辅导老师
① 南开大学的一道ACM题;
// 10026.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int WheGet1(int a,int b)
...{
if(a>80&&b>0) return 1;
else return 0;
}
int WheGet2(int a,int b)
...{
if(a>85&&b>80) return 1;
else return 0;}
int WheGet3(int a)
...{
if(a>90) return 1;
else return 0;
}
int WheGet4(int a,char b)
...{
if(a>85&&b=='Y') return 1;
else return 0;
}
int WheGet5(int a,char b)
...{
if(a>80&&b=='Y') return 1;
else return 0;
}
int HowMany(int a, int b, char c, char d, int e)
...{
int i=0;
i=8000*WheGet1(a,e)+4000*WheGet2(a,b)+2000*WheGet3(a)+1000*WheGet4(a,d)+850*WheGet5(b,c);
return i;
}
int main()
...{
int N=0,Num1,Num2,Num3;
int Max=0,Total=0;
char char1,char2;
char str[20];
char TemStr[20];
cin>>N;
for(int j=0;j<N;j++)
...{
cin>>str>>Num1>>Num2>>char1>>char2>>Num3;
int temp=HowMany(Num1,Num2,char1,char2,Num3);
if(Max<temp)
...{
for(int k=0;k<20;k++) TemStr[k]=str[k];
Max=temp;
//Name=TemStr;
}
Total+=temp;
}
for(int m=0; TemStr[m]!='\0';m++)
cout<<TemStr[m];
cout<<endl;
cout<<Max<<endl;
cout<<Total;
return 0;
}
这是正确答案。你的题还没看。这个博客你去看看。希望对你有帮助。
② 南开OJ为什么不好上了(http://acm.nankai.e.cn/)拜托各位大神
因为换了一个服务器,但是那个网站又没通过政府注册,外网就不能访问