Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
A=[int(input()) for _ in range(m)]
mod=10**9+7

dp=[0]*(n+1)
dp[0]=1
if 1 not in A:
   dp[1]=1

for i in range(2,n+1):
   if i not in A:
      dp[i]=dp[i-1]+dp[i-2]
print(dp[-1]%mod)

Fixed submission:
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]

ai=0
n1,n2=0,1
for i in range(1,n+1):
      if ai<m and i==A[ai]:
            ai+=1
            n1=n2
            n2=0
      else:
            tmp=n2
            n2=(n1+n2)%1000000007
            n1=tmp
print(n2)

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
A=[int(input()) for _ in range(m)]
mod=10**9+7

dp=[0]*(n+1)
dp[0]=1
if 1 not in A:
   dp[1]=1

for i in range(2,n+1):
   if i not in A:
      dp[i]=dp[i-1]+dp[i-2]
print(dp[-1]%mod)

Fixed submission:
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]

ai=0
n1,n2=0,1
for i in range(1,n+1):
      if ai<m and i==A[ai]:
            ai+=1
            n1=n2
            n2=0
      else:
            tmp=n2
            n2=(n1+n2)%1000000007
            n1=tmp
print(n2)

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
a=[int(input()) for _ in range(m)]
mod=10**9+7

dp=[0]*(n+1)
dp[0]=1
if 1 not in a:
      dp[1]=1
for i in range(2,len(dp)):
      if i not in a:
            dp[i]=dp[i-1]+dp[i-2]
      
print(dp[-1]%mod)

Fixed submission:
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]

ai=0
n1,n2=0,1
for i in range(1,n+1):
      if ai<m and i==A[ai]:
            ai+=1
            n1=n2
            n2=0
      else:
            tmp=n2
            n2=(n1+n2)%1000000007
            n1=tmp
print(n2)

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
mod=10**9+7

x=1 if 1 not in a else 0
dp=[1,x]+[0]*(n-1)

for i in range(2,n+1):
    if i in a:#階段破損部位は無視する
        continue
    dp[i]=(dp[i-1]+dp[i-2])
print(dp[-1]%mod)

Fixed submission:
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]

ai=0
n1,n2=0,1
for i in range(1,n+1):
      if ai<m and i==A[ai]:
            ai+=1
            n1=n2
            n2=0
      else:
            tmp=n2
            n2=(n1+n2)%1000000007
            n1=tmp
print(n2)

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
mod=10**9+7

x=1 if 1 not in a else 0
dp=[1,x]+[0]*(n-1)

for i in range(2,n+1):
    if i in a:#階段破損部位は無視する
        continue
    dp[i]=(dp[i-1]+dp[i-2])
print(dp[-1]%mod)

Fixed submission:
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]

ai=0
n1,n2=0,1
for i in range(1,n+1):
      if ai<m and i==A[ai]:
            ai+=1
            n1=n2
            n2=0
      else:
            tmp=n2
            n2=(n1+n2)%1000000007
            n1=tmp
print(n2)

Buggy python submission (verdict: Runtime Error):
m = map(int, (input().split()))
a = {int(input()) for i in range(m)}
mod = 10 ** 9 + 7
 
x = 1 if 1 not in a else 0
dp = [1, x] + [0] * (n - 1)
 
for i in range(2, n + 1):
    if i in a:
        continue
    dp[i] = (dp[i - 1] + dp[i - 2])
 
print(dp[-1] % mod)

Fixed submission:
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]

ai=0
n1,n2=0,1
for i in range(1,n+1):
      if ai<m and i==A[ai]:
            ai+=1
            n1=n2
            n2=0
      else:
            tmp=n2
            n2=(n1+n2)%1000000007
            n1=tmp
print(n2)

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
L=[int(input()) for i in range(m)]
 
NL=[0]*(n+1)
NL[0],NL[1]=1,1
 
if 1 in L:
      NL[1]=0
      
for i in range(2,n+1):
      if i in L:
            NL[i]=0
      else:
            NL[i]=NL[i-2]+NL[i-1]
          
if NL[-1]>=1000000007:
  print(NL[-1]%1000000007)
else:
  print(NL[-1])

Fixed submission:
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]

ai=0
n1,n2=0,1
for i in range(1,n+1):
      if ai<m and i==A[ai]:
            ai+=1
            n1=n2
            n2=0
      else:
            tmp=n2
            n2=(n1+n2)%1000000007
            n1=tmp
print(n2)

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
L=[int(input()) for i in range(m)]

NL=[0]*(n+1)
NL[0],NL[1]=1,1

if 1 in L:
      NL[1]=0
      
for i in range(2,n+1):
      if i in L:
            NL[i]=0
      else:
            NL[i]=NL[i-2]+NL[i-1]
print(NL[-1]%1000000007)

Fixed submission:
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]

ai=0
n1,n2=0,1
for i in range(1,n+1):
      if ai<m and i==A[ai]:
            ai+=1
            n1=n2
            n2=0
      else:
            tmp=n2
            n2=(n1+n2)%1000000007
            n1=tmp
print(n2)

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
L=[int(input()) for i in range(m)]

NL=[0]*(n+1)
NL[0],NL[1]=1,1

if 1 in L:
      NL[1]=0
      
for i in range(2,n+1):
      if i in L:
            NL[i]=0
      else:
            NL[i]=NL[i-2]+NL[i-1]
print(NL[-1]%1000000007)

Fixed submission:
n,m=map(int,input().split())
A=[int(input()) for i in range(m)]

ai=0
n1,n2=0,1
for i in range(1,n+1):
      if ai<m and i==A[ai]:
            ai+=1
            n1=n2
            n2=0
      else:
            tmp=n2
            n2=(n1+n2)%1000000007
            n1=tmp
print(n2)