Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Help 。。。。

Posted by vxk at 2003-11-12 20:45:43 on Problem 1581
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator