记录编号 |
50521 |
评测结果 |
AAAAAAAAAA |
题目名称 |
[NOIP 2005]谁拿了最多奖学金 |
最终得分 |
100 |
用户昵称 |
digital-T |
是否通过 |
通过 |
代码语言 |
Pascal |
运行时间 |
0.004 s |
提交时间 |
2012-11-24 13:32:44 |
内存使用 |
0.19 MiB |
显示代码纯文本
var
n,k,max:longint;
s:string;
qm,bj,lw,jj:array[1..100]of longint;
gb,xb:array[1..100]of char;
names:array[1..100]of string;
procedure init;
var
i,x,y,z:longint;
t:string;
tt:char;
begin
y:=0;
readln(n);
for i:= 1 to n do
begin
s:='';
read(tt);
while tt<>' ' do
begin
s:=s+tt;
read(tt);
end;
names[i]:=s;
read(qm[i],bj[i]);
read(tt);
read(gb[i]);
read(tt);
read(xb[i]);
readln(lw[i]);
end;
end;
procedure main;
var
i,x,y:longint;
begin
max:=0;
for i:= 1 to n do
begin
if (qm[i]>80) and (lw[i]>0) then inc(jj[i],8000);
if (qm[i]>85) and (bj[i]>80) then inc(jj[i],4000);
if (qm[i]>90) then inc(jj[i],2000);
if (qm[i]>85) and (xb[i]='Y') then inc(jj[i],1000);
if (bj[i]>80) and (gb[i]='Y') then inc(jj[i],850);
end;
for i:= 1 to n do if jj[i]>max then
begin
k:=i;
max:=jj[i];
end;
end;
procedure print;
var
i,x,y,w:longint;
begin
w:=0;
writeln(names[k]);
writeln(jj[k]);
for i:= 1 to n do inc(w,jj[i]);
writeln(w);
end;
begin
assign(input,'scholar.in');reset(input);
assign(output,'scholar.out');rewrite(output);
init;
main;
print;
close(input);
close(output);
end.