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

Please, give me Test 13!
Posted by Novikov Mihail (Lyceum #1) 23 Sep 2008 01:36
Please, give me Test 13!
Re: Please, give me Test 13!
Posted by Novikov Mihail (Lyceum #1) 23 Sep 2008 01:43
Yes, I get AC!
Re: Please, give me Test 13!
Posted by SochiX 8 Oct 2008 23:33
Please, help me TEST 13 - WRONG ANSWER!
Here my ALGO:
program SOlve;

const MAX=50000;
var A,B:array[1..MAX] of integer;
   A_MAX,B_MAX,i,j,k,_END:integer;
    SUM:integer;

begin
readln(A_MAX);
for i:=1 to A_MAX do
 read(A[i]);
readln(B_MAX);
for i:=1 to B_MAX do
 read(B[i]);
//The main FUCK!

I:=1;
J:=1;
_END:=A_MAX + B_MAX;
for k:=1 to _END do
begin
if A[i] + B[j] = 10000 then
begin
writeln('YES');
break;
end;
if A[i] + B[j] > 10000 then if k <> _END then inc(j)
else
writeln('NO');
if A[i] + B[j] < 10000 then if k <> _END then inc(i)
else
writeln('NO');
end;

end.

I think that some bugs can be here:
_END:=A_MAX + B_MAX;
for k:=1 to _END do

Wait for answer....
P.s sorry for my English