| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Help 。。。。WA了N次...汗...高人看看我错在那里?
program a123;
var
a,b:integer;
c:string[100];
ecode,pv,p,slv,smax,pmin,pt:longint;
tm,win:string[100];
K,S:string[255];
N,sv:integer;
Begin
readln(n);
pmin:=maxlongint;
smax:=0;
for p:=1 to N do
begin
readln(K);
s:=copy(K,1,pos(' ',K)-1);
tm:=s;
slv:=0;pt:=0;
s:=copy(K,pos(' ',K)+1,length(K)-pos(' ',K)-1);
for sv:=1 to 4 do
begin
c:=copy(S,1,pos(' ',s)-1);
val(c,b,ecode);
s:=copy(S,pos(' ',S)+1,length(S)-pos(' ',S));
c:=copy(S,1,pos(' ',s)-1);
Val(c,a,ecode);
if ecode<>0 then begin writeln(c); writeln(s);end;
if a<>0 then begin slv:=slv+1;
pt:=pt+a+(b-1)*20; end;
end;
if slv>smax then begin
win:=tm;smax:=slv;pmin:=pt;
end else if slv=smax then if (pt<pmin)and(pt<>0) then begin
win:=tm;smax:=slv;pmin:=pt;
end;
end;
writeln(win,' ',smax,' ',pmin);
End.
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator