实在想不出还有啥样本过不了
n = input() l = list(map(int, input().split())) l.append(0) max = 1 count = 0 for i in range(len(l) - 1): if l[i] == l[i + 1] - 1: count += 1 else: if count > max: max = count count = 0 print(max + 1)