Cod sursa(job #301390)
Utilizator | Data | 8 aprilie 2009 10:16:10 | |
---|---|---|---|
Problema | Subsir crescator maximal | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva educationala | Marime | 0.37 kb |
var t,te:text;
x,y:array[0..100000] of longint;
i,j,a,b,n:longint;
begin
assign(t,'scmax.in'); reset(t);
for i:=1 to n do
begin
read(t,a);
if a>x[i-1] then
begin
j:=j+1;
x[j]:=a;
end;
end;
close(t);
assign(t,'scmax.out'); rewrite(t);
write(t,x[1]);
for i:=2 to j do
write(t,' ',x[i]);
close(t);
end.