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 |
怎么WA了??、、、、、、、、program p2403; var i,j,n,sum,m:longint; s:array[1..1000] of string; a:array[1..1000] of longint; t:ansistring; c:char; begin readln(m,n); for i:=1 to m do begin t:=''; read(c); while c<>' ' do begin t:=t+c; read(c); end; s[i]:=t; readln(a[i]); end; for i:=1 to n do begin sum:=0; readln(t); while t<>'.' do begin for j:=1 to m do while pos(s[j],t)<>0 do begin inc(sum,a[j]); delete(t,pos(s[j],t),length(s[j])); end; readln(t); end; writeln(sum); end; end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator