PersonalCorpus 版 (精华区)
153707 08:13:18 4 Mar 2002
Bozhang,HIT,P.R.China 1021 Pascal Accepted 0.06 sec 114K
var
a:array[-32768..32767] of boolean;
i,n:integer;
begin
fillchar(a,sizeof(a),0);
readln(n);
while n>0 do begin dec(n); readln(i); a[i]:=true end;
readln(n);
while n>0 do begin
dec(n); readln(i);
if i>=10000 then begin
if a[i-10000] then begin
writeln('YES');
halt;
end;
end else if i>-22768 then if a[10000-i] then begin
writeln('YES');halt
end;
end;
writeln('NO');
end.
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.417毫秒