n,m=map(int,input().split()) a=list(map(int,input().split())) for _ in range(m-1): right=0 cnt=0 for left in range(n): while right