var pos,neg: integer; i,k,x: integer; ev,un: integer; a,b: array [1..n] of integer;
begin for i := 1 to n do read(a[i]); k := 0; pos := 0; neg := 0; for i := 1 to n do begin ev := 0; un := 0; x := a[i]; if x <> 0 then if x > 0 then if (x < pos) or (pos = 0) then pos := x else else if (x > neg) or (neg = 0) then neg := x; x := abs(x); while x <> 0 do begin if odd(x) then un := un + 1 else ev := ev + 1; x := x div 10 end; if un = ev then begin k := k + 1; b[k] := a[i] end end;
writeln(pos,' ',neg); for i := 1 to k do write(b[i],' ') end.
ответ:Луг, Болото
Объяснение: