|
|
вернуться в форумWHAT? TIME LIMIT EXCEEDED. PLEASE HELP! Послано mNT 23 июл 2018 12:30 type a = array[1..50000] of integer; b = array[1..50000] of integer;
Var c,d,i,k,g: integer; Var n: a; Var p: b;
begin d:= 0; read(c); for i:= 1 to c do read(n[i]); read(k); for i:= 1 to k do read(p[i]);
for i:=1 to c do for g:=1 to k do begin if (n[i] + p[g] = 10000) then begin writeln('YES'); exit; end else if (i = c) and (g = k) and (n[i] + p[g] <> 10000) then begin writeln('NO'); exit; end; end; end. |
|
|