Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
cnt = [0]*(10**5+1)
for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
print(max(cnt))

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
cnt = [0]*(10**7)
for i in a:
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
cnt = [0]*(10**5)
for i in a:
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
cnt = [0]*(10**7)
for i in a:
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
cnt = [0]*(10**5)
for i in a:
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
cnt = [0]*(10**7)
for i in a:
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = sorted(list(map(int, input().split())))
ans = 0
for x in range(a[0],a[-1]+1):
    cnt = 0
    for i in a:
        if abs(i-x) == 0 or abs(i-x) == 1:
            cnt += 1
    ans = max(cnt, ans)
print(ans)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
cnt = [0]*(10**7)
for i in a:
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))
cnt = 0
ans = 0
for x in range(min(a),max(a)+1):
    cnt = 0
    for i in a:
        if abs(i-x) == 0 or abs(i-x) == 1:
            cnt += 1
    ans = max(cnt, ans)
print(ans)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
cnt = [0]*(10**7)
for i in a:
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))
cnt = 0
ans = 0
for x in range(min(a),max(a)+1):
    cnt = 0
    for i in a:
        if abs(i-x) == 0 or abs(i-x) == 1:
            cnt += 1
    ans = max(cnt, ans)
print(ans)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
cnt = [0]*(10**7)
for i in a:
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))
cnt = 0
ans = 0
for x in range(min(a),max(a)+1):
    cnt = 0
    for i in a:
        if abs(i-x) == 0:
            cnt += 1
        elif abs(i-x) == 1:
            cnt += 1
    ans = max(cnt, ans)
print(ans)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
cnt = [0]*(10**7)
for i in a:
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))
cnt = 0
ans = 0
for x in range(max(a)+1):
    cnt = 0
    for i in a:
        if abs(i-x) == 0:
            cnt += 1
        elif abs(i-x) == 1:
            cnt += 1
    ans = max(cnt, ans)
print(ans)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
cnt = [0]*(10**7)
for i in a:
    cnt[i-1] += 1
    cnt[i] += 1
    cnt[i+1] += 1
print(max(cnt))