Harryxun/stf_run huggingface dataset:
import sys
n = list(map(int, input().split()))
s = list(input())
for i in s:
    if i == n[1]:
        print(s[i].lower(),end='')
        break
    print(s[i],end='')

### FIXED CODE ###

import sys
n = list(map(int, input().split()))
s = list(input())
for i in range(len(s)):
    if i == n[1]-1:
        print(s[i].lower(),end='')
        continue
    print(s[i],end='')
h, k = map(int, input().split())
lis = list(map(int, input().split()))
if n >= k:
    lis.sort(reverse=True)
    lis = lis[k:]
else:
    lis = []
    
print(sum(lis))

### FIXED CODE ###

h, k = map(int, input().split())
lis = list(map(int, input().split()))
if h >= k:
    lis.sort(reverse=True)
    lis = lis[k:]
else:
    lis = []
    
print(sum(lis))
import numpy as np

n = int(input())
A = np.array(list(map(int, input().split())))

ans = []
for i in range(n):
  tmpidx = np.argmin(A)
  A[tmpidx] = np.inf
  ans.append(tmpidx+1)

print(*ans)

### FIXED CODE ###

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

ans = [0 for _ in range(n)]
for i in range(n):
  ans[A[i]-1] = i+1

print(*ans)
sorted(a) = list[map(int, input().split())]
if a[0] == a[1]:
  print("Yes")
els:
  print("No")

### FIXED CODE ###

n = input()
if n[0] == n[2]:
  print("Yes")
else:
  print("No")
n = int(input())
a = list(map(int,input().split()))

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

### FIXED CODE ###

import sys

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

if 0 in a :
  print(0)
  sys.exit()

ans = 1
for i in range(n) :
  ans *= a[i]
  if ans > 10**18 :
    ans = -1
    break
    
print(ans)
# -*- coding: utf-8 -*-


def main():
    n = int(input())
    s = list(input())

    if len(set(s)) == 1:
        print(0)
    else:
        ans = 0
        i = 0

        while i < n - 1:
            if s[i] == '#' and s[i + 1] == '.':
                ans += 1

                if i + 2 < n:
                    if s[i + 2] == '#':
                        i += 2
                    elif s[i + 2] == '.':
                        i += 3
                else:
                    print(ans)
                    exit()
            else:
                i += 1

    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

# -*- coding: utf-8 -*-


def main():
    n = int(input())
    s = list(input())
    black_count = [0 for _ in range(n + 1)]
    ans = float('inf')

    for i, si in enumerate(s):
        if si == '#':
            black_count[i + 1] = black_count[i] + 1
        else:
            black_count[i + 1] = black_count[i]

    for j in range(n + 1):
        ans = min(ans, black_count[j] + (n - j) - black_count[n] + black_count[j])

    print(ans)


if __name__ == '__main__':
    main()
n,k = map(int,input().split())
lis = [int(e) for i in input().split()]

c = 0
for i in lis:
        if i >= e:
            c += 1
print(c)


### FIXED CODE ###

n,k = map(int,input().split())
lis = [int(i) for i in input().split()]

c = 0
for i in lis:
        if i >= k:
            c += 1
print(c)
n,m = map(int,input().split())
flag = [0]*(n+1)
for i in range(m):
  a = int(input())
  flag[a] = 1
num = 10**9+7
count = [0]*(n+1)
count[0] = 1
count[1] = 1 if 1 not in a else 0
for i in range(2,n+1):
  if flag[i]==0: count[i] = count[i-1] + count[i-2]
  count[i] = count[i]%num
print(count[n])


### FIXED CODE ###

n,m = map(int, input().split())
num = list(int(input()) for _ in range(m))

count = [-1]*(n+1)
for stair in num:
  count[stair] = 0
  
count[0] = 1
count[1] = 1 if 1 not in num else 0

for i in range(2,n+1):
  if count[i] != 0:
  	count[i] = (count[i-1]+count[i-2]) % (10**9+7)
  
print(count[n])
import fractions


def prime_number(n):
    # n >= 2
    N = n + 1
    table = [0] * N
    prime_list = []

    for i in range(2, N):
        if table[i] == 0:
            prime_list.append(i)

            for j in range(i + i, N, i):
                table[j] = 1

    return prime_list

def prime_factor(n):
    prime_list = prime_number(n)
    
    ret = 1
    for i in prime_list:
        if n % i == 0:
            ret +=1
            while n % i == 0:
                n = n // i
            
    return ret

if __name__ == "__main__":
    A, B = map(int, input().split())
    n = fractions.gcd(A, B)
    print(prime_factor(n))

### FIXED CODE ###

import math, fractions


def num_prime_factor(n):
    
    ret = 0

    for i in range(1, int(math.sqrt(n)) + 2):

        composite = False

        if n % i == 0:
            ret += 1
            n = n / i

            if i != 1:
                while n % i == 0:
                    n = n / i

            if n == 1:
                break

            for j in range(2, int(math.sqrt(n)) + 2):
                if n % j == 0:
                    composite = True
                    break

            if not composite:
                ret += 1
                break

    return ret

if __name__ == "__main__":
    A, B = map(int, input().split())
    n = fractions.gcd(A, B)
    print(num_prime_factor(n))
s=input()
n=len(s)-1
ans=0
for b in list(product(['+',''],repeat=n))
    a=s[0]
    for i in range(n):
        a=a+b[i]+s[i+1]
    ans+=eval(a)
print(ans)


### FIXED CODE ###

from itertools import product
s=input()
n=len(s)-1
ans=0
for b in list(product(['+',''],repeat=n)):
    a=s[0]
    for i in range(n):
        a=a+b[i]+s[i+1]
    ans+=eval(a)
print(ans)
a,b = input().split()
H_D_map = {"H":1,"D":-1}
a = H_D_map[a]
b = H_D_map[b]

if a*B==1:
  print("H")
else:
  print("D")

### FIXED CODE ###

a,b = input().split()
H_D_map = {"H":1,"D":-1}
a = H_D_map[a]
b = H_D_map[b]

if a*b==1:
  print("H")
else:
  print("D")
A, B=map(int,input())

func=lambda x:(x,x+13)[x==1]

if func(A)==func(B):
  print('Draw')
elif func(A)<func(B):
  print('Bob')
else:
  print('Alice')

### FIXED CODE ###

A, B=map(int,input().split())
 
func=lambda x:[x,x+13][x==1]
 
if func(A)==func(B):
  print('Draw')
elif func(A)<func(B):
  print('Bob')
else:
  print('Alice')
A = int(input())
if (A%4 == 3 or A%4 == 0 A%7 == 4 or A%7 == 0) and A != 3:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

A = int(input())
Flag = False
for i in range((A//4)+1):
  for j in range((A//7)+1):
    if 4*i + 7*j == A:
      Flag = True
if Flag:
  print('Yes')
else:
  print('No')
#C-Next Letter
str = input()
K = int(input())
tempK = K
result = ""
for i in range(len(str)-1):
	changeNum = 122-ord(str[i])+1
	if (changeNum <= tempK):
		result += "a"
		tempK -= changeNum
		if (tempK == 0):
			result += str[i+:]
			print(result)
			break
	else:
		result += str[i]
tempK %= 26
if (tempK > 0):
	changeNum = ord(str[-1]) + tempK
	if (changeNum > 122):
		changeNum = changeNum -122 + 97 -1
	else:
		changeNum = changeNum
	result += chr(changeNum)
else:
	result += str[-1]
print(result)

### FIXED CODE ###

#C-Next Letter
str = input()
K = int(input())
tempK = K
result = ""
for i in range(len(str)-1):
	changeNum = 122-ord(str[i])+1
	if (changeNum <= tempK and str[i] != "a"):
		result += "a"
		tempK -= changeNum
	else:
		result += str[i]
tempK %= 26
if (tempK > 0):
	changeNum = ord(str[-1]) + tempK
	if (changeNum > 122):
		changeNum = changeNum -122 + 97 -1
	else:
		changeNum = changeNum
	result += chr(changeNum)
else:
	result += str[-1]
print(result)
n=int(input())
a=[int(i) for i in input().split()]

ans=0
def plus_minus(i):
    while True:
        if a[i]==a[i+1]:
            i+=1
            continue
        if a[i]<a[i+1]:
            return 1
        if a[i]>a[i+1]:
            return -1

plus_minus(0)            
ans=1
for j in range(i,n-1):
    if check==1:
        if a[j] <= a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
    else:
        if a[j]>=a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
print(ans)

### FIXED CODE ###

n=int(input())
a=[int(i) for i in input().split()]

ans=0
def plus_minus(i):
    while True:
        if i==n-1:
            break
        if a[i]==a[i+1]:
            i+=1
            continue
        if a[i]<a[i+1]:
            return 1
        if a[i]>a[i+1]:
            return -1

check=plus_minus(0)            
ans=1
for j in range(n-1):
    if check==1:
        if a[j] <= a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
    else:
        if a[j]>=a[j+1]:
            continue
        else:
            ans+=1
            check=plus_minus(j+1)
print(ans)
n,k=map(int,input().split())
a=list(map(int,input().split()))
from fractions import gcd
from functools import reduce
def g(l):
return reduce(gcd,l)
if max(a)<k:
  print('IMPOSSIBLE')
else:
  z=g(a)
  if k%z==0:
    print('POSSIBLE')
  else:
    print('IMPOSSIBLE')

### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
from fractions import gcd
from functools import reduce
def g(l):
  return reduce(gcd,l)
if max(a)<k:
  print('IMPOSSIBLE')
else:
  z=g(a)
  if k in a or k%z==0:
    print('POSSIBLE')
  else:
    print('IMPOSSIBLE')
print(max(int(input())-int(input()), 0))

### FIXED CODE ###

a,b=map(int,input().split())
print(max(0,a-b))
import sys

N = int(input())
XY = [[int(_) for _ in input().split()] for i in range(N)]

mc = [0, 0]
maxl = 0

for x, y in XY:
    l = abs(x) + abs(y)
    maxl = max(maxl, l)
    mc[l % 2] += 1

if mc[0] > 0 and mc[1] > 0:
    print(-1)
    sys.exit()

if maxl > 20:
    raise

def calc(sx, sy, dx, dy, d):
    #print("#", sx, sy, dx, dy)
    x = dx - sx
    y = dy - sy
    tx = x + 3 * d - y
    ty = x + 3 * d + y
    dirs = ("LL", "LD", "DD"), ("LU", "UD", "RD"), ("UU", "RU", "RR")
    ds = {"R": (+d, 0), "L": (-d, 0), "U": (0, +d), "D": (0, -d)}
    dir = dirs[ty // (2 * d)][tx // (2 * d)]
    ex, ey = sx, sy
    for d in dir:
        ex += ds[d][0]
        ey += ds[d][1]
    #print("*", dir, ex, ey)
    return dir, ex, ey


ds = [9, 3, 1]
ds0 = ds

w0 = ""
x0, y0 = 0, 0

if mc[1] > 0:
    ds0 = [1] + ds0
    w0 += "R"
    x0 += 1

print(len(ds0))
print(*ds0)

for i in range(N):
    w = w0
    x, y = x0, y0
    for j, d in enumerate(ds):
        wc, x, y = calc(x, y, XY[i][0], XY[i][1], d)
        w += wc
    print(w)





### FIXED CODE ###

import sys

N = int(input())
XY = [[int(_) for _ in input().split()] for i in range(N)]

mc = [0, 0]
maxl = 0

for x, y in XY:
    l = abs(x) + abs(y)
    maxl = max(maxl, l)
    mc[l % 2] += 1

if mc[0] > 0 and mc[1] > 0:
    print(-1)
    sys.exit()

#print(maxl)

def calc(sx, sy, ex, ey, d):
    dx, dy = ex - sx, ey - sy
    rx, ry = dx - dy, dx + dy
    if rx > 0:
        if ry > 0:
            d, x, y = "R", sx + d, sy
        else:
            d, x, y = "D", sx, sy - d
    else:
        if ry > 0:
            d, x, y = "U", sx, sy + d
        else:
            d, x, y = "L", sx - d, sy
    return d, x, y

import math

l = math.ceil(math.log(maxl + 1, 2))

ms = [2 ** (l - i - 1) for i in range(l)]

rms = ms

if mc[0] > 0:
    rms = [1] + ms

print(len(rms))
print(*rms)

for ex, ey in XY:
    x, y = 0, 0
    w = ""
    if mc[0] > 0:
        w = "R"
        x += 1
    for m in ms:
        d, x, y = calc(x, y, ex, ey, m)
        w += d
    print(w)
inpl = lambda: list(map(int,input().split()))
N, M = inpl()
A = inpl()
A.sort()
BC = []
for _ in range(M):
    BC.append(inpl())
BC.sort(key=lambda x: -x[1])

D = []
for B, C in BC:
    if len(D) >= N:
        break
    d = [int(C)]*B
    D += d
D.sort(reverse=True)

for i in range(N):
    if D[i] > A[i]:
        A[i] = D[i]
    else:
        break
ans = sum(A)
print(ans)

### FIXED CODE ###

inpl = lambda: list(map(int,input().split()))
N, M = inpl()
A = inpl()
A.sort()
BC = []
for _ in range(M):
    BC.append(inpl())
BC.sort(key=lambda x: -x[1])
t = 0
S = 0
for B,C in BC:
    f = t
    t = f + B
    if t > N:
        t = N
    if f >= N:
        break
    if C >= A[t-1]:
        S += (t-f)*C
    else:
        for i in range(f,t):
            if C >= A[i]:
                S += C
            else:
                t = i
                break
        break
if t < N:
    S += sum(A[t:])
print(S)
MAX_N = 10000000+1

def make_sosu_tbl():
    for i in range(2, MAX_N):
        if sos[i]:
            for j in range(i+i, MAX_N+1, i):
                sos[j] = 0
        if i**2 >= MAX_N:break

sos = [1] * (MAX_N+1)
make_sosu_tbl()
while 1:
#    MAX_N = int(input())
#    if not MAX_N: break
#    
    n = int(input())
    for i in reversed(range(13,n+1)):
        if sos[i] and sos[i-2] and sos[i-6] and sos[i-8]:
            print(i)
            break

### FIXED CODE ###

# from datetime import datetime

# measure_start = datetime.now()
move = [[[10, 10], [4, 4]], [[8, 2],[4, 2]]]

MAX_N = 10000000+1
sos = [1] * (MAX_N+1)
sos[0] = sos[1] = 0
for i in range(2, int(MAX_N**0.5)+1):
    if sos[i]:
        for j in range(i+i, MAX_N+1, i):
            sos[j] = 0

while 1:
    try:
        n = int(input())

        if not n: break
        n -= (n%2 == 0)
        while n >= 13:
            if sos[n] and sos[n-2] and sos[n-6] and sos[n-8]:
                print(n)
                break
            else:
                n -= move[sos[n-8]][sos[n-6]][sos[n-2]]
    # measure_stop = datetime.now()
    # print(measure_stop - measure_start)
    except:
        pass
s = input()
if len(s) < 26:
  for i in range(97, 124):
    if chr(i) not in s:
      break
  print(s + chr(i))
else:
  prep = [s[-1]]
  for i in s[-2::-1]:
    if i > prep[-1]:
      prep.append(i)
    else:
      break
  if len(prep) == 26:
    print(-1)
  else:
    print(s[:-len(prep)-1] + min(i for i in prep if i > s[-len(prep)-2]))

  

### FIXED CODE ###

s = input()
if len(s) < 26:
  for i in range(97, 124):
    if chr(i) not in s:
      break
  print(s + chr(i))
else:
  prep = [s[-1]]
  for i in s[-2::-1]:
    if i > prep[-1]:
      prep.append(i)
    else:
      break
  if len(prep) == 26:
    print(-1)
  else:
    print(s[:-len(prep)-1] + min(i for i in prep if i > s[-len(prep)-1]))
from numpy import cumsum
n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a=cumsum(a)
b=cumsum(b)

for i in range(n):
    if a[i]>k:
        read=i
        break
if a[n-1]<k:
    read=n
time=a[read-1]
ans=read
start=read-1
if read==n:
    for i in range(m):
        if time+b[i]>k:
            read+=i
            ans=max(ans,read)
            read=-i
        if i==m-1:
            print(n+m)
            exit()
            
for i in range(read):
    read-=1
    time-=a[start-i]
    for j in range(m):
        if time+b[j]>k:
            read+=j
            ans=max(ans,read)
            read-=j
            break
        if j==m-1:
            read+=m
            print(max(ans,read))
            exit()
print(ans)

### FIXED CODE ###

from bisect import bisect
from numpy import cumsum
n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a=cumsum(a)
b=cumsum(b)

read=bisect(a,k)
time=a[read-1]
ans=read

for i in range(read):
    extra=k-time
    r=bisect(b,extra)
    ans=max(ans,read+r)
    read-=1
    time=a[read-1]
read=bisect(b,k)
ans=max(ans,read)
print(ans)
import bisect
import math
from scipy.misc import comb

N,A,B=map(int,input().split())
List=list(map(int,input().split()))
List = sorted(List, reverse=True)

mini = List[A-1]
ans = 0

if List[A-1] != List[A]:
  ans = sum(List[:A])/A
  print(ans)
  print(1)

else:
  num = List.count(List[A-1])
  List = sorted(List)
  num2 = N - bisect.bisect_right(List,List[A-1])
  List = sorted(List, reverse=True)
  
  if List[0] != List[A-1]:
    B = A
  for i in range(B-A+1):
    n = num
    kosuu = int(A + i - num2)
    ans  = int(ans + math.factorial(n) // (math.factorial(n - kosuu) * math.factorial(kosuu)))
  
  ave = int(sum(List[:A])/A)
  print(ave)
  print(ans)

### FIXED CODE ###

import bisect
import math
from scipy.misc import comb

N,A,B=map(int,input().split())
List=list(map(int,input().split()))
List = sorted(List, reverse=True)

mini = List[A-1]
ans = 0

if List[A-1] != List[A]:
  ans = sum(List[:A])/A
  print(ans)
  print(1)

else:
  num = List.count(List[A-1])
  List = sorted(List)
  num2 = N - bisect.bisect_right(List,mini)
  List = sorted(List, reverse=True)
  
  if List[0] != List[A-1]:
    B = A
  for i in range(B-A+1):
    n = num
    kosuu = A + i - num2
    ans  = int(ans + comb(n, kosuu, exact=True))
  
  ave = int(sum(List[:A])/A)
  print(ave)
  print(ans)
a, b = map(int, input().split())
print a*b

### FIXED CODE ###

a, b = map(int, input().split())
print(a*b)
from math import sort
x1, y1, x2, y2 = map(float, input().split())  
 print(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))


### FIXED CODE ###

from math import sqrt
x1, y1, x2, y2 = map(float, input().split())  
 
print(sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))
n=int(input())
a=list(map(int,input().split()))
o=[]
e=[]
for i in range(n):
  if i%2==0:
    o.append(a[i])
  else:
    e.append(a[i])
from collections import Counter as co
o=co(o)
e=co(e)
ov=o.values()
ev=e.values()
mo=max(ov)
me=max(ev)
if max(o,key=o.get)==max(e,key=e.get):
  if mo>me:
    me=sorted(ev)[n//2-2]
  else:
    mo=sorted(ov)[n//2-2]
print(n-mo-me)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
o=[]
e=[]
for i in range(n):
  if i%2==0:
    o.append(a[i])
  else:
    e.append(a[i])
from collections import Counter as co
o=co(o)
e=co(e)
o['x']=0
e['x']=0
ov=o.values()
ev=e.values()
mo=max(ov)
me=max(ev)
if n==2:
  if a[0]==a[1]:
    print(1)
  else:
    print(0)
else:
  if max(o,key=o.get)==max(e,key=e.get):
    if mo>me:
      me=sorted(ev)[-2]
    elif mo<me:
      mo=sorted(ov)[-2]
    else:
      mo=max(sorted(ev)[-2],sorted(ov)[-2])
  print(n-mo-me)
N, M = map(int, input('').split(' '))
list = []
flag = []
num = 0
for j in range(N):
    list.append(0)
    flag.append(0)
if(M == 0):
    M = 1
for i in range(M):
    s, c = map(int, input('').split(' '))
    s = int(s)
    if flag[N - s] == 1 and list[N - s] != c:
        print(-1)
        exit(0)
    else:
        list[N - s] = c
        flag[N - s] = 1
for j in range(N):
    num += list[j] * 10 ** j
if num > 0:
    print(num)
else:
    print(-1)

### FIXED CODE ###

import collections as cl
N, M = map(int, input().split())
dic = cl.defaultdict(lambda:-1)
num = 0
for i in range(0, M):
    s, c = map(int, input().split())
    if N - s in dic and dic[N-s] != c:
        print(-1)
        exit(0)
    else:
        dic[N-s] = c
if dic[N-1] == -1:
    if N == 1:
        dic[N-1] = 0
    else:
        dic[N-1] = 1
for j in dic.keys():
    num += dic[j] * (10 ** j)
if N > 1 and num < 10 ** (N - 1):
    print(-1)
else:
    print(num)
x = map(int, input().split())
x.sort()



### FIXED CODE ###

x = list(map(int, input().split()))
x.sort()
print(" ".join(map(str, x)))
second = int(input(""))

if second >= 0 and second < 86400:
    h = second / 3600
    m = (second % 3600) / 60
    s = ((second % 3600) % 60) % 60

print("{0:d}:{1:d}:{2:d}".format(h, m, s))

### FIXED CODE ###

second = int(input(""))

if second >= 0 and second < 86400:
    h = int(second / 3600)
    m = int((second % 3600) / 60)
    s = int(((second % 3600) % 60) % 60)

print("{0}:{1}:{2}".format(h, m, s))
n,m=map(int,input().split())
a=[int(i) for i in input().split()]

c=[0,2,5,5,4,5,6,3,7,6]

dp=["" for i in range(n+10)]
for i in a:
    dp[c[i]]=str(i)

for i in range(n):
    for j in a:
        if dp[i]!="":
            dp[i+c[j]]=str(max(int(float(dp[i]+str(j))),int(float("0"+dp[i+c[j]]))))

print(int(dp[n]))







### FIXED CODE ###

n,m=map(int,input().split())
a=[int(i) for i in input().split()]
cost=[2,2,5,5,4,5,6,3,7,6]

dp=[0 for i in range(n+1)]

for i in range(1,n+1):
    p=0
    for j in a:
        if i-cost[j]>=0 and (dp[i-cost[j]]!=0 or i-cost[j]==0):
            p=max(p,int(dp[i-cost[j]]*10+j))
    dp[i]=p

print(dp[n])
A, B, C, D = map(int, input().split())
print("Balanced" if A+B == C+D else "Left" if 

### FIXED CODE ###

#coding: utf-8
A, B, C, D = map(int, input().split())
print("Balanced" if A+B == C+D else ["Left","Right"][A+B < C+D])
import heapq as hq

N,K=map(int,input().split())
V=list(map(int,input().split()))

ans=0
for i in range(1,min(N,K)+1): #取り出す個数
    for j in range(i+1):
        A=[]
        hq.heapify(A) #左から取り出す個数
        for k in range(j):
            hq.heappush(A,V[k])
        for k in range(i-j):
            hq.heappush(A,V[n-k-1])
        p=min(i,K-i) #しまえる個数
        while p>0:
            if A[0]<0:
                hq.heappop(A)
                p-=1
            else:
                break
        ans=max(sum(A),ans)
print(ans)

### FIXED CODE ###

import heapq as hq

N,K=map(int,input().split())
V=list(map(int,input().split()))

ans=0
for i in range(1,min(N,K)+1): #取り出す個数
    for j in range(i+1):
        A=[]
        hq.heapify(A) #左から取り出す個数
        for k in range(j):
            hq.heappush(A,V[k])
        for k in range(i-j):
            hq.heappush(A,V[N-k-1])
        p=min(i,K-i) #しまえる個数
        while p>0:
            if A[0]<0:
                hq.heappop(A)
                p-=1
            else:
                break
        ans=max(sum(A),ans)
print(ans)
a,b,c = map(int, input().split())

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

listA = [list(map(int, input().split())) for _ in range(a)]
t=0

for i in range(a):
    ans=0
    for i in range(b-1):
        s=listB[i]*listA[i]
        s=sum(s)
        ans= ans+s
    if ans+c>0:
        t+=1
print(t)

### FIXED CODE ###

import numpy as np

N,M,C=map(int, input().split())

b=list(map(int, input().split()))
b=np.array(b)
count=0
for _ in range(N):
    a=list(map(int, input().split()))
    a=np.array(a)
    e=a*b
    d=np.sum(e,axis=0)+C
    if d>0:
        count+=1
print(count)
S=input()
T=input()

ans=10000

for i inrange(len(S)-len(T)+1):
  score=0
  U=S[i:i+len(T)]#Sのi文字目から{i+len(T)}文字目までがU->部分文字列を抜き出している
  for j in range(len(T)):
    if U[j] != T[J]:
      score += 1
  ans = min(ans, score)

print(ans)  

### FIXED CODE ###

S=input()
T=input()

ans=10000

for i in range(len(S)-len(T)+1):
  score=0
  U=S[i:i+len(T)]#Sのi文字目から{i+len(T)}文字目までがU->部分文字列を抜き出している
  for j in range(len(T)):
    if U[j] != T[j]:
      score += 1
  ans = min(ans, score)

print(ans)
N = int(input())
ans N//3
print(ans)


### FIXED CODE ###

N = int(input())
ans = N//3
print(ans)
from collections import Counter

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

new = [key for key, val in Counter(a).most_common() if val == 1]
dp = [0] * 100010

for i in new:
    for j in range(0, 100000, i):
        dp[j] += 1

ans = 0
for i in new:
    if dp[i] == 1:
        ans += 1
print(ans)


### FIXED CODE ###

from collections import Counter

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

# new = [key for key, val in Counter(a).most_common() if val == 1]
prime = [1] * 1000010

for i in set(a):
    # if prime[i]:
    for j in range(i + i, 1000001, i):
        prime[j] = 0

c = Counter(a)
ans = 0
for i in a:
    if prime[i] and c[i] == 1:
        ans += 1
print(ans)
n = input()
if n%100 == n/100:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n = int(input())
if n%10 == (n-n%100)/100:
  print("Yes")
else:
  print("No")
N = input()
if N == "1":
    print(""Hello Wolrd")
elif N == "2":
    a = int(input())
    b =int(input())
    print(a+b)

### FIXED CODE ###

N = input()
if N == "1":
    print("Hello World")
elif N == "2":
    a = int(input())
    b =int(input())
    print(a+b)
import sys

A, B, C, X, Y = sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5]

strat1 = A*X + B*Y  # simple strategy
strat2 = 2*C*X + abs(Y-X)+B  # more A, add back B
strat3 = 2*C*Y + abs(X-Y)*A  # more B, add back A
strat4 = 2*C*max(X,Y) # overbuy C

print min(strat1, strat2, strat3, strat4)


### FIXED CODE ###

A, B, C, X, Y = map(int, raw_input().split())

strat1 = A*X + B*Y  # simple strategy
strat2 = 2*C*X + abs(Y-X)*B  # more A, add back B
strat3 = 2*C*Y + abs(X-Y)*A  # more B, add back A
strat4 = 2*C*max(X,Y) # overbuy C

print min(strat1, strat2, strat3, strat4)
W,H,x,y,r = [int(i) for i in input().split()]

if x + r <= W and y = r >= 0 and x - r >= 0 and y + r <= H:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

W, H, x, y, r = [int(i) for i in input().split()]

if x + r <= W and y + r >= 0 and x - r >= 0 and y + r <= H:
    print("Yes")
else:
    print("No")