Buggy python submission (verdict: Runtime Error):
n,m= map(int,input().split())
c = [True]*(n+1)
for _ in range(m):
    c[int(input())] = False
d = [0]*(n)
if c[1] : d[1] = 1
if c[2] : d[2] = d[1] + 1
for i in range(3,n+1):
    if c[i] : d[i] = ( d[i-1] + d[i-2] ) % 1000000007
print(d[n])

Fixed submission:
# DP
mod = 1000000007
 
n, m = map(int, input().split())
b_list = [True] * (n+1)
dp = [0 for _ in range(n+1)]
for i in range(m):
    b_list[int(input())] = False
 
dp[0] = 1
for i in range(n):
    for j in range(i+1, min(n, i+2)+1):
        if b_list[j] == True:
            dp[j] += dp[i]
            dp[j] %= mod
# print(b_list)
# print(dp)
print(dp[n])

Buggy python submission (verdict: Runtime Error):
n,m= map(int,input().split())
c = [True]*(n+1)
for _ in range(m):
    c[int(input())] = False
d = [0]*(n+1)
if c[1] : d[1] = 1
if c[2] : d[2] = d[1] + 1
for i in range(3,n+1):
    if c[i] :
        d[i] = ( d[i-1] + d[i-2] ) % 1000000007
print(d[n])

Fixed submission:
# DP
mod = 1000000007
 
n, m = map(int, input().split())
b_list = [True] * (n+1)
dp = [0 for _ in range(n+1)]
for i in range(m):
    b_list[int(input())] = False
 
dp[0] = 1
for i in range(n):
    for j in range(i+1, min(n, i+2)+1):
        if b_list[j] == True:
            dp[j] += dp[i]
            dp[j] %= mod
# print(b_list)
# print(dp)
print(dp[n])

Buggy python submission (verdict: Runtime Error):
n,m= map(int,input().split())
a = [int(input()) for _ in range(m)]
d = [0]*(n+1)
if not 1 in a : d[1] = 1
if not 2 in a : d[2] = d[1] + 1
for i in range(3,n+1):
    if i not in a :
        d[i] = ( d[i-1] + d[i-2] ) % 1000000007
print(d[n])

Fixed submission:
# DP
mod = 1000000007
 
n, m = map(int, input().split())
b_list = [True] * (n+1)
dp = [0 for _ in range(n+1)]
for i in range(m):
    b_list[int(input())] = False
 
dp[0] = 1
for i in range(n):
    for j in range(i+1, min(n, i+2)+1):
        if b_list[j] == True:
            dp[j] += dp[i]
            dp[j] %= mod
# print(b_list)
# print(dp)
print(dp[n])

Buggy python submission (verdict: Runtime Error):
def resolve():
    n,m= map(int,input().split())
    a = [int(input()) for _ in range(m)]
    d = [0]*(n+1)
    if not 1 in a : d[1] = 1
    if not 2 in a : d[2] = d[1] + 1
    for i in range(3,n+1):
        if not i in a :
            d[i] += ( d[i-1] + d[i-2] ) % 1000000007
    print(d[i])

resolve()

Fixed submission:
# DP
mod = 1000000007
 
n, m = map(int, input().split())
b_list = [True] * (n+1)
dp = [0 for _ in range(n+1)]
for i in range(m):
    b_list[int(input())] = False
 
dp[0] = 1
for i in range(n):
    for j in range(i+1, min(n, i+2)+1):
        if b_list[j] == True:
            dp[j] += dp[i]
            dp[j] %= mod
# print(b_list)
# print(dp)
print(dp[n])

Buggy python submission (verdict: Runtime Error):
n,m= map(int,input().split())
a = [int(input()) for _ in range(m)]
d = [0]*(n+1)
if not 1 in a : d[1] = 1
if not 2 in a : d[2] = d[1] + 1
for i in range(3,n+1):
    if not i in a :
        d[i] += d[i-1] + d[i-2]
print(d[i]%1000000007)

Fixed submission:
# DP
mod = 1000000007
 
n, m = map(int, input().split())
b_list = [True] * (n+1)
dp = [0 for _ in range(n+1)]
for i in range(m):
    b_list[int(input())] = False
 
dp[0] = 1
for i in range(n):
    for j in range(i+1, min(n, i+2)+1):
        if b_list[j] == True:
            dp[j] += dp[i]
            dp[j] %= mod
# print(b_list)
# print(dp)
print(dp[n])

Buggy python submission (verdict: Runtime Error):
def resolve():
    n,m= map(int,input().split())
    a = [int(input()) for _ in range(m)]
    d = [0]*(n+1)
    if not 1 in a : d[1] = 1
    if not 2 in a : d[2] = d[1] + 1
    for i in range(3,n+1):
        if not i in a :
            d[i] += d[i-1] + d[i-2]
    print(d[i]%1000000007)

resolve()


Fixed submission:
# DP
mod = 1000000007
 
n, m = map(int, input().split())
b_list = [True] * (n+1)
dp = [0 for _ in range(n+1)]
for i in range(m):
    b_list[int(input())] = False
 
dp[0] = 1
for i in range(n):
    for j in range(i+1, min(n, i+2)+1):
        if b_list[j] == True:
            dp[j] += dp[i]
            dp[j] %= mod
# print(b_list)
# print(dp)
print(dp[n])

Buggy python submission (verdict: Runtime Error):
def resolve():
    n,m= map(int,input().split())
    a = [int(input()) for _ in range(m)]
    d = [0]*(n+1)
    d[0] = 0
    d[1] = 1
    d[2] = 2
    for i in range(3,n+1):
        if not i in a :
            d[i] += d[i-1] + d[i-2]
    print(d[i]%1000000007)
resolve()


Fixed submission:
# DP
mod = 1000000007
 
n, m = map(int, input().split())
b_list = [True] * (n+1)
dp = [0 for _ in range(n+1)]
for i in range(m):
    b_list[int(input())] = False
 
dp[0] = 1
for i in range(n):
    for j in range(i+1, min(n, i+2)+1):
        if b_list[j] == True:
            dp[j] += dp[i]
            dp[j] %= mod
# print(b_list)
# print(dp)
print(dp[n])