非一般的读入方式比较简单啊

const

v:array[1..5] of integer=(8000,4000,2000,1000,850);

var

n:longint;

nam:array[1..100] of string;

a,b,ans:array[1..100] of longint;

d,e,f:array[1..100] of boolean;

i,j,k,t,max,m:longint;

c:char;

begin

fillchar(d,sizeof(d),false);

fillchar(d,sizeof(e),false);

fillchar(d,sizeof(f),false);

t:=0;max:=0;

readln(n);

for i:=1 to n do

begin

nam[i]:='';

read(c);

while c' ' do

begin

nam[i]:=nam[i]+c;

read(c);

end;

read(a[i],b[i]);

read(c);read(c);if c='Y' then d[i]:=true;

read(c);read(c);if c='Y' then e[i]:=true;

read(c);readln(k);if k0 then f[i]:=true;

if (a[i]>80) and (f[i]) then ans[i]:=ans[i]+v[1];

if (a[i]>85) and (b[i]>80) then ans[i]:=ans[i]+v[2];

if a[i]>90 then ans[i]:=ans[i]+v[3];

if (a[i]>85) and (e[i]) then ans[i]:=ans[i]+v[4];

if (b[i]>80) and (d[i]) then ans[i]:=ans[i]+v[5];

t:=t+ans[i];

if ans[i]>max then begin max:=ans[i];m:=i; end;

end;

writeln(nam[m]);

writeln(max);

writeln(t);

end.

省了很多事吧呵呵

2 条评论

  • @ 2009-10-18 12:40:29

    PascalC

    这倒是,C有时候就显得比较imba……

  • @ 2009-10-18 08:57:47

    ...

    说句实话,C的scanf读入更简单

  • 1

信息

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