Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = tuple([int(input()) for _ in range(M)])
s = [0 for _ in range(N + 1)]
s[0] = 1
if 1 not in A:
  s[1] = 1

for n in range(2, N+1):
  if n in A:
    continue
  else:
    s[n] = s[n-1] + s[n-2]
print(s[-1] % (10 ** 9 + 7))


Fixed submission:
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = set([int(input()) for _ in range(M)])
s = [0 for _ in range(N + 1)]
s[0] = 1
if 1 not in A:
  s[1] = 1

for n in range(2, N+1):
  if n in A:
    continue
  else:
    s[n] = s[n-1] + s[n-2]
print(s[-1] % (10 ** 9 + 7))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = [int(input()) for _ in range(M)]
s = [0 for _ in range(N + 1)]
s[0] = 1
if 1 not in A:
  s[1] = 1

for n in range(2, N+1):
  if n in A:
    continue
  else:
    s[n] = s[n-1] + s[n-2]
print(s[-1] % (10 ** 9 + 7))


Fixed submission:
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = set([int(input()) for _ in range(M)])
s = [0 for _ in range(N + 1)]
s[0] = 1
if 1 not in A:
  s[1] = 1

for n in range(2, N+1):
  if n in A:
    continue
  else:
    s[n] = s[n-1] + s[n-2]
print(s[-1] % (10 ** 9 + 7))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = [int(input()) for _ in range(M)]
s = 1
s_ = 0
for n in range(1, N+1):
  if n in A:
    s, s_ = 0, s
    continue
  s, s_ = s + s_, s
print(s % (10 ** 9 + 7))


Fixed submission:
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = set([int(input()) for _ in range(M)])
s = [0 for _ in range(N + 1)]
s[0] = 1
if 1 not in A:
  s[1] = 1

for n in range(2, N+1):
  if n in A:
    continue
  else:
    s[n] = s[n-1] + s[n-2]
print(s[-1] % (10 ** 9 + 7))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = [int(input()) for _ in range(M)]
s = 1
s_ = 0
for n in range(1, N+1):
  if n in A:
    s, s_ = 0, s
    continue
  s, s_ = (s + s_) % (10 ** 9 + 7), s
print(s)


Fixed submission:
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = set([int(input()) for _ in range(M)])
s = [0 for _ in range(N + 1)]
s[0] = 1
if 1 not in A:
  s[1] = 1

for n in range(2, N+1):
  if n in A:
    continue
  else:
    s[n] = s[n-1] + s[n-2]
print(s[-1] % (10 ** 9 + 7))

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = [int(input()) for _ in range(M)]
s = 1
s_ = 0
for n in range(1, N+1):
  if n in A:
    s, s_ = 0, s
    continue
  s, s_ = (s + s_) % (10 ** 9 + 7), s
print(s)

Fixed submission:
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = set([int(input()) for _ in range(M)])
s = [0 for _ in range(N + 1)]
s[0] = 1
if 1 not in A:
  s[1] = 1

for n in range(2, N+1):
  if n in A:
    continue
  else:
    s[n] = s[n-1] + s[n-2]
print(s[-1] % (10 ** 9 + 7))

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = [int(input()) for _ in range(M)]
ans = [0 for _ in range(N+1)]
ans[0] = 0
if 1 not in A:
  ans[1] = 1
if 2 not in A:
  ans[2] = ans[1] + 1

for i in range(3, N+1):
  if i in A:
    ans[i] = 0
    continue
  for j in (1, 2):
    if ans[i-j] != 0:
      ans[i] += ans[i-j]
  else:
    ans[i] %= (10 ** 9 + 7)
print(ans[-1] % (10 ** 9 + 7))


Fixed submission:
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = set([int(input()) for _ in range(M)])
s = [0 for _ in range(N + 1)]
s[0] = 1
if 1 not in A:
  s[1] = 1

for n in range(2, N+1):
  if n in A:
    continue
  else:
    s[n] = s[n-1] + s[n-2]
print(s[-1] % (10 ** 9 + 7))

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = [int(input()) for _ in range(M)]
ans = [0 for _ in range(N+1)]
ans[0] = 0
if 1 not in A:
  ans[1] = 1
if 2 not in A:
  ans[2] = ans[1] + 1

for i in range(3, N+1):
  if i in A:
    ans[i] = 0
    continue
  for j in (1, 2):
    if ans[i-j] != 0:
      ans[i] += ans[i-j]

print(ans[:])

Fixed submission:
import sys
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
A = set([int(input()) for _ in range(M)])
s = [0 for _ in range(N + 1)]
s[0] = 1
if 1 not in A:
  s[1] = 1

for n in range(2, N+1):
  if n in A:
    continue
  else:
    s[n] = s[n-1] + s[n-2]
print(s[-1] % (10 ** 9 + 7))