Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Project2;
- {$APPTYPE CONSOLE}
- uses
- SysUtils;
- var
- a: array [1..100000] of integer;
- i, j, n, m, f, max: integer;
- function mx(a, b: integer): integer;
- begin
- if(a > b)then mx := a
- else mx := b;
- end;
- begin
- readln(n);
- for i := 1 to n do
- begin
- for j := 1 to 10000 do a[j] := 0;
- max := 0;
- readln(m);
- for j := 1 to m do
- begin
- read(f);
- inc(a[j]);
- inc(a[f]);
- max := mx(max, a[j]);
- max := mx(max, a[f]);
- end;
- writeln(max);
- end;
- end.
Add Comment
Please, Sign In to add comment