import sys input = sys.stdin.readline T=int(input()) for _ in range(T): N,M=map(int,input().split()) A=list(map(int,input().split())) for i in range(N-1): if A[i]+A[i+1]