大佬们救救我,为什么题例过了,我还是0分,我活不下去了

#include<iostream>
#include<cstring>
using namespace std;
class STUDENT{
private:
char name;
int score1;
int score2;
char ifleader;
char ifwest;
int scholar;
public:
STUDENT(char a[],int a1,int a2,char YN,char yn,int number){
name=a;
score1=a1;
score2=a2;
ifleader=YN;
ifwest=yn;
scholar=number;
}
int panduan(){
int award=0;
if(score2>80&&ifleader=='Y'){
award+=850;
}
if(score1>85&&score2>80){
award+=4000;
}
if(score1>85&&ifwest=='Y'){
award+=1000;
}
if(score1>80&&scholar>=1){
award+=8000;
}
if(score1>90){
award+=2000;
}
return award;
}
char
showname(){
return name;
}
}
;
int main(){
int account;
STUDENT *ptr[101];
char namer[20];
char *point;
int max=0;
char a[30];
int b,c,f;
int total=0;
char d,e;
int i;
cin>>account;
for(i=0;i<account;i++){
cin.getline(a,30,' ');
cin>>b>>c>>d>>e>>f;
ptr[i]=new STUDENT(a,b,c,d,e,f);
total+=ptr[i]->panduan();
if(max<ptr[i]->panduan()){
point=strcpy(namer,ptr[i]->showname());
max=ptr[i]->panduan();
}
}
cout<<point<<endl;
cout<<max<<endl;
cout<<total;
delete ptr;
}

1 条评论

  • @ 2019-10-12 22:06:31

    样例过了0分不是很正常么?

  • 1

信息

ID
1001
难度
5
分类
模拟 点击显示
标签
递交数
34222
已通过
11380
通过率
33%
被复制
14
上传者