崩溃 对90 求助!!!

#include<cstdio>
#include<cstring>
int n,score1,score2,ans,l,num,k;
char name[101][20],c1,c2;
int main (){
scanf("%d",&n);
for(int i=1;i<=n;i++){
scanf("%s %d %d %c %c %d",&name[i],&score1,&score2,&c1,&c2,&l);
int tot=0;
if(score1>80&&l>0) tot+=8000;
if(score1>85&&score2>80) tot+=4000;
if(score1>90) tot+=2000;
if(score1>85&&c2=='Y') tot+=1000;
if(score2>80&&(c1=='Y')) tot+=850;
if(tot>ans) { ans=tot; k=i; }
num+=tot;
}
printf("%s\n%d\n%d\n",name[k],ans,num);
return 0;
}
测试数据 #0: WrongAnswer, time = 0 ms, mem = 256 KiB, score = 0
测试数据 #1: Accepted, time = 0 ms, mem = 260 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 260 KiB, score = 10
测试数据 #3: Accepted, time = 0 ms, mem = 256 KiB, score = 10
测试数据 #4: Accepted, time = 0 ms, mem = 260 KiB, score = 10
测试数据 #5: Accepted, time = 0 ms, mem = 256 KiB, score = 10
测试数据 #6: Accepted, time = 0 ms, mem = 260 KiB, score = 10
测试数据 #7: Accepted, time = 0 ms, mem = 256 KiB, score = 10
测试数据 #8: Accepted, time = 0 ms, mem = 260 KiB, score = 10
测试数据 #9: Accepted, time = 0 ms, mem = 260 KiB, score = 10

1 条评论

  • @ 2015-07-29 12:57:20

    请在贴代码时选中全部复制过来的代码按一下**Tab**。贴评测结果最好在每一行前加一个>来使其变成块状引用。
    如:
    >测试数据 #0: WrongAnswer, time = 0 ms, mem = 256 KiB, score = 0
    测试数据 #1: Accepted, time = 0 ms, mem = 260 KiB, score = 10
    测试数据 #2: Accepted, time = 0 ms, mem = 260 KiB, score = 10
    测试数据 #3: Accepted, time = 0 ms, mem = 256 KiB, score = 10
    测试数据 #4: Accepted, time = 0 ms, mem = 260 KiB, score = 10
    测试数据 #5: Accepted, time = 0 ms, mem = 256 KiB, score = 10
    测试数据 #6: Accepted, time = 0 ms, mem = 260 KiB, score = 10
    测试数据 #7: Accepted, time = 0 ms, mem = 256 KiB, score = 10
    测试数据 #8: Accepted, time = 0 ms, mem = 260 KiB, score = 10
    测试数据 #9: Accepted, time = 0 ms, mem = 260 KiB, score = 10
    得到结果是:

    测试数据 #0: WrongAnswer, time = 0 ms, mem = 256 KiB, score = 0
    测试数据 #1: Accepted, time = 0 ms, mem = 260 KiB, score = 10
    测试数据 #2: Accepted, time = 0 ms, mem = 260 KiB, score = 10
    测试数据 #3: Accepted, time = 0 ms, mem = 256 KiB, score = 10
    测试数据 #4: Accepted, time = 0 ms, mem = 260 KiB, score = 10
    测试数据 #5: Accepted, time = 0 ms, mem = 256 KiB, score = 10
    测试数据 #6: Accepted, time = 0 ms, mem = 260 KiB, score = 10
    测试数据 #7: Accepted, time = 0 ms, mem = 256 KiB, score = 10
    测试数据 #8: Accepted, time = 0 ms, mem = 260 KiB, score = 10
    测试数据 #9: Accepted, time = 0 ms, mem = 260 KiB, score = 10

  • 1

信息

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