Cod sursa(job #359571)

Utilizator tiger_10Dutescu Radu Alin tiger_10 Data 27 octombrie 2009 15:44:32
Problema Subsir crescator maximal Scor 0
Compilator fpc Status done
Runda Arhiva educationala Marime 0.61 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)
                        else begin

                                if p>k then k:=p;
                                p:=0;
                                end;
                d:=a;

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


end.