|
|
back to boardWhy 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??? Probably because the arrays should be 1..50000 istead of 1..1000 |
|
|