//Pascal ABC.NET 3.1 сборка 1219
Var
f:text;
c,n1,n2,i:integer;
ar1,ar2:array of real;
r:real;
begin
readln(c);
assign(f,'INPUT.TXT');
reset(f);
while not(Eof(f)) do
begin
read(f,r);
if r>c then
begin
inc(n1);
setlength(ar1,n1);
ar1[n1-1]:=r;
end;
if r begin
inc(n2);
setlength(ar2,n2);
ar2[n2-1]:=r;
end;
end;
close(f);
assign(f,'OUTPUT1.TXT');
rewrite(f);
for i:=0 to n1-1 do
if i<>n1-1 then write(f,ar1[i],' ') else write(f,ar1[i]);
close(f);
writeln('Count of values in OUTPUT1.TXT:',n1);
assign(f,'OUTPUT2.TXT');
rewrite(f);
for i:=0 to n2-1 do
if i<>n2-1 then write(f,ar2[i],' ') else write(f,ar2[i]);
close(f);
writeln('Count of values in OUTPUT2.TXT:',n2);
end.
Пример ввода:
2
Содержимое INPUT.TXT:
1.5 1.75 2 2.25 2.5
Содержимое OUTPUT1.TXT:
2.25 2.5
Содержимое OUTPUT2.TXT:
1.5 1.75
Пример вывода:
Count of values in OUTPUT1.TXT:2
Count of values in OUTPUT2.TXT:2