Buggy python submission (verdict: Runtime Error):
mod = 10**9+7
n,m = map(int,input().split())
a = set([int(input()) for _ in range(M)])
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0

print(dp[n])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
A = tuple([int(input()) for _ in range(M)])
mod = 1000000007
dp=[0]*(N+1)
dp[0]=1
if M != 0:
    if A[0]!=1:
        dp[1]=1 
    else:
        dp[1]=0
else:
    dp[1]=1
    
for i in range(2,N+1):
    if i in A:
        dp[i]=0
    else:
        dp[i] = (dp[i-1]+dp[i-2])%mod

print(dp[-1])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
A = []
for i in range(M):
    A.append(int(input()))
mod = 1000000007
dp=[0]*(N+1)
dp[0]=1
if M != 0:
    if A[0]!=1:
        dp[1]=1 
    else:
        dp[1]=0
else:
    dp[1]=1
    
for i in range(2,N+1):
    if i in A:
        dp[i]=0
    else:
        dp[i] = (dp[i-1]+dp[i-2])%mod

print(dp[-1])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = []
for i in range(M):
    A.append(int(input()))
mod = 1000000007
dp=[0]*(N+1)
dp[0]=1
if A[0]!=1:dp[1]=1 
else:dp[1]=0
    
for i in range(2,N+1):
    if i in A:
        dp[i]=0
    else:
        dp[i] = (dp[i-1]+dp[i-2])%mod

print(dp[-1])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = [int(input()) for _ in range(M)]
mod = 1000000007
dp=[0]*(N+1)
dp[0]=1
if A[0]!=1:dp[1]=1 
else:dp[1]=0
    
for i in range(2,N+1):
    if i in A:
        dp[i]=0
    else:
        dp[i] = (dp[i-1]+dp[i-2])%mod

print(dp[-1])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = [int(input()) for _ in range(M)]
mod = 1000000007
dp=[0]*(N+1)
dp[0]=1
if A[0]!=1:dp[1]=1 
else:dp[1]=0
    
for i in range(2,N+1):
    if i in A:
        dp[i]=0
    else:
        dp[i] = (dp[i-1]+dp[i-2])%mod

print(dp[N])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
def main():
  import sys
  input = sys.stdin.readline

  N,M = map(int,input().split())
  A = tuple([int(input()) for _ in range(M)])
  
  dp = [0]*(N+1)
  dp[0] = 1
  if 1 in A:
    dp[1] = 0
  else:
    dp[1] = 1

  for i in range(2,N+1):
    if i not in A:
      dp[i] = (dp[i-1] + dp[i-2])%1000000007
    else:
      continue
  print(dp[N])

if __name__ == "__main__":
  main()

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
def main():
  import sys
  input = sys.stdin.readline

  N,M = map(int,input().split())
  A = [int(input()) for _ in range(M)]
  
  dp = [0]*(N+1)
  dp[0] = 1
  if 1 in A:
    dp[1] = 0
  else:
    dp[1] = 1

  for i in range(2,N+1):
    if i not in A:
      dp[i] = (dp[i-1] + dp[i-2])%1000000007
    else:
      dp[i] = 0
  print(dp[N])

if __name__ == "__main__":
  main()

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
def main():
  N,M = map(int,input().split())
  A = [int(input()) for _ in range(M)]
  
  dp = [0]*(N+1)
  dp[0] = 1
  if 1 in A:
    dp[1] = 0
  else:
    dp[1] = 1

  for i in range(2,N+1):
    if i not in A:
      dp[i] = (dp[i-1] + dp[i-2])%1000000007
    else:
      dp[i] = 0
  print(dp[N])

if __name__ == "__main__":
  main()

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
A = [int(input()) for _ in range(M)]

dp = [0]*(N+1)
dp[0] = 1
if 1 in A:
  dp[1] = 0
else:
  dp[1] = 1

for i in range(2,N+1):
  if i not in A:
    dp[i] = (dp[i-1] + dp[i-2])%1000000007
  else:
    dp[i] = 0

print(dp[N])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
H = []
for i in range(M):
  H.append(int(input()))

dp = [0]*(N+1) # 初期条件
dp[0] = 1
dp[1] = 0 if 1 in H else 1
for i in range(2,N+1):
  if i in H:
    dp[i] = 0
  else:
    dp[i] = (dp[i-1]+dp[i-2])%1000000007
    
print(dp[-1])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
H = []
for i in range(M):
  H.append(int(input()))

dp = [0]*(N+1) # 初期条件
dp[0] = 1
dp[1] = 0 if 1 in H else 1
for i in range(2,N+1):
      if i in H:
        dp[i] = 0
      else:
        dp[i] = (dp[i-1]+dp[i-2])%1000000007

print(dp[-1])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = []
for i in range(M):
  H.append(int(input()))

dp = [0]*N # 初期条件
dp[0] = 1
dp[1] = 0 if 1 in H else 1
for i in range(2,N):
      if i in H:
        dp[i] = 0
      else:
        dp[i] = (dp[i-1]+dp[i-2])%1000000007

print(dp[N-1])

Fixed submission:
mod = 10**9+7
n,m = map(int,input().split())
a = set()
for i in range(m):
  a.add(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print(dp[n])