def main1(n,k,a): pre=a[-1] for i in reversed(range(k-1)): pre,now=a[i+1],a[i] if pre<40: break if pre-now in {1,3,5}: return False b=a[:] while b and b[-1]>=40:b.pop() if not b:return True ary=[0]*(b[-1]+1) for x in b:ary[x]=1 for i in reversed(range(1,b[-1]+1)): if i+6