Cod sursa(job #392808)

Utilizator tiger_10Dutescu Radu Alin tiger_10 Data 8 februarie 2010 13:14:04
Problema Subsir crescator maximal Scor 10
Compilator fpc Status done
Runda Arhiva educationala Marime 0.67 kb
var i,n,k,p,d,a:longint;
        f,g:text;
begin
        assign(f,'scmax.in');
        reset(f);
        readln(f,n);
        k:=0;
        p:=0;
        d:=-maxint;
        for i:=1 to n do begin
                read(f,a);
                if a>d then begin
                        inc(p);
                        if p>k then k:=p;
                        end
                        else begin
                        if a<d then


                                p:=1;
                             end;

                d:=a;

        end;
        close(f);
        assign(g,'scmax.out');
        rewrite(g);
        writeln(g,k);
        close(g);


end.