TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
def check(n):
    """
    if n <= P-1:
        return True
    """

    if A[n]+M < A[P-1]:
        return False
    
    votes = (P+N-1-n)*M + sum([A[n]+M-A[i] for i in range(P-1,n)])

    if votes < M*V:
        return False
    else:
        return True

N,M,V,P = map(int,input().split())
A = list(map(int,input().split()))

A.sort(reverse=True)

right = N
left = P


##

while abs(right-left) > 1:

    mid = (right+left)//2
    print(mid)

    if check(mid):
        left = mid
    else:
        right = mid

print(left+1)

def check(n):

    if n <= P-1:
        return True

    if A[n]+M < A[P-1]:
        return False
    
    votes = (P+N-1-n)*M + sum([A[n]+M-i for i in A[P-1:n]])

    if votes < M*V:
        return False
    else:
        return True

N,M,V,P = map(int,input().split())
A = list(map(int,input().split()))

A.sort(reverse=True)


right = N
left = 0

while abs(right-left) > 1:

    mid = (right+left)//2

    if check(mid):
        left = mid
    else:
        right = mid

print(left+1)

Verdicts: Wrong Answer

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
N,M,V,P=map(int,input().split())
import numpy as np
A=np.array(sorted(map(int,input().split())))
ng,ok=-1,N-P+1
while ng+1<ok:
    t=(ng+ok)//2
    if A[t]<A[-P] or np.sum(np.minimum(M,A[t]+M-A[t+1:-P+1]))<M*(V-P-t):
        ng=t
    else:
        ok=t
print(N-ok)

N,M,V,P=map(int,input().split())
import numpy as np
A=np.array(sorted(map(int,input().split())))
ng,ok=-1,N-P+1
while ng+1<ok:
    t=(ng+ok)//2
    if A[t]+M<A[-P] or np.sum(np.minimum(M,A[t]+M-A[t+1:N-P+1]))<M*(V-P-t):
        ng=t
    else:
        ok=t
print(N-ok)

Verdicts: Wrong Answer

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
n, m, v, p = [int(_) for _ in input().split()]
l = [int(_) for _ in input().split()]

l = sorted(l, reverse=True)

print(l)

s = [0]


for i in range(1, n+1):
    s.append(s[-1] + l[-i])
s = sorted(s, reverse=True)

print(s)

for i in range(p, n):
    x = (l[i] + m) * (i - p + 1) - (s[p - 1] - s[i])
    print('i',i)
    print('(l[i] + m)', (l[i] + m))
    print('(i - p + 1)', (i - p + 1))
    print('(s[p - 1] - s[i])', (s[p - 1] - s[i]))
    print('x',x)
    y = 0
    if v >= (n - i) + (p - 1):
        y = v - (n - i) - (p - 1)

    print('y * m', y * m)

    if x < y * m:
        ans = i
        break

    if i == n-1:
        ans = n

print(ans)


l = [int(_) for _ in input().split()]

l = sorted(l, reverse=True)

# print(l)

s = [0]


for i in range(1, n+1):
    s.append(s[-1] + l[-i])
s = sorted(s, reverse=True)

# print(s)

for i in range(p, n):
    x = (l[i] + m) * (i - p + 1) - (s[p - 1] - s[i])
    # print('i',i)
    # print('(l[i] + m)', (l[i] + m))
    # print('(i - p + 1)', (i - p + 1))
    # print('(s[p - 1] - s[i])', (s[p - 1] - s[i]))
    # print('x',x)
    y = 0
    if v >= (n - i) + (p - 1):
        y = v - (n - i) - (p - 1)

    

    if x < y * m:
        ans = i
        break

    if i == n-1:
        ans = n

print(ans)

n, m, v, p = [int(_) for _ in input().split()]
l = [int(_) for _ in input().split()]

l = sorted(l, reverse=True)

# print(l)

s = [0]


for i in range(1, n+1):
    s.append(s[-1] + l[-i])
s = sorted(s, reverse=True)

# print(s)

for i in range(p, n):
    if l[i] + m < l[p - 1]:
        ans = i
        break
    x = (l[i] + m) * (i - p + 1) - (s[p - 1] - s[i])
    # print('i',i)
    # print('(l[i] + m)', (l[i] + m))
    # print('(i - p + 1)', (i - p + 1))
    # print('(s[p - 1] - s[i])', (s[p - 1] - s[i]))
    # print('x',x)
    y = 0
    if v >= (n - i) + (p - 1):
        y = v - (n - i) - (p - 1)

    

    if x < y * m:
        ans = i
        break

    if i == n-1:
        ans = n

print(ans)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
import sys
import math
import numpy as np

stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n, m, v, p = na()
a = na()
a.sort(reverse=True)
a = np.array(a)
print(a)
left = 0
right = n
def check(i):
    c = a[i] + m
    s = (p-1) * m + np.sum(np.minimum(c - a[p-1:], m))
    if i+1 <= p:
        return True
    elif a[i] + m < a[p-1]:
        return False
    elif s >= m * v:
        return True
    else:
        return False
while left + 1 < right:
    x = (left + right) // 2
    if check(x):
        left = x
    else:
        right = x
print(left + 1)

import sys
import math
import numpy as np

stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n, m, v, p = na()
a = na()
a.sort(reverse=True)
a = np.array(a)
left = p - 1
right = n
def check(i):
    c = a[i] + m
    s = (p-1) * m + np.sum(np.minimum(c - a[p-1:], m))
    if i+1 <= p:
        return True
    elif a[i] + m < a[p-1]:
        return False
    elif s >= m * v:
        return True
    else:
        return False
while left + 1 < right:
    x = (left + right) // 2
    if check(x):
        left = x
    else:
        right = x
print(left + 1)

Verdicts: Wrong Answer

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
N,M,V,P = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
S = sum(A)
for i in range(P-1):
    x = A.pop()
    S -= x
print(A)
total_score = M*(V-P+1)
kazu = N - P + 1
for i in range(N-P+1):
    a = A.pop(0)
    total_score -= M
    S -= a
    kazu -= 1
    T = (M+a)*kazu - S
    if i == N - P:
        ans = P
    else:
        if (a+M) >= A[-1]:
            if T >= total_score:
                ans = kazu + P
                break
print(ans)

N,M,V,P = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
S = sum(A)
for i in range(P-1):
    x = A.pop()
    S -= x
total_score = M*(V-P+1)
kazu = N - P + 1
for i in range(N-P+1):
    a = A.pop(0)
    total_score -= M
    S -= a
    kazu -= 1
    T = (M+a)*kazu - S
    if (a+M) > A[-1]:
        if T >= total_score:
            ans = kazu + P
            break
print(ans)

N,M,V,P = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
S = sum(A)
for i in range(P-1):
    x = A.pop()
    S -= x
total_score = M*(V-P+1)
kazu = N - P + 1
for i in range(N-P+1):
    a = A.pop(0)
    total_score -= M
    S -= a
    kazu -= 1
    T = (M+a)*kazu - S
    if i == N - P:
        ans = P
    else:
        if (a+M) >= A[-1]:
            if T >= total_score:
                ans = kazu + P
                break
print(ans)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
from collections import Counter

A = input()

N = len(A)
C = Counter(A)

print(1 + N * (N - 1) // 2 - sum(v * (v - 1) // 2 for v in C.values()))

from itertools import accumulate

N, M, V, P, *A = map(int, open(0).read().split())

A.sort(reverse=True)

S = list(accumulate(A)) + [0]

def is_ok(md):
    return (A[md] + M < A[P - 1]) or (A[md] + M) * (md - P + 1) - (S[md - 1] - S[P - 2]) < M * (V - (P - 1) - (N - md))

ng, ok = P - 1, N
while ok - ng > 1:
    md = (ok + ng) // 2
    if is_ok(md):
        ok = md
    else:
        ng = md

print(ok)

Verdicts: Wrong Answer

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
from itertools import *
n, m, v, p, *a = map(int, open(0).read().split())
a.sort(reverse=True)
acc = list(accumulate(a)) + [0]
ok, ng = p - 1, n
while ng - ok > 1:
	mid = (ok + ng) // 2
	if a[mid] + m > a[p - 1] and (a[mid] + m) * (mid - p + 1) - (acc[mid - 1] - acc[p - 2]) >= m * (
			v - (p - 1) - (n - mid)):
		ok = mid
	else:
		ng = mid
print(ok + 1)

from itertools import *
n,m,v,p,*a=map(int,open(0).read().split())
a.sort(reverse=True)
acc=list(accumulate(a))+[0]
ok,ng=p-1,n
while ng-ok>1:
	mid=(ok+ng)//2
	if a[mid]+m>=a[p-1] and (a[mid]+m)*(mid-p+1)-(acc[mid-1]-acc[p-2])>=m*(v-(p-1)-(n-mid)):
		ok=mid
	else:
		ng=mid
print(ok+1)

Verdicts: Wrong Answer

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
n ,a, b = map(int, input().split())
dis = b - a
if dis % 2 == 0:
    print(dis // 2)
else:
    shiftR = (n-b)
    shiftL = (a-1)
    ans = min(n-a,b-1, shiftR + 1 + ((n - (a + 1) + shiftR) //2), shiftL + 1 + (((b - 1) - shiftL - 1) // 2))
    print(ans)

n,m,v,p = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
def binary_search(left, right):
    if right - left <= 1:
        return left
    middle = (left + right) // 2
    if check(middle):
        return binary_search(middle, right)
    else:
        return binary_search(left, middle)

def check(target):
    used_vote = (p + n - target - 1) * m
    sum_vote = 0
    for i in range(target-1, p-2, -1):
        if a[target] + m < a[i]:
            return False
        sum_vote += (a[target] + m) - a[i]
    if sum_vote >= (m * v - used_vote): 
        return True
    else:
        return False
print(binary_search(0,n) + 1)

Verdicts: Runtime Error

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):

N, M, V, P = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)

print(A)
print(M*V)
def isOK(i):  
    
    need = M * (P-1)
    
    need += M
    
    
    need += M * (N-i-1)
    ai = A[i]  
    s = 0
    for j in range(P-1, i):
        d = A[j] - ai
        if d > M:  
            return False
        s += d
    print(i, need, s)
    if need + s >= M*V:
        return True
    else:
        return False


left = -1
right = N
while right - left > 1:
    mid = (right+left)//2
    if isOK(mid):  
        left = mid
    else:  
        right = mid
print(left + 1)



N, M, V, P = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)

capacity = M * (N-V)


def isOK(i):
    ai = A[i]  
    s = 0
    
    
    for j in range(P-i, i):
        d = A[j] - ai
        
        if d > M:  
            return False
        s += d
    if s > capacity:
        return False
    else:
        return True


left = -1
right = N
while right - left > 1:
    mid = right + (left-right)//2
    if isOK(mid):  
        left = mid
    else:  
        right = mid
print(left + 1)



N, M, V, P = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)


def isOK(i):  
    
    need = M * (P-1)
    
    need += M
    
    
    need += M * (N-i-1)
    ai = A[i]+M  
    s = 0
    for j in range(P-1, i):
        d = ai - A[j]
        if d < 0:
            return False
        s += d
    
    if need + s >= M*V:
        return True
    else:
        return False


left = -1
right = N
while right - left > 1:
    mid = (right+left)//2
    if isOK(mid):  
        left = mid
    else:  
        right = mid

print(left + 1)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
A = list(map(int, input().split()))

A.sort()
sumtab = [0] * (N + 1)
tmp_tab = 0
for i, Ai in enumerate(A):
    tmp_tab += Ai
    sumtab[i + 1] = tmp_tab

l = 0
r = N
while True:
    i = l + (r - l) // 2
    # print("#", l, r, i)
    #
    B = list(A)
    
    score_i = A[i] + M
    B[i] += M
    M_tmp = M * (V - 1)
    #
    rslt = False
    
    for j in list(range(N))[::-1]:
        
        if j == i:
            continue # me
        elif j > N - P:
            # make stronger problems stronger as possible
            tmp = min(M, M_tmp)
            #
            M_tmp -= tmp
            B[j] += tmp
        else:
            # make weaker problems weaker as possible
            if A[j] + M <= score_i:
                tmp = min(M, M_tmp)
            else:
                tmp = min(score_i - A[j], M_tmp)
            #
            M_tmp -= tmp
            B[j] += tmp
        #
        if M_tmp <= 0: break
    #
    
    if M_tmp <= 0 and score_i >= B[N - P]:
        r = i
    else:
        l = i + 1
    #
    if l >= r: break
        
print(N - l)

N, M, V, P = map(int, input().split())
A = list(map(int, input().split()))

A.sort()
sumtab = [0] * (N + 1)
tmp_tab = 0
for i, Ai in enumerate(A):
    tmp_tab += Ai
    sumtab[i + 1] = tmp_tab

l = 0
r = N
while True:
    i = l + (r - l) // 2
    # print("#", l, r, i)
    #
    B = list(A)
    
    score_i = A[i] + M
    B[i] += M
    M_tmp = M * (V - 1)
    #
    rslt = False
    
    for j in list(range(N))[::-1]:
        
        if j == i:
            continue # me
        elif j > N - P:
            # make stronger problems stronger as possible
            tmp = min(M, M_tmp)
            #
            M_tmp -= tmp
            B[j] += tmp
        else:
            # make weaker problems weaker as possible
            if A[j] > score_i:
                break
            if A[j] + M <= score_i:
                tmp = min(M, M_tmp)
            else:
                tmp = min(score_i - A[j], M_tmp)
            #
            M_tmp -= tmp
            B[j] += tmp
        #
        if M_tmp <= 0: break
    #
    
    if i >= N - P:
        r = i
    elif M_tmp <= 0 and score_i >= B[N - P]:
        r = i
    else:
        l = i + 1
    #
    if l >= r: break
        
print(N - l)

Verdicts: Runtime Error

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
n,m,v,p=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
ans=p
S=[A[p-1]]
for i in range(p,n):
    S.append(S[-1]+A[i])
for i in range(p,n):
    if v<=p+n-i-1:
        if A[i]-A[p-1]<=m:
            ans+=1
    else:
        if A[i]-A[p-1]<=m and S[i-p]-A[i]*(i-p+1)<=(n-v)*m:
            ans+=1
        else:
            break
print(ans)

n,m,v,p=map(int,input().split())
A=list(map(int,input().split()))
A.sort(reverse=True)
ans=p
S=[A[p-1]]
for i in range(p,n):
    S.append(S[-1]+A[i])
for i in range(p,n):
    if v<=p+n-i-1:
        if A[p-1]-A[i]<=m:
            ans+=1
    else:
        if A[p-1]-A[i]<=m and S[i-p]-A[i]*(i-p+1)<=(n-v)*m:
            ans+=1
        else:
            break
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
n, m, v, p = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)

ok = p - 1
ng = n

while ok - ng > 1:
  mid = (ok + ng) // 2
  if A[mid] + m < A[p - 1]:
    ng = mid
    continue

  used = m * p
  for i in range(p - 1, n):
    if i == mid:
      continue

    used += min(m, max(0, A[mid] + m - A[i]))

  if used >= m * v:
    ok = mid
  else:
    ng = mid

print(ok + 1)

# B - Voting Judges




n, m, v, p = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)

ok = p - 1
ng = n

while abs(ok - ng) > 1:
  mid = (ok + ng) // 2
  if A[mid] + m < A[p - 1]:
    ng = mid
    continue

  used = m * p
  for i in range(p - 1, n):
    if i != mid:
      used += min(m, max(0, A[mid] + m - A[i]))
      if used >= m * v:
        break

  if used >= m * v:
    ok = mid
  else:
    ng = mid

print(ok + 1)

Verdicts: Wrong Answer

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
#!/usr/bin/env python3
from itertools import accumulate

n, m, v, p = map(int, input().split())
a = sorted(map(int, input().split()))
cs = [0] + list(accumulate(a))
ans = p
rv = n - v
rp = n - p
for i in range(rp):
    l = rp - i
    if l >= rv and (cs[rp + 1] - cs[i + 1]) + (l - rv) * m <= (a[i] + m) * l:
        ans += 1
print(ans)


#!/usr/bin/env python3
from itertools import accumulate

n, m, v, p = map(int, input().split())
a = sorted(map(int, input().split()))
cs = [0] + list(accumulate(a))
ans = p
rv = n - v
rp = n - p
for i in range(rp):
    if a[i] + m < a[rp]:
        continue
    l = rp - i
    if (cs[rp + 1] - cs[i + 1]) + (l - rv) * m <= (a[i] + m) * l:
        ans += 1
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
















def main():
    # N, M, V, P = list(map(int, input().split()))
    # A = list(map(int, input().split()))
    with open('PastAGC/01-08.txt', 'r') as f:
        N, M, V, P = list(map(int, f.readline().split()))
        A = list(map(int, f.readline().split()))
    P -= 1  # to 0-indexed
    A.sort(reverse=True)  
    cumsum = [0] * N
    cumsum[0] = A[0]
    for i in range(1, N):
        cumsum[i] = cumsum[i - 1] + A[i]
    q = P + 1
    while q < N:
        left = cumsum[q - 1]
        if P > 0:
            left -= cumsum[P - 1]
        right = M * (N - V) + A[q] * (q - P)
        if A[P] - A[q] > M or left > right:
            print(q)
            return
        q += 1
    print(q)


if __name__ == '__main__':
    main()

















def main():
    N, M, V, P = list(map(int, input().split()))
    A = list(map(int, input().split()))
    P -= 1  # to 0-indexed
    A.sort(reverse=True)  
    cumsum = [0] * N
    cumsum[0] = A[0]
    for i in range(1, N):
        cumsum[i] = cumsum[i - 1] + A[i]
    q = P + 1
    while q < N:
        left = cumsum[q - 1]
        if P > 0:
            left -= cumsum[P - 1]
        right = M * (N - V) + A[q] * (q - P)
        if A[P] - A[q] > M or left > right:
            print(q)
            return
        q += 1
    print(q)


if __name__ == '__main__':
    main()

Verdicts: Runtime Error

Accepted
Problem: N problems are proposed for an upcoming contest. Problem i has an initial integer score of A_i points.  M judges are about to vote for problems they like. Each judge will choose exactly V problems, independently from the other judges, and increase the score of each chosen problem by 1.  After all M judges cast their vote, the problems will be sorted in non- increasing order of score, and the first P problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.  How many problems out of the given N have a chance to be chosen for the problemset?

Submission attempts (in order):
n,m,v,p = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
tg = a[p-1]
l = p-1
r = n
biggest = 0
print(a)
while l<r:
    x = (l+r)//2
    if a[p-1]-a[x]<=m:
        border = v*m-(n-x+p-1)*m
        biggest = sum([a[x]+m-a[j] for j in range(p-1,x)])
    else:
        r = x
        continue
    if border > biggest:
        r = x
    elif border <= biggest:
        l = x+1
print(l)

n,m,v,p = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse=True)
tg = a[p-1]
l = p-1
r = n
biggest = 0
while l<r:
    x = (l+r)//2
    if a[p-1]-a[x]<=m:
        border = v*m-(n-x+p-1)*m
        biggest = sum([a[x]+m-a[j] for j in range(p-1,x)])
    else:
        r = x
        continue
    if border > biggest:
        r = x
    elif border <= biggest:
        l = x+1
print(l)

Verdicts: Wrong Answer

Accepted
Problem: N problems have been chosen by the judges, now it's time to assign scores to them!  Problem i must get an integer score A_i between 1 and N, inclusive. The problems have already been sorted by difficulty: A_1 \le A_2 \le \ldots \le A_N must hold. Different problems can have the same score, though.  Being an ICPC fan, you want contestants who solve more problems to be ranked higher. That's why, for any k (1 \le k \le N-1), you want the sum of scores of any k problems to be strictly less than the sum of scores of any k+1 problems.  How many ways to assign scores do you have? Find this number modulo the given prime M.

Submission attempts (in order):
def main():
    n,m=map(int,input().split())
    from itertools import accumulate
    dp=[[0] * (n+1)]*n 
    #print(dp)
    dp[0][-n]=1
    for i in range(n-1):
        dp[i]=list(accumulate(dp[i]))
        for j in range(1,n+1):
            dp[i+1][j]=dp[i][j]
    cnt=0
    for i in range(n):
        cnt+=dp[i][-1]
        cnt%=m
    print(cnt)
if __name__=='__main__':
    main()

import numpy as np 
n,m=map(int, input().split())
coef = np.minimum(np.arange(n,1,-1),np.arange(1,n))
dp = np.zeros(n, dtype=np.int64)
dp[0] = 1
for c in coef:
    ndp = dp.copy()
    for i in range(0, n, c):
        ndp[i:] += dp[:n-i]
    dp = ndp % m 

print((dp*np.arange(n, 0, -1) % m).sum() % m)

import numpy as np 
n,m=map(int, input().split())
coef = np.minimum(np.arange(n,1,-1),np.arange(1,n))
dp = np.zeros(n, dtype=np.int64)
dp[0] = 1
for c in coef:
    ndp = dp.copy()
    for i in range(c, n, c):
        ndp[i:] += dp[:n-i]
    dp = ndp % m 

print((dp*np.arange(n, 0, -1) % m).sum() % m)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
import fractions
A,B=map(int,input().split())
print(int(A*B/fractions.gcd(A,B)))

from math import sqrt
from decimal import Decimal
ans = [1,2,3]
A,B=map(int,input().split())
ans.remove(A)
ans.remove(B)
print(ans[0])

from math import sqrt
from decimal import Decimal
ans = [1,2,3]
A,B=int(input()),int(input())
ans.remove(A)
ans.remove(B)
print(ans[0])


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
A＝int(input())
B=int(input())
C=6-A-B
print(C)

A=int(input())
B=int(input())
C=6-A-B
print(C)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
A = (input())
B = (input())

for i in range(1, 4):
  if i == A:
    continue
  if i == B:
    continue
  print(i)
  exit()

A = int(input())
B = int(input())

for i in range(1, 4):
  if i == A:
    continue
  if i == B:
    continue
  print(i)
  exit()


Verdicts: Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
import fractions
A,B = map(int,input().split())
print(int(A*B/fractions.gcd(A,B)))

N = int(input())
al = list(map(int,input().split()))
target = 1
ans = 0
for a in al:
    if a == target:
        target += 1
    else:
        ans += 1
if ans == 0:
    print(-1)
else:
    print(ans)

print(6-int(input())-int(input()))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
A=int(input())
B=int(input())
s={1,2,3}
s.discard(A)
s.discard(B)
int(s.pop())

A=int(input())
B=int(input())
l=[1,2,3]
l.remove(A)
l.remove(B)
int(l[0])

A=int(input())
B=int(input())
s={1,2,3}
s.discard(A)
s.discard(B)
s.pop()

A=int(input())
B=int(input())
l=[1,2,3]
l.remove(A)
l.remove(B)
print(int(l[0]))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
import fraction
a, b = map(int, input().split())
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
print(lcm(a, b))

a = [int(input())]
b = [int(input())]
l = [1, 2, 3]
ans = set(l) - set(a) -set(b)
print(list(ans)[0])

Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
A, B = list(map(int, input().split()))
ans = [1,2,3]
ans.remove(A)
ans.remove(B)

print(ans[0])

A = int(input())
B = int(input())
ans = [1,2,3]
ans.remove(A)
ans.remove(B)

print(ans[0])

Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
A = input()
B = input()
C = 1

if (A == 1 or B == 1):
    C = 2
if (A == 2 or B == 2):
    C = 3

print(C)

A = int(input())
B = int(input())

print( 6-(A+B) )

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
n,m = map(int,input().split())
print(6-n-m)


n =int(input())
m = int(input())
print(6-n-m)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
A=input()
B=input()
ans_list=[1,2,3]
for ans in ans_list:
  if ans!=A and ans!=B:
    return ans
  

A=input()
B=input()
ans_list=[1,2,3]
for ans in ans_list:
    if ans!=int(A) and ans !=int(B):
        print(ans)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
#include <bits/stdc++.h>
using namespace std;

int main()
{

    int h, w;

    cin >> h >> w;

    if(h*w==2) cout << 3 <<endl;
    if(h*w==3) cout << 2 <<endl;
    if(h*w==6) cout << 1 <<endl;
}

a = int(input())
b = int(input())

if a*b==2:
    print(3)
elif a*b==3:
    print(2)
else:
    print(1)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
print(6-input()-input())

print(6-int(input())-int(input()))

Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
a=int(intput())
b=int(intput())
print(6-a-b)

a=int(input())
b=int(intput())
print(6-a-b)

a=int(input())
b=int(input())
print(6-a-b)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
print(int(6 - int(input()) - int(input()))

print(int(6 - sum(list(map(int, input().split())))))

print(int(6 - int(input()) - int(input())))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
a=int(input())
b=int(input())

if a*b==2:
  print(3)
elif a*b==3:
  print(1)
else:
  print(2)

a=int(input())
b=int(input())

if a*b==2:
  print(3)
elif a*b==3:
  print(2)
else:
  print(1)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
A = int(input())
B = int(input())
ans = [1, 2, 3]
ans.pop(A)
ans.pop(B)
print(ans[0])

A = int(input())
B = int(input())
ans = [1, 2, 3]
ans.remove(A)
ans.remove(B)
print(ans[0])

Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
  if b == 2:
    print('3')
  else
    print('2')


a = int(input())
b = int(input())

if a == 1:
  if b == 2:
    print('3')
  else:
    print('2')
elif a == 2:
  if b == 1:
    print('3')
  else:
    print('1')
else:
  if b == 1:
    print('2')
  else:
    print('1')


Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
a, b = map(int, input().split())
for i in range(1, 4):
  if a != i and b!= i:
    print(i)

a, b = int(input()), int(input())
for i in range(1, 4):
  if a != i and b!= i:
    print(i)


Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
a=int(input())
b=int(input())
prit(6-a-b)

a=[int(x) for x in input().split()]
print(6-sum(a))

a=int(input())
b=int(input())
print(6-a-b)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
a,b=int(input())
print(6-a-b)

a,b=map(int,input().split())
print(6-a-b)

a=int(input())
b=int(input())
print(6-a-b)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
a = input()
b = input()

answer_list = {"1","2","3"}
answer_list -= a
answer_list -= b

print(answer_list[0])

a = input()
b = input()
 
answer_list = {"1","2","3"}
answer_list.remove(a)
answer_list.remove(b)
 
print(answer_list[0])

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

x,y = input().split()
x = int(x)
y = int(y)
if x < y:
  a = y
  b = x
else:
  a = x
  b = y
 
while b:
  a, b = b, a % b
 
print(x*y//a)

x,y = input().split()
x = int(x)
y = int(y)
if x < y:
  a = y
  b = x
else:
  a = x
  b = y
 
while b:
  a, b = b, a % b
 
print(int(x*y/a))

a = input()
b = input()
 
answer_list = ["1","2","3"]
answer_list.remove(a)
answer_list.remove(b)
 
print(answer_list[0])

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
N = int(input())
ans = 0
if N % 2 == 1:
    print(ans)
else:
    for i in range(1, 20):
        a = N // (2 * (5**i))
        ans += a
        if a == 0:
            break
    print(ans)




List = [1, 2, 3]
A = int(input())
B = int(input())
List.remove(A)
List.remove(B)
print(List[0])

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
A=int(input())
B=int(input())
c=[1,2,3]
c.remove(A)
c.remove(B)
print(c)

A=int(input())
B=int(input())
c=[1,2,3]
c.remove(A)
c.remove(B)
print(c[0])

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
a=int(input())
b=int(input())
c=a+b
if c==3:
	print("2")
elif c==4:
	print("3")
else:
	print("1")

a=int(input())
b=int(input())
c=a+b
if c==3:
	print("3")
elif c==4:
	print("2")
else:
	print("1")

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
x, y = input().split(" ")
a = int(x)
b = int(y)

ans = {1, 2, 3}
not_ans = {a, b}

z = ans.difference(not_ans)

print(z)

a = int(input())
b = int(input())

ans = {1, 2, 3}
not_ans = {a, b}

z = ans.difference(not_ans)

print(z)

a = int(input())
b = int(input())

ans = {1, 2, 3}
not_ans = {a, b}

for data in ans.difference(not_ans):
    print(data)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
import sys

input = sys.stdin.readline

A = int(input())
B = int(input())
ans = [1,2,3]

for value in ans:
    if A == value or B == value:
        continue:
    else:
        print(value)

import sys

input = sys.stdin.readline

A = int(input())
B = int(input())
ans = [1,2,3]

for value in ans:
    if A == value or B == value:
        continue
    else:
        print(value)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
q = [0,1,2]

A = int(input())
B = int(input())

q.remove(A)
q.remove(B)

print(q[0])


q = [1,2,3]

A = int(input())
B = int(input())

q.remove(A)
q.remove(B)

print(q[0])


Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
a,b=(int(i)for i in input().split())

print(6-a-b)

a=int(input)
b=int(input)

print(6-a-b)

a=int(input())
b=int(input())

print(6-a-b)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
A, B = map(int,input().split())

def gcd(A,B):
  while B!=0:
    A,B=B,A%B
  return A
def lcm(A,B):
  return A*B//gcd(A,B)
print(str(lcm(A,B)))

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

def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a
def lcm(a,b):
  return a*b//gcd(a,b)
print(lcm(a,b))

A = int(input())
B = int(input())

ans = 0

if A == 1 and B == 2:
  ans = 3
elif A == 1 and B == 3:
  ans = 2
elif A == 2 and B == 1:
  ans = 3
elif A == 2 and B == 3:
  ans = 1
elif A == 3 and B == 1:
  ans = 2
elif A == 3 and B == 2:
  elif = 1
  
print(ans)

A, B = map(int,input().split())

def gcd(A,B):
  while B!=0:
    A,B=B,A%B
  return A
def lcm(A,B):
  return A*B//gcd(A,B)
print(lcm(A,B))

A = int(input())
B = int(input())
 
ans = ""
 
if A == 1 and B == 2:
  ans = "3"
elif A == 1 and B == 3:
  ans = "2"
elif A == 2 and B == 1:
  ans = "3"
elif A == 2 and B == 3:
  ans = "1"
elif A == 3 and B == 1:
  ans = "2"
elif A == 3 and B == 2:
  ans = "1"
  
print(ans)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
A = int(input())
B = int(input())
L = A + B
print(5 - L)

A = int(input())
B = int(input())
L = A + B
print(5 - L + 1)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
list=[1,2,3]

A=input()
B=input()

C=list.remove(A).remove(B)

print(C[0])


list=["1","2","3"]

A=input()
B=input()

list.remove(A)
list.remove(B)

print(list[0])

Verdicts: Runtime Error

Accepted
Problem: Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1, 2, and 3.  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.

Submission attempts (in order):
A=[int(input()),int(input())]
if not 1 in A:
  print(1)
elif not 2 in A:
  print(2)
else not 3 in A:
  print(3)

L=[int(input()),int(input())]
if not 1 in L:
  print(1)
elif not 2 in L:
  print(2)
else:
  print(3)

Verdicts: Runtime Error

Accepted