南開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/)拜託各位大神
因為換了一個伺服器,但是那個網站又沒通過政府注冊,外網就不能訪問