ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1021. Sacrament of the Sum

Test 5
Posted by jsd 29 Mar 2013 19:42
I've got WA:



Var a,b:array[1..1000]of longint;n,k,i,j,o:shortint;
begin
o:=0;
read(n);
for i:=1 to n do read(a[i]);
read(k);
for j:=1 to k do read(b[j]);
for i:=1 to n do
for j:=1 to k do
if a[i]+b[j]=10000 then o:=1;
if o=0 then write('NO');
if o=1 then write('YES');
end.

Edited by author 29.03.2013 19:42