const n=10000; type m=array[1..n]of integer; procedure b(a:m); begin var f,g:integer; readln(g); for var i:=1 to g do readln(a[i]); f:=a[1]; for var i:=2 to g do if f