- Vs Snowy
- 2009-08-31 21:26:57 @
program piano;
var
i,j,l,k,m,n,t,p,q:longint;
a:array[1..100]of string;
b:array[1..1000]of string;
c:array[1..255]of longint;
begin
readln(k);
for l:=1 to k do begin
read(p);
readln(q);
for i:=1 to p do readln(a[i]);
for i:=1 to q do readln(b[i]);
if p>q then begin
write('For ',l,'# problem we need 0');
exit;
end;
for i:=1 to p do begin
for j:=1 to q do begin
if a[i]=b[j]
then break
else if j=q
then begin
write('For ',l,'# problem we need 0');
exit;
end;
end;
end;
for i:=1 to p do begin
for j:=1 to q do begin
if b[i]=a[j]
then c[i]:=c[i]+1;
end;
if c[i]
0 条评论
目前还没有评论...