Cod sursa(job #359572)

Utilizator tiger_10Dutescu Radu Alin tiger_10 Data 27 octombrie 2009 15:54:34
Problema Subsir crescator maximal Scor 5
Compilator fpc Status done
Runda Arhiva educationala Marime 0.64 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
                        inc(p);
                        if p>k then k:=p
                        else begin
                        if a<d then


                                p:=0;
                             end;

                d:=a;

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


end.