Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02761 (python)

Fixed submission:
n, *D  = [list(map(int, s.split())) for s in open(0)]
imp = 0
dic = dict()
D = sorted(D)
cond = []
for d in D:
    if n[0] != 1 and d[0] == 1 and d[1] == 0:
        imp += 1
    if d not in cond:
        cond.append(d)
        if d[0] in dic:
            imp += 1
        else:
            dic[d[0]] = d[1]

s = ""
if imp:
    print(-1)
else:
    for i in range(n[0]):
        if i + 1 in dic:
            s += str(dic[i+1])
        else:
            if i == 0 and n[0] > 1:
                s += str(1)
            else:
                s += str(0)
    print(s)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict


def main():
    flag_imp = 0
    n, m = map(int, input().split())
    conds = list(set([input() for i in range(m)]))
    conds_dict = defaultdict(list)
    for c in conds:

        conds_dict[int(c.split()[0])].append(c.split()[1])
 
    if max(list(map(len, conds_dict.values()))) > 1:
        flag_imp += 1
    else:
        try:
            first_digit = conds_dict[1][0]
        except IndexError:
            if n == 1:
                first_digit = "0"
            else:
                flag_imp += 1
        try:
            seond_digit = conds_dict[2][0]
        except IndexError:
            seond_digit = "0"

        try:
            third_digit = conds_dict[3][0]
        except IndexError:
            third_digit = "0"
           
    if flag_imp:
        print(-1)
    elif n > 1 and first_digit == "0":
        print(-1)
    else:
        if n == 1:
            print(first_digit)
        elif n == 2:
            print(first_digit + seond_digit)
        else:
            print(first_digit + seond_digit + third_digit)


if __name__ == "__main__":
    main()
Problem p02837 (python)

Fixed submission:
from collections import defaultdict


def main():
    N = int(input())
    d = defaultdict(list)
    for i in range(N):
        n = int(input())
        for _ in range(n):
            d[i].append(list(map(int, input().split())))
    max_trust_num = 0

    # check all possible combinations of Honest or Unkind.
    for i in range(2**N):
        trust = True

        # assign Honest or Unnkind to each person.
        # if person i is Honest, trust_combs[i] = 1
        # else, trust_combs[i] = 0
        trust_combs = []
        for j in range(N):
            if (i >> j) & 1:
                trust_combs.append(1)
            else:
                trust_combs.append(0)
  
        # check if the combination of Honest or
        # Unkind contradicts the given statements.
        for k in range(len(trust_combs)):
            if trust_combs[k] == 1:
                for l in d[k]:
                    if not l[1] == trust_combs[l[0]-1]:
                        trust = False
        if trust:
            max_trust_num = max(max_trust_num, sum(trust_combs))

    print(max_trust_num)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    d = defaultdict(list)
    for i in range(N):
        n = int(input())
        for _ in range(n):
            d[i].append(list(map(int, input().split())))
    max_trust_num = 0

    # check all possible combinations of Honest or Unkind.
    for i in range(2**N):
        trust = True

        # assign Honest or Unnkind to each person.
        # if person i is Honest, trust_combs[i] = 1
        # else, trust_combs[i] = 0
        trust_combs = []
        for j in range(N):
            if (i >> j) & 1:
                trust_combs.append(1)
            else:
                trust_combs.append(0)
  
        # check if the combination of Honest or
        # Unkind contradicts the given statements.
        for k in range(len(trust_combs)):
            if trust_combs[k] == 1:
                for l in d[k]:
                    if not l[1] == trust_combs[l[0]-1]:
                        trust = False
        if trust:
            max_trust_num = max(max_trust_num, sum(trust_combs))

    print(max_trust_num)


if __name__ == "__main__":
    main()
Problem p02936 (python)

Fixed submission:
from collections import deque


def main():
    N, Q = map(int, input().split())
    g = [[] for _ in range(N)]

    # for storing the value of the each node
    cnt = [0]*N

    # for DFS
    stack = deque()
    stack.append(0)
    seen = [0] * N

    # store the structure of the graph
    for i in range(N-1):
        a, b = map(int, input().split())
        g[b-1].append(a-1)
        g[a-1].append(b-1)

    # add values to parent nodes
    for i in range(Q):
        p, x = map(int, input().split())
        cnt[p-1] += x

    # DFS
    while len(stack):
        idx = stack.pop()
        seen[idx] += 1
        for c in g[idx]:
            if seen[c]:
                continue
            cnt[c] += cnt[idx]
            stack.append(c)

    print(*cnt)


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
ef main():

    N, Q = map(int, input().split())
    G = [[] for _ in range(N)]
    for i in range(N-1):
        a, b = map(int, input().split())
        G[a-1].append(b - 1)

    q = deque()
    score = [0] * N
    for _ in range(Q):
        a, s = map(int, input().split())
        score[a-1] += s
    
    q.append(0)
    while q:
        tmp = q.pop()
        for v in G[tmp]:
            q.append(v)
            score[v] += score[tmp]

    print(*score)


if __name__ == '__main__':
    main()
Problem p02972 (python)

Fixed submission:
def main():
    N = int(input())
    A = list(map(int, input().split()))
    A.insert(0, 1e10)
    ans = []
    B = [0] * len(A)
    for i in range(len(A)-1, 0, -1):
        idx = i
        s = 0
        while idx <= len(A) - 1:
            s += B[idx]
            idx += i

        if s % 2 != A[i]:
            ans.append(i)
            B[i] = 1

    
    if len(ans) > 0:
        print(len(ans))
        print(*ans)
    else:
        print(0)


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
ef main():
    N = int(input())
    A = list(map(int, input().split()))
    A.insert(0, 1e10)
    ans = []
    B = [0] * len(A)
    for i in range(len(A)-1, 0, -1):
        idx = i
        s = 0
        while idx <= len(A) - 1:
            s += B[idx]
            idx += i

        if s % 2 != A[i]:
            ans.append(i)
            B[i] = 1

    
    if len(ans) > 0:
        print(len(ans))
        print(*ans)
    else:
        print(0)


if __name__ == '__main__':
    main()
Problem p02988 (python)

Fixed submission:
N, *L,  = [list(map(int, s.split())) for s in open(0)]
A = L[0]

cnt = 0
for i in range(len(A) - 2):
    ma = max(A[i], A[i+1], A[i+2])
    mi = min(A[i], A[i+1], A[i+2])
    if A[i+1] not in [ma, mi]:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
N, *L,  = [list(map(int, s.split())) for s in open(0)]
A = L[0]
p
cnt = 0
for i in range(len(A) - 2):
    ma = max(A[i], A[i+1], A[i+2])
    mi = min(A[i], A[i+1], A[i+2])
    if A[i+1] not in [ma, mi]:
        cnt += 1
print(cnt)
Problem p02996 (python)

Fixed submission:
def main():
    N = int(input())
    jobs = []
    time = 0
    for _ in range(N):
        A, B = map(int, input().split())
        jobs.append((A, B))

    jobs = sorted(jobs, key=lambda x: x[1])
    for j in jobs:
        time += j[0]
        if time > j[1]:
            print("No")
            return
        
    else:
        print("Yes")


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
ef main():
    N = int(input())
    jobs = [list(map(int, input().split())) for _ in range(N)]
    time = 0
    jobs = sorted(jobs, key=lambda x: x[1])
    for j in jobs:
        time += j[0]
        if time > j[1]:
            print("No")
            return
        
    else:
        print("Yes")


if __name__ == '__main__':
    main()
Problem p03086 (python)

Fixed submission:
A, = [s.split() for s in open(0)]
if len(A) == 0:
    A = [""]
else:
    A = A[0]
acgt = []
for i in range(len(A)):
    for j in range(len(A), 0, -1):
        sub_string = A[i:j]
        for s in sub_string:
            if s not in ["A", "C", "G", "T"]:
                break 
        else:
            acgt.append(sub_string)
if len(acgt) == 0:
    print(0)
else:
    print(max([len(s) for s in acgt]))

Buggy submission (verdict: Runtime Error):
A, = [s.split() for s in open(0)]
A = A[0]
acgt = []
for i in range(len(A)):
    for j in range(len(A), 0, -1):
        sub_string = A[i:j]
        for s in sub_string:
            if s not in ["A", "C", "G", "T"]:
                break 
        else:
            acgt.append(sub_string)
print(max([len(s) for s in acgt]))
Problem p03206 (python)

Fixed submission:
D = int(input())
s = ""
if D == 25:
    s = 'Christmas'
elif D == 24:
    s = 'Christmas Eve'
elif D == 23:
    s = 'Christmas Eve Eve'
elif D == 22:
    s = 'Christmas Eve Eve Eve'

print(s)

Buggy submission (verdict: Runtime Error):
print('Christmas' + ' Eve' * int(input()) % 5)

Buggy submission (verdict: Runtime Error):
print('Christmas' - int(input()) % 5 * ' Eve')
Problem p02602 (python)

Fixed submission:
N=list(map(int,input().split()))
A=list(map(int,input().split()))
n=N[0]
k=N[1]
for i in range(n-k):
    if A[i]<A[k+i]:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
N=list(map(int,input().split()))
A=list(map(int,input().split()))
n=N[0]
k=N[1]
for i in range(k+1):
    if A[i]<A[k+i]:
        print("Yes")
    else:
        print("No")
Problem p03035 (python)

Fixed submission:
A, B = map(int, input().split())
if A >= 13:
    print(B)
elif 6 <= A < 13:
    print(B//2)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
a = list(map(int, input().split()))
for i in range(M):
    B, C = map(int, input().split())
    if C > a[-1]:
        a += [C for _ in range(B)]
        a.sort(reverse=True)
        a = a[:N]
print(sum(a))
Problem p02553 (python)

Fixed submission:
a, b, c, d = map(int, input().split())

A = a * c
B = a * d
C = b * c
D = b * d

ANS = max(A, B, C, D)

print(ANS)

Buggy submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())

if a == 0:
    a = b
if b == 0:
    b = a
if c == 0:
    c = d
if d == 0:
    d = c

if max(a, b) < 0 and max(c, d) > 0:
    A = -min(abs(a), abs(b))
    B = min(abs(c), abs(d))
elif max(a, b) > 0 and max(c, d) < 0:
    A = min(abs(a), abs(b))
    B = -min(abs(c), abs(d))
elif max(a, b) > 0 and max(c, d) > 0:
    A = max(abs(a), abas(b))
    B = max(abs(c), abs(d))
else:
    A = min(abs(a), abs(b))
    B = min(abs(c), abs(d))

print(A * B)
Problem p02772 (python)

Fixed submission:
A_list = []
ans = 0

N = int(input())
A = input()
A_list = A.split(' ')

for n in range(N):
    if (int(A_list[n]) % 2 == 0):
        if (int(A_list[n]) % 3 == 0) | (int(A_list[n]) % 5 == 0):
            ans = ans + 0
        else:
            ans = ans + 1
if ans == 0:
    print('APPROVED')
else:
    print('DENIED')

Buggy submission (verdict: Runtime Error):
A_list = []

N = int(input())
A = input()
A_list = A.split(' ')

for n in range(N):
    if (int(A_list[n]) % 2 == 0):
        if (int(A_list[n]) % 3 == 0) | (int(A_list[n]) % 5 == 0):
            ans = 'APPROVED'
        else:
            ans = 'DENIED'
            break
print(ans)
Problem p02630 (python)

Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
ans = sum(A)
A = Counter(A)
bc = [tuple(map(int, input().split())) for i in range(Q)]
for b, c in bc:
    v = A.pop(b, None)
    if v:
        A[c] += v
        ans = ans+((c-b)*v)
    print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
ans = sum(A)
A = Counter(A)
bc = [tuple(map(int, input().split())) for i in range(Q)]
for b, c in bc:
    v = A.pop(b, None)
    if v:
        A[c] += v
    	ans = ans+((c-b)*v)
    print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
ans = sum(A)
A = Counter(A)
bc = [tuple(map(int, input().split())) for i in range(Q)]
for b, c in bc:
    v = A.pop(b, None)
    if v:
        A[c] += v
    ans = ans+((c-b)*v)
    print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter
import numpy as np
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
ans = sum(A)
A = Counter(A)
bc = [tuple(map(int, input().split())) for i in range(Q)]
for b, c in bc:
    v = A.pop(b, None)
    if v:
        A[c] += v
    ans = ans+((c-b)*v)
    print(ans)
Problem p02696 (python)

Fixed submission:
import math
def fun(A, B, x):
    return math.floor(A*x/B)-A*math.floor(x/B)

A, B, N = map(int,input().split())
x = min(B-1, N)
print(int(fun(A, B, x)))

Buggy submission (verdict: Runtime Error):
import numpy as np
def fun(x):
    return np.floor(A*x/B)-A*np.floor(x/B)

A, B, N = map(int,input().split())
if B<N:
    x = np.arange(0, B, 1)
else:
    x = np.arange(0, N+1, 1)

print(int(max(fun(x))))

Buggy submission (verdict: Runtime Error):
import numpy as np
def fun(x):
    return np.floor(A*x/B)-A*np.floor(x/B)

A, B, N = map(int,input().split())
x = np.arange(0, B, 1)
print(fun(x))
print(int(max(fun(x))))

Buggy submission (verdict: Runtime Error):
import numpy as np
def fun(x):
    return np.floor(A*x/B)-A*np.floor(x/B)

A, B, N = map(int,input().split())
x = np.arange(0, N+1, 1)
print(int(max(fun(x))))

Buggy submission (verdict: Runtime Error):
import numpy as np
def fun(x):
    return np.floor(A*x/B)-A*np.floor(x/B)

A, B, N = map(int,input().split())
x = np.arange(0, N+1, 1)
print(int(max(fun(x))))
Problem p02727 (python)

Fixed submission:
import numpy as np
X, Y, A, B, C = map(int,input().split())
Reds = list(map(int, input().split()))
Greens = list(map(int, input().split()))
Ns = list(map(int, input().split()))

Reds = np.array(Reds)
Greens = np.array(Greens)
Ns = np.array(Ns)

Reds = np.sort(Reds)[::-1]
Greens = np.sort(Greens)[::-1]
Ns = np.sort(Ns)[::-1]

Full = np.append(Reds[:X], Greens[:Y])
Full = np.append(Full, Ns)
Full = np.sort(Full)[::-1]

sum = 0

for i in range(X+Y):
    sum += Full[i]

print(sum)

Buggy submission (verdict: Runtime Error):
import numpy as np
X, Y, A, B, C = map(int,input().split())
Reds = list(map(int, input().split()))
Greens = list(map(int, input().split()))
Ns = list(map(int, input().split()))

Reds = np.array(Reds)
Greens = np.array(Greens)
Ns = np.array(Ns)

Reds = np.sort(Reds)[:X-1:-1]
Greens = np.sort(Greens)[:Y-1:-1]
Ns = np.sort(Ns)[::-1]

Full = np.append(Reds, Greens)
Full = np.append(Full, Ns)
Full = np.sort(Full)[::-1]

sum = 0

for i in range(X+Y):
    sum += Full[i]

print(sum)
Problem p03076 (python)

Fixed submission:
import math
nums = [int(input()) for _ in range(5)]
mn = float('inf')

for i in nums:
    if i%10!=0:
        mn = min(mn, i%10)
if mn == float('inf'):
    mn = 10

print(sum(list(map(lambda x: int(math.ceil(x/10)*10), nums)))-10+mn)

Buggy submission (verdict: Runtime Error):
nums = [int(input()) for _ in range(5)]
mn = float('inf')

for i in nums:
    if i%10!=0:
        mn = min(mn, i%10)
if mn == float('inf'):
    mn = 0

print(sum(list(map(lambda x: int(math.ceil(x/10)*10), nums)))-10+mn)
Problem p03087 (python)

Fixed submission:
N, Q = map(int, input().split())
S = input()
t = [0] * (N + 1)
lr = [tuple(map(int, input().split())) for _ in range(Q)]
for i in range(N):
    t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for l, r in lr:
    print(t[r-1] - t[l-1])

Buggy submission (verdict: Runtime Error):
N, Q = map(int, input().split())
S = input()
t = [0] * (N + 1)
for i in range(N):
    t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
    for i in range(Q):
        l, r = map(int, input().split())
        print(t[r-1] - t[l-1])
Problem p03239 (python)

Fixed submission:
n, t = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(n)]

ct = [i[0] for i in ct if i[1]<=t]
if not ct:
    print('TLE')
else:
    print(min(ct))

Buggy submission (verdict: Runtime Error):
n, t = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(n)]

ct = [i[0] for i in ct if i[1]<=t]
print(min(ct))
Problem p03361 (python)

Fixed submission:
h, w = map(int, input().split())
field = [list(input()) for _ in range(h)]
dx = [0, 1, 0, -1]
dy = [-1, 0, 1, 0]
count = 0
for i in range(h):
    for j in range(w):
        if field[i][j] == '#':
            count = 0
            for d in range(4):
                if 0<=i+dy[d]<h and 0<=j+dx[d]<w:
                    count += 1 if field[i+dy[d]][j+dx[d]]=='#' else 0

            if count<1:
                print('No')
                exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
field = [list(input()) for _ in range(h)]
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
count = 0
for i in range(h):
    for j in range(w):
        if field[i][j] == '#':
            count = 0
            for d in range(4):
                if 0<=i+dx[d]<w and 0<=j+dy[d]<h:
                    count += 1 if field[i+dx[d]][j+dy[d]]=='#' else 0

            if count<1:
                print('No')
                exit()
print('Yes')
Problem p03625 (python)

Fixed submission:
from collections import Counter
n = int(input())
a = Counter(list(map(int, input().split())))
a = [list(x) for x in a.items() if x[1]>=2]
a.sort(reverse=True, key=lambda x: (x[0], x[1]))
count = 0
base = 4
for i in range(len(a)):
    if count == 1:
        print(l*a[i][0])
        exit()
    else:
        l = a[i][0]
        count += 1

    if a[i][1]>=4:
        print(a[i][0]*a[i][0])
        exit()

print(0)

Buggy submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
a = Counter(list(map(int, input().split())))
a = [list(x) for x in a.items() if x[1]>=2]
a.sort(reverse=True, key=lambda x: (x[0], x[1]))
count = 0
base = 4
for i in len(a):
    if count == 1:
        print(l*a[i][0])
        exit()
    else:
        l = a[0]
        count += 1

    if a[1]>=4:
        print(a[i][0]*a[i][0])
        exit()

print(0)
Problem p02702 (python)

Fixed submission:
s = input()[::-1] # 入力文字列を逆順でsに格納

counts = [0] * 2019
counts[0] = 1

num, d = 0, 1

for char in s:
    num += int(char) * d
    num %= 2019
    d *= 10
    d%= 2019
    counts[num] += 1

ans = 0
for cnt in counts:
    ans += cnt * (cnt - 1) // 2

print(ans) # 答えの出力

Buggy submission (verdict: Runtime Error):
s = input()[::-1]
d = 1
num = 0
mod_list = [0] * 2019

for char in s:
    num += int(char) * d
    num %= 2019
    d *= 10
    d%= 2019
    counts[num] += 1

ans = mod_list[0]
for cnt in range(1, 2019):
    ans += mod_list[cnt] * (mod_list[cnt] - 1) // 2

print(ans)
Problem p02780 (python)

Fixed submission:
n, k = map(int, input().split())
p_list = list(map(int, input().split()))
num = sum(p_list[0:k])
max = 0
index = 0
value = 0

for i in range(n - k):
    num = num + p_list[i + k] - p_list[i]
    if num > max:
        max = num
        index = i + 1

for i in range(k):
    value += (1 + p_list[index + i])/ 2

print(value)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
p_list = list(map(int, input().split()))
num = sum(p_list[0:K])
max = 0
index = 0
value = 0

for i in range(n - k):
    num = num + p_list[i + k] - p_list[i]
    if num > max:
        max = num
        index = i + 1

for i in range(k):
    value += (1 + p_list[index + i])/ 2

print(value)
Problem p02658 (python)

Fixed submission:
n=int(input())
arr=list(map(int,input().split()))
ans=1
arr=sorted(arr)
def solve(arr,ans):
    for i in arr:
        ans*=i
        if(ans>10**18):
            return(-1)
        if(ans==0):
            return(0)
    if(ans>10**18):
        return(-1)
    return(ans)
print(solve(arr,ans))

Buggy submission (verdict: Runtime Error):
n=int(input())
arr=list(map(int,input().split()))
ans=1
for i in arr:
    if ans*i<=10**18:
        ans*=i
    else:
        print(-1)
        return(0)
print(ans)
Problem p02705 (python)

Fixed submission:
from math import pi
r=int(input())
print(2*pi*r)

Buggy submission (verdict: Runtime Error):
import math
r=int(input())
print(2*pi*r)
Problem p02789 (python)

Fixed submission:
N,M=map(int,input().split())
if N==M:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
if N==M:
    print("Yes")
else:
    print("No")
Problem p02801 (python)

Fixed submission:
a=input()
s="abcdefghijklmnopqrstuvwxyz"
for i in range(len(s)-1):
	if s[i]==a:
		print(s[i+1])

Buggy submission (verdict: Runtime Error):
a=input()
s="abcdefghijklmnopqrstuvwxyz"
for i in range(len(s)-1)
  if s[i]==a:
	print(s[i+1])
Problem p02817 (python)

Fixed submission:
s,t=map(str,input().split())
print(t+s)

Buggy submission (verdict: Runtime Error):
s,t=map(input().split())
if s>=t:
  print(t+s)
else:
  print(s+t)
Problem p02830 (python)

Fixed submission:
N=int(input())
S,T=map(str,input().split())
a=""
for i in range(N):
  a+=S[i]+T[i]
print(a)

Buggy submission (verdict: Runtime Error):
N=int(input())
S,T=map(input().split())
a=""
for i in range(N):
  a+=S[i]+T[i]
print(a)
Problem p02853 (python)

Fixed submission:
arr=list(map(int,input().split()))
s=0
for i in range(1,4):
  for j in range(2):
    if arr[j]==i:
      s+=(4-i)*100000
if arr[0]==arr[1] and arr[1]==1:
  s+=400000
print(s)

Buggy submission (verdict: Runtime Error):
arr=list(map(int,input().split()))
s=0
for i in range(1,4):
  for j in range(2):
    if arr[j]==i:
      s+=(4-i)*100000
if arr[0]==arr[1] and arr[1]=1:
  s+=400000
print(s)
Problem p03331 (python)

Fixed submission:
N=int(input())
def f(x):
  s=0
  while x!=0:
    s+=x%10
    x//=10
  return(s)
minn=50
for i in range(1,N):
  minn=min(f(i)+f(N-i),minn)
print(minn)

Buggy submission (verdict: Runtime Error):
N=int(input())
def f(x):
  s=0
  while x!=0:
    s+=x%10
    x//=10
  return(s)
minn=50
for i in range(1,N/2):
  minn=min(f(i)+f(N-i),minn)
print(minn)
Problem p03338 (python)

Fixed submission:
n=int(input())
s=input()
maxx=-1
def got(a,al):
    for i in a:
        if i==al :
      	    return(True)
    return(False)
for i in range(n):
    a=s[:i]
    b=s[i:]
    cnt=0
    alp="abcdefghijklmnopqrstuvwxyz"
    for al in alp:
        if got(a,al) and got(b,al):
      	    cnt+=1
    maxx=max(maxx,cnt)
print(maxx)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
maxx=-
def got(a,al):
	for i in a:
    	if i==al:
      		return(True)
	return(False)
for i in range(n):
	a=s[:i]
  	b=s[i:]
  	cnt=0
  	alp="abcdefghijklmnopqrstuvwxyz"
  	for al in alp:
    	if got(a,al) and got(b,al):
      		cnt+=1
  	maxx=max(maxx,cnt)
print(maxx)