Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses crt;
- function solve():longint;
- var
- i,n,tmp,max:longint;
- a:array[1..100] of longint;
- begin
- readln(n);
- tmp:=1;
- max:=0;
- read(a[1]);
- for i:=2 to n do
- begin
- read(a[i]);
- if a[i]=a[i-1] then inc(tmp)
- else tmp:=1;
- if tmp>max then max:=tmp;
- end;
- readln();
- solve:=max;
- end;
- begin
- clrscr();
- writeln(solve());
- readln();
- end.
Advertisement
Add Comment
Please, Sign In to add comment