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

Why crash???
Posted by a.kim 24 Oct 2009 13:21
var
   a:array[1..1000]of integer;
   b:array[1..1000]of integer;
   n,m,i,j:integer;
   s:string;
begin
readln(n);
for i:=1 to n do
readln(a[i]);
readln(m);
for j:=1 to m do
readln(b[j]);

s:='NO';
for i:=1 to n do
    for j:=1 to m do
    if a[i]+b[j]=10000 then s:='YES';
writeln(s);
end.
Re: Why crash???
Posted by Andrew Suhani 24 Mar 2011 01:26
Probably because the arrays should be 1..50000 istead of 1..1000