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 N4 asis!!!!!! Help PLEASE
Posted by KAKTUS_OK 16 Jan 2008 19:09
TEST N4 asis!!!!!! Help PLEASE
Re: TEST N4 asis!!!!!! Help PLEASE
Posted by Eyyub A O T L . 8 Mar 2008 18:04
var a:array[1..50001]of integer;
n,i,j,k,m:longint;
begin read(n);
for i:=1 to n do read(a[i]);
read(m);
for i:=1 to m do
begin read(k);
for j:=1 to n do
if (a[j]+k=10000) then
begin write('YES');
halt(0);
end;
end;
write('NO');
end.
KAKTUS_OK wrote 16 January 2008 19:09
TEST N4 asis!!!!!! Help PLEASE
Re: TEST N4 asis!!!!!! Help PLEASE
Posted by Madhav 13 Jun 2008 02:03
I don't know pascal but i feel that once you have found the value you print "YES" and end the program WITHOUT taking the
Entire input