Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
num = int(input())

if num>=1 and num<=200000:
  str_list = []
  kind = 0
  for idx in range(num):
    input_str = input()
    if len(input_str)>10:
      continue
    if input_str not in str_list:
      str_list.append(input_str)
      kind += 1
    else:
      pass
  print(kind)

Fixed submission:
n = int(input())

l = []
for _ in range(n):
    l.append(input())
print(len(set(l)))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ai = list(map(int, input().split()))

for i in range(n):
    print(ai.count(i+1))

Fixed submission:
n = int(input())
ai = list(map(int, input().split()))

ans = [0]*n
for i in range(len(ai)):
    ans[ai[i]-1] += 1
for i in range(len(ans)):
    print(ans[i])
Buggy python submission (verdict: Runtime Error):
loop_count = int(input())

ac_count = 0
wa_count = 0
tle_count = 0
re_count = 0

for i in range(loop_count):
    result = input()
    if result == 'AC':
        ac_count += 1
    elif result == 'WA':
        wa_count += 1
    elif result == 'TLE':
        tle_count += 1
    else:
        re_count += 1

print("AC x {0}".format(str(ac_count)))
print("WA x {0}".format(str(wa_count)))
print("TLE x {0}".format(str(tle_count)))
print("RE x {0}".format(str(re_count)))




Fixed submission:
money = int(input())

for i in range(1, 11):
    if money <= i * 1000 :
        print(i * 1000 - money)
        exit()
    else:
        pass
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())


count = 0

for i in range(K + 1):
    for j in range(K + 1):
        for k in range(K + 1):
            if i + j + k == S:
                count += 1
print(count)

Fixed submission:
K, S = map(int, input().split())

count = 0

for i in range(K + 1):
    for j in range(K + 1):

        if 0 <= S - i - j <= K:
            count += 1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


n = int(input())

cnt = 0

for c in range(1, n):
    d = n - c
    e = factorization(d)

    x = 1

    if e[0][0] == 1 and e[0][1] == 1:   # 1の場合
        cnt += 1
    else:
        for i in range(len(e)):
            x *= e[i][1] + 1
        cnt += x

print(cnt)


Fixed submission:
n = int(input())

cnt = 0

for a in range(1, n):
    cnt += ((n - 1) // a)

print(cnt)
Buggy python submission (verdict: Runtime Error):
s = int(input())

dp = [0]*(s+1)
MOD = 10**9+7

dp[0] = 1
dp[1] = 0
dp[2] = 0

if s >= 3:
    for i in range(3, s+1):
        dp[i] = (dp[i-1] + dp[i-3]) % MOD
    print(dp[s])
else:
    print(0)


Fixed submission:
s = int(input())

dp = [0]*(2001)
MOD = 10**9+7

dp[0] = 1
dp[1] = 0
dp[2] = 0

if s >= 3:
    for i in range(3, s+1):
        dp[i] = (dp[i-1] + dp[i-3]) % MOD
    print(dp[s])
else:
    print("0")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

w = s.count("W")
r = s.count("R")

a = 0b0
b = 0b0
cnt = 0

for t in s:
    if t == "W":
        b = b << 1
    else:
        b = b << 1
        b += 1

for i in range(r):
    a = a << 1
    a += 1
for i in range(w):
    a = a << 1


def count_ones_by_bin(num):
    bin_num = bin(num)[2:]
    count = 0
    for i in bin_num:
        count += int(i)
    return count


cnt = count_ones_by_bin(a ^ b)

cnt = cnt // 2

print(cnt)


Fixed submission:
n = int(input())
s = input()

w = s.count("W")
r = s.count("R")

a = ""     # 入力
b = ""     # 正解
cnt = 0

for t in s:
    if t == "W":
        b = b + "0"
    else:
        b = b + "1"

for i in range(r+w):
    if i < r:
        a = a + "1"
    else:
        a = a + "0"
    if a[i] != b[i]:
        cnt += 1

cnt = cnt // 2

print(cnt)
Buggy python submission (verdict: Runtime Error):
from numba import jit

N = int(input())

@jit
def f():
    ret = [0] * 10000

    for i in range(1, 200):
        for j in range(1, 200):
            for k in range(1, 200):
                z = i**2 + j**2 + k**2 + i*j + j*k + k*i
                if z < 10000:
                    ret[z] += 1

    return ret


ans = f()

for x in range(1, N+1):
    print(ans[x])


Fixed submission:
from numba import jit

N = int(input())

@jit
def f():
    ret = [0] * 10001

    for i in range(1, 200):
        for j in range(1, 200):
            for k in range(1, 200):
                z = i**2 + j**2 + k**2 + i*j + j*k + k*i
                if z < 10001:
                    ret[z] += 1

    return ret


ans = f()

for x in range(1, N+1):
    print(ans[x])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

ans = [0] * 10000

for i in range(1, 200):
    for j in range(1, 200):
        for k in range(1, 200):
            z = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if z < 10000:
                ans[z] += 1

for x in range(1, N+1):
    print(ans[x])


Fixed submission:
from numba import jit

N = int(input())

@jit
def f():
    ret = [0] * 10001

    for i in range(1, 200):
        for j in range(1, 200):
            for k in range(1, 200):
                z = i**2 + j**2 + k**2 + i*j + j*k + k*i
                if z < 10001:
                    ret[z] += 1

    return ret


ans = f()

for x in range(1, N+1):
    print(ans[x])
Buggy python submission (verdict: Runtime Error):
import itertools

H, W, K = map(int, input().split())
C = []
 
for i in range(H):
    C.append(input())

ans = 0

for i in range(H+1):
    for j in range(W+1):
        for m in itertools.combinations(list(range(H)), i):
            for n in itertools.combinations(list(range(W)), j):
                count = 0
                for a in m:
                    for b in n:
                        if(C[b][a] == "#"):
                            count += 1
                if(count == K):
                    ans += 1

print(ans)


Fixed submission:
import itertools

H, W, K = map(int, input().split())
C = []
 
for i in range(H):
    C.append(input())

ans = 0

for i in range(H+1):
    for j in range(W+1):
        for m in itertools.combinations(list(range(H)), i):
            for n in itertools.combinations(list(range(W)), j):
                count = 0
                for a in m:
                    for b in n:
                        if(C[a][b] == "#"):
                            count += 1
                if(count == K):
                    ans += 1

print(ans)

Buggy python submission (verdict: Runtime Error):
import itertools

H, W, K = map(int, input().split())
C = []
 
for i in range(H):
    C.append(input())

ans = 0

for i in range(H+1):
    for j in range(W+1):
        for m in itertools.combinations(list(range(H)), i):
            for n in itertools.combinations(list(range(W)), j):
                count = 0
                for a in m:
                    for b in n:
                        if(C[b][a] == "#"):
                            count += 1
                if(count == K):
                    ans += 1

print(ans)


Fixed submission:
import itertools

H, W, K = map(int, input().split())
C = []
 
for i in range(H):
    C.append(input())

ans = 0

for i in range(H+1):
    for j in range(W+1):
        for m in itertools.combinations(list(range(H)), i):
            for n in itertools.combinations(list(range(W)), j):
                count = 0
                for a in m:
                    for b in n:
                        if(C[a][b] == "#"):
                            count += 1
                if(count == K):
                    ans += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline


def f(a):
    for i in range(n-1):
        b[i] = a[i] % a[i+1]
    return b


n, *a = map(int, read().split())

b = [0] * n

a = sorted(a, reverse=True)
z = 0

while a[len(a)] == 0:
    a = f(a)
    z += 1

print(z-1)


Fixed submission:
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n = int(readline())
a = np.array(read().split(), np.int32)

b = np.zeros(10**6 + 10, np.int32)
cnt = 0

for x in a:
    if b[x] > 1:
        continue
    b[::x] += 1

for x in a:
    if b[x] == 1:
        cnt += 1

print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n, *a = map(int, read().split())

b = [0] * n

a = sorted(a, reverse=True)

for i in range(n):
    for j in range(n):
        if i == j:
            continue
        if a[i] % a[j] == 0:
            b[i] = 1
            break

print(n - sum(b))


Fixed submission:
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n = int(readline())
a = np.array(read().split(), np.int32)

b = np.zeros(10**6 + 10, np.int32)
cnt = 0

for x in a:
    if b[x] > 1:
        continue
    b[::x] += 1

for x in a:
    if b[x] == 1:
        cnt += 1

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

a, v = map(int, readline().split())
b, w = map(int, readline().split())
t = int(readline())

d = abs(b - a)
flg = 0

for i in range(t):
    d = d - v + w
    if d <= 0:
        flg = 1

if flg == 1:
    print("YES")
else:
    print("NO")


Fixed submission:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

a, v = map(int, readline().split())
b, w = map(int, readline().split())
t = int(readline())

d = abs(b - a)

d = d - (v - w)*t
if d <= 0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n = int(readline())
a = list(map(int, readline().split()))

t = 1

for i in range(n):
    t = t * a[i]

if t > 10**18:
    print("-1")
else:
    print(t)


Fixed submission:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n = int(readline())
a = list(map(int, readline().split()))

t = 1

for i in range(n):
    if a[i] == 0:
        print("0")
        exit()

for i in range(n):
    t = t * a[i]
    if t > 10**18:
        print("-1")
        exit()

print(t)
Buggy python submission (verdict: Time Limit Exceeded):
import math
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b, n = map(int, readline().split())
t = 0
max_t = 0

for i in range(n, 1, -1):
    t = math.floor(a*i/b) - a * math.floor(i/b)
    if t > max_t:
        max_t = t

print(max_t)


Fixed submission:
import math
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b, n = map(int, readline().split())

ans = math.floor(a * min(n, b-1) / b)

print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()

mod = [0] * 2019
mod[0] = 1
d = 1
n = 0
ans = 0

for i in reversed(s):
    n += int(i) * d
    n %= 2019
    d *= 10
    d %= 2019
    mod[n % 2019] += 1

for i in mod:
    ans += sum(i*(i-1) // 2)

print(ans)


Fixed submission:
s = input()

mod = [0] * 2019
mod[0] = 1
d = 1
n = 0
ans = 0

for i in reversed(s):
    n += int(i) * d
    n %= 2019
    d *= 10
    d %= 2019
    mod[n % 2019] += 1

for x in range(2019):
    ans += mod[x] * (mod[x]-1) // 2

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math

n = int(input())

ans = 0

for i in range(1, n + 1):
    for j in range(1, n + 1):
        for k in range(1, n + 1):
            ans += math.gcd(math.gcd(i, j), k)

print(ans)


Fixed submission:
import math
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)


n = int(input())

ans = 0

for i in range(1, n + 1):
    for j in range(i, n + 1):
        for k in range(j, n + 1):
            cnt = gcd(i, j, k)
            if i == j and j == k:
                ans += cnt
            elif (i == j and i != k) or (i == k and i != j) or (j == k and j != i):
                ans += cnt * 3
            else:
                ans += cnt * 6

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)


n = int(input())

ans = 0

for i in range(1, n + 1):
    for j in range(1, n + 1):
        for k in range(1, n + 1):
            cnt = gcd(i, j, k)
            ans += cnt

print(ans)


Fixed submission:
import math
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)


n = int(input())

ans = 0

for i in range(1, n + 1):
    for j in range(i, n + 1):
        for k in range(j, n + 1):
            cnt = gcd(i, j, k)
            if i == j and j == k:
                ans += cnt
            elif (i == j and i != k) or (i == k and i != j) or (j == k and j != i):
                ans += cnt * 3
            else:
                ans += cnt * 6

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

cnt = 0

for i in range(n):
    for j in range(i, n):
        for k in range(j, n):
            if (s[i] != s[j] and s[i] != s[k] and s[j] != s[k]) and (j - i != k - j):
                cnt += 1

print(cnt)


Fixed submission:
n = int(input())
s = input()

r = s.count('R')
b = s.count('B')
g = s.count('G')

cnt = 0

for i in range(n):
    for j in range(i + 1, n):
        k = j + j - i
        if k >= n:
            break
        if s[i] != s[j] and s[i] != s[k] and s[j] != s[k]:
            cnt += 1

print(r * b * g - cnt)
Buggy python submission (verdict: Time Limit Exceeded):
import math

k = int(input())

a = []

s = str(k)
flg = 0

for i in range(1, 1000000):
    n = math.floor(math.log10(i))
    s = str(i)
    cnt = 0

    if n < 1:
        a.append(i)
    else:
        for j in range(n):
            if abs(int(s[j]) - int(s[j + 1])) <= 1:
                cnt += 1
            if cnt == n:
                a.append(i)

    if len(a) == k:
        print(a[k - 1])
        break


Fixed submission:
from collections import deque

k = int(input())

q = deque(range(1, 10))

for i in range(k):
    t = q.popleft()

    if t % 10 != 0:
        q.append(10 * t + t % 10 - 1)

    q.append(10 * t + t % 10)

    if t % 10 != 9:
        q.append(10 * t + t % 10 + 1)
 
print(t)
Buggy python submission (verdict: Runtime Error):
import collections

n = int(input())
a = list(map(int, input().split()))

c = collections.Counter(a)

ans = 0

for i in c.values():
    ans += i * (i - 1) // 2

for i in range(n):
    print(ans - c[a[i]] + 1)


Fixed submission:
n, m = map(int, input().split())

a = (n * (n - 1)) // 2 + (m * (m - 1)) // 2

print(a)
Buggy python submission (verdict: Runtime Error):
import math

a, b, c = map(int, input().split())

if math.sqrt(a) + math.sqrt(b) > 31,622.77660168379:
    print("No")
else:
    if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
        print("Yes")
    else:
        print("No")


Fixed submission:
from decimal import Decimal

a, b, c = map(int, input().split())

if Decimal(a).sqrt() + Decimal(b).sqrt() < Decimal(c).sqrt():
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())

cnt = 0

for i in range(q):
    a = input()
    if a[0] == "1":
        cnt += 1
    elif a[0] == "2":
        if (a[2] == "1" and cnt % 2 == 0) or (a[2] == "2" and cnt % 2 == 1):
            s = a[4] + s
        elif (a[2] == "2" and cnt % 2 == 0) or (a[2] == "1" and cnt % 2 == 1):
            s = s + a[4]

if cnt % 2 == 1:
    s = s[::-1]

print(s)


Fixed submission:
s = input()
q = int(input())

x = []
y = []
cnt = 0

for i in range(q):
    a = list(input().split())
    if a[0] == "1":
        x, y = y, x
        cnt += 1
    else:
        if a[1] == "1":
            x.append(a[2])
        else:
            y.append(a[2])

if cnt % 2 == 1:
    s = s[::-1]

s = ''.join(x[::-1]) + s + ''.join(y)

print(s)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())

for i in range(q):
    a = input()
    if a[0] == "1":
        s = s[::-1]
    elif a[0] == "2":
        if a[2] == "1":
            s = a[4] + s
        elif a[2] == "2":
            s = s + a[4]

print(s)


Fixed submission:
s = input()
q = int(input())

x = []
y = []
cnt = 0

for i in range(q):
    a = list(input().split())
    if a[0] == "1":
        x, y = y, x
        cnt += 1
    else:
        if a[1] == "1":
            x.append(a[2])
        else:
            y.append(a[2])

if cnt % 2 == 1:
    s = s[::-1]

s = ''.join(x[::-1]) + s + ''.join(y)

print(s)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())

for i in range(10**9):
    if k**i < n and n < k**(i + 1):
        cnt = i + 1
        break

print(cnt)


Fixed submission:
import math

n, k = map(int, input().split())

a = int(math.log(n, k))

for i in range(a + 2):
    if n < k**i:
        print(i)
Buggy python submission (verdict: Runtime Error):
from functools import reduce
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n, a, b = map(int, read().split())
MOD = 10 ** 9 + 7


def combo_mod(n, a):
    t = reduce(lambda x, y: x * y % MOD, range(n, n - a, -1))
    b = reduce(lambda x, y: x * y % MOD, range(1, a + 1))
    return t // b


ans = pow(2, n, MOD) - combo_mod(a) - combo_mod(b) - 1
ans %= MOD

print(ans)


Fixed submission:
from functools import reduce
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n, a, b = map(int, read().split())
MOD = 10 ** 9 + 7


def comb_mod(n, a):
    num = reduce(lambda x, y: x * y % MOD, range(n, n - a, -1))
    den = reduce(lambda x, y: x * y % MOD, range(1, a + 1))
    return num * pow(den, MOD - 2, MOD) % MOD


ans = pow(2, n, MOD) - comb_mod(n, a) - comb_mod(n, b) - 1
ans %= MOD

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

s = [0] * n
v = [0] * (n - 1)
w = [0]

for i in range(n):
    s[i] = input()

t = sorted(s)

for i in range(n - 1):
    if t[i] == t[i + 1]:
        v[i] = 1

u = sorted(set(t), key=t.index)

for i in range(n - 1):
    if v[i] != 0:
        w[len(w) - 1] += 1
    else:
        w.append(0)

for i in range(len(w)):
    if max(w) == w[i]:
        print(u[i])


Fixed submission:
import collections
 
n = int(input())
s = [input() for i in range(n)]
 
count = collections.Counter(s)
 
max_v = max(count.values())
 
result = [key for key, val in count.items() if val == max_v]

print("\n".join(sorted(result)))
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p_n = list(map(int, input().split()))

s = 0
max_s = 0

for i in range(n - k + 1):
    s = sum(p_n[i:i + k])

    if s > max_s:
        max_s = s

print((max_s + k) / 2)


Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

s = sum(p[:k])
max_s = s

for i in range(n - k):
    s = s - p[i] + p[i + k]

    if max_s < s:
        max_s = s

print((max_s + k) / 2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p_n = list(map(int, input().split()))

s = 0
max_s = 0

for i in range(n - k + 1):
    s = sum(p_n[i:i + k])

    if s > max_s:
        max_s = s

print((max_s + k) / 2)


Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

s = sum(p[:k])
max_s = s

for i in range(n - k):
    s = s - p[i] + p[i + k]

    if max_s < s:
        max_s = s

print((max_s + k) / 2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p_n = list(map(int, input().split()))
v_n = []

s = 0
max_s = 0
max_i = 0

for i in range(n - k + 1):
    s = sum(p_n[i:i + k])

    if s > max_s:
        max_s = s

print((max_s + k) / 2)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

s = sum(p[:k])
max_s = s

for i in range(n - k):
    s = s - p[i] + p[i + k]

    if max_s < s:
        max_s = s

print((max_s + k) / 2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p_n = list(map(int, input().split()))
v_n = []

# リストの値を期待値に変換
for i in range(n):
    v_n.append((p_n[i] + 1) / 2)

s = 0
max_s = 0

for i in range(n - k + 1):
    s = sum(v_n[i:i + k])

    if s > max_s:
        max_s = s

print(max_s)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

s = sum(p[:k])
max_s = s

for i in range(n - k):
    s = s - p[i] + p[i + k]

    if max_s < s:
        max_s = s

print((max_s + k) / 2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p_n = list(map(int, input().split()))
v_n = p_n

# リストの値を期待値に変換
for i in range(n):
    v_n[i] = (p_n[i] + 1) / 2

s = 0
max_s = 0

for i in range(n - k + 1):
    s = sum(v_n[i:i + k])

    if s > max_s:
        max_s = s

print(max_s)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

s = sum(p[:k])
max_s = s

for i in range(n - k):
    s = s - p[i] + p[i + k]

    if max_s < s:
        max_s = s

print((max_s + k) / 2)
Buggy python submission (verdict: Runtime Error):
import math

n, k = [int(x) for x in input().split()]

h_n = list(map(int, input().split()))

if n <= k:
    print("0")

s_n = sorted(h_n)

log_sum = math.log(sum(s_n[:n - k]))

print(round(math.exp(log_sum)))

Fixed submission:
import math

n, k = [int(x) for x in input().split()]

h_n = list(map(int, input().split()))

if n <= k:
    print("0")
else:
    s_n = sorted(h_n)

    print(sum(s_n[:n-k]))

Buggy python submission (verdict: Runtime Error):
import math

n, k = [int(x) for x in input().split()]

h_n = list(map(int, input().split()))

if n <= k:
    print("0")

s_n = sorted(h_n)

log_sum = math.log(sum(s_n[:n - k]))

print(math.exp(log_sum))

Fixed submission:
import math

n, k = [int(x) for x in input().split()]

h_n = list(map(int, input().split()))

if n <= k:
    print("0")
else:
    s_n = sorted(h_n)

    print(sum(s_n[:n-k]))
Buggy python submission (verdict: Runtime Error):
n = int(input())
p = list(map(int, input().split()))

cnt = 1
min_p = p[0]

if n == 1:
    print(n)
else:
    for i in range(1, n):
        if p[i] < min_p:
            min_p = p[i]
            cnt += 1
    print(cnt)

Fixed submission:
n, m = map(int, input().split())

if n == m:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
min_p = 0

if n == 1:
    print(n)
else:
    for i in range(1, n):
        min_p = min(p[:i])

        if min_p < p[i]:
            cnt = cnt + 1
    print(n - cnt)

Fixed submission:
n = int(input())
p = list(map(int, input().split()))

cnt = 1
min_p = p[0]

if n == 1:
    print(n)
else:
    for i in range(1, n):
        if p[i] < min_p:
            min_p = p[i]
            cnt += 1
    print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
min_p = 0

if n == 1:
    print(n)
else:
    for i in range(1, n):
        min_p = min(p[:i])

        if min(p[:i]) < p[i]:
            cnt = cnt + 1
    print(n - cnt)


Fixed submission:
n = int(input())
p = list(map(int, input().split()))

cnt = 1
min_p = p[0]

if n == 1:
    print(n)
else:
    for i in range(1, n):
        if p[i] < min_p:
            min_p = p[i]
            cnt += 1
    print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

p_n = list(map(int, input().split()))

flg = 0
cnt = 0

for i in range(n):
    flg = 0
    for j in range(i):
        if j >= i:
            break
        else:
            if p_n[j] < p_n[i]:
                flg += 1
    
    if flg == 0:
        cnt += 1

print(cnt)

Fixed submission:
n = int(input())
p = list(map(int, input().split()))

cnt = 1
min_p = p[0]

if n == 1:
    print(n)
else:
    for i in range(1, n):
        if p[i] < min_p:
            min_p = p[i]
            cnt += 1
    print(cnt)