- 谁拿了最多奖学金
- 2009-01-29 17:36:10 @
program East;
var n,i,max,m,k,j,l,q,z,b,w,lun:longint;
a:ansistring;
s:array[1..100] of ansistring;
name:array[1..100] of string;
qimo,banji,lunwen,all:array[1..100] of longint;
ganbu,xibu:array[1..100] of string;
begin
readln(n);
FOR i:=1 to n do
readln(s[i]);
for i:=1 to n do
begin
j:=0;
w:=length(s[i]);
repeat
inc(j);
insert(s[i][j],a,j);
until(s[i][j+1]=' ');
l:=j+2;
j:=0;
name[i]:=a;
a:='';
repeat
inc(j);
insert(s[i][l],a,j);
inc(l);
until(s[i][l]=' ');
val(a,q);
qimo[i]:=q;
j:=0;
z:=l+1;
a:='';
repeat
inc(j);
insert(s[i][z],a,j);
inc(z);
until(s[i][z]=' ');
val(a,b);
banji[i]:=b;
j:=0;
l:=z+1;
a:='';
repeat
inc(j);
insert(s[i][l],a,j);
inc(l);
until(s[i][l]=' ');
ganbu[i]:=a;
j:=0;
z:=l+1;
a:='';
repeat
inc(j);
insert(s[i][z],a,j);
inc(z);
until(s[i][z]=' ');
xibu[i]:=a;
a:='';
j:=0;
l:=z+1;
for z:=l to w do
begin
inc(j);
insert(s[i][z],a,j);
end;
val(a,lun);
lunwen[i]:=lun;
a:='';
end;
for i:= 1 to n do
writeln(name[i],qimo[i],banji[i],ganbu[i],xibu[i],lunwen[i]);
for i:=1 to n do
begin
if(qimo[i]>80)and(lunwen[i]>=1)then
all[i]:=all[i]+8000;
if(qimo[i]>85)and(banji[i]>80)then
all[i]:=all[i]+4000;
if(qimo[i]>90)then
all[i]:=all[i]+2000;
if(qimo[i]>85)and(xibu[i]='Y')then
all[i]:=all[i]+1000;
if(banji[i]>80)and(ganbu[i]='Y')then
all[i]:=all[i]+850;
end;
for i:=1 to n do
m:=m+all[i];
max:=-maxint;
for i:=1 to n do
if(all[i]>max)then
begin
max:=all[i];
k:=i;
end;
writeln(name[k]);
writeln(all[k]);
write(m);
end.
有点乱,麻烦大家帮帮忙
编译通过...
├ 测试数据 01:答案错误...程序输出比正确答案长
├ 测试数据 02:答案错误... ├ 标准行输出 IXrL...
├ 错误行输出 ET80...
├ 测试数据 03:答案错误...程序输出比正确答案长
├ 测试数据 04:答案错误...程序输出比正确答案长
├ 测试数据 05:答案错误...程序输出比正确答案长
├ 测试数据 06:答案错误...程序输出比正确答案长
├ 测试数据 07:答案错误...程序输出比正确答案长
├ 测试数据 08:答案错误... ├ 标准行输出 YBqi...
├ 错误行输出 PCvt...
├ 测试数据 09:答案错误...程序输出比正确答案长
├ 测试数据 10:答案错误... ├ 标准行输出 WtEE...
├ 错误行输出 VBNA...