|
|
back to boardPlease, give me Test 13! Please, give me Test 13! Re: Please, give me Test 13! 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 |
|
|