- 谁拿了最多奖学金
- 2010-07-17 08:06:17 @
帮忙看看那里错了吧3.....
program Proj52571;
var w,b,c,g:array[1..1000]of integer;
a,f:array[1..1000]of string;
d,e:array[1..1000]of string;
n,m,p,k:integer;
procedure soso(l,r:integer);
var i,j,v,q:integer; h:string;
begin
i:=l;
j:=r;
v:=w[l];
repeat
while w[i]v do dec(j);
if ij;
if l=1)then w[m]:=w[m]+8000;
if (b[m]>85)and(c[m]>80)then w[m]:=w[m]+4000;
if b[m]>90 then w[m]:=w[m]+2000;
if (b[m]>85) and(e[m]='Y') then w[m]:=w[m]+1000;
if (c[m]>80) and(d[m]='Y') then w[m]:=w[m]+850;
end;
soso(1,n);
writeln(a[m]);
writeln(w[m]);
for m:=1 to n do k:=w[m]+k;
writeln(k);
readln;
readln;
end.
1 条评论
-
zlyfunction LV 5 @ 2010-07-17 13:59:58
保证全对 仅供参考 翻录必究
Program Zax;
Var
n,Ma,Po:integer;
Su:longint;
ls:char;
Name:array [1..150] of string;
So1,So2,Article,Money:array [1..150] of integer;
O1,O2:array [1..150] of boolean;
Procedure Readin;
Var
i,j:integer;
begin
Fillchar(so1,sizeof(so1),0);
fillchar(so2,sizeof(so2),0);
Readln(n);
For i:=1 to n do
begin
j:=1;
Repeat
Read(ls);
If ls' '
then begin Insert(ls,Name[i],j); j:=j+1; end
else Break;
Until ls=' ';
read(so1[i]); Read(so2[i]);
read(ls); Read(ls); If ls='Y' then o1[i]:=true else o1[i]:=false;
read(ls); Read(ls); If ls='Y' then o2[i]:=true else o2[i]:=false;
Readln(Article[i]);
end;
end;
Procedure Reward;
Var
i:integer;
begin
Su:=0;
Ma:=0;
Fillchar(Money,Sizeof(money),0);
For i:=1 to n do
begin
If (So1[i]>80) and (Article[i]>0)
then
Money[i]:=Money[i]+8000;
If (So1[i]>85) and (So2[i]>80)
then
Money[i]:=Money[i]+4000;
If So1[i]>90
then
Money[i]:=Money[i]+2000;
If (So1[i]>85) and (o2[i])
then
Money[i]:=Money[i]+1000;
If (So2[i]>80) and (o1[i])
then
Money[i]:=Money[i]+850;
Su:=Su+Money[i];
If Money[i]>Ma
then begin Ma:=Money[i]; Po:=i; end;
end;
end;
{==================================================}
Begin
Readin;
Reward;
Writeln(Name[po]);
Writeln(Ma);
Writeln(Su);
End.
- 1