Harryxun/stf_run huggingface dataset:
n=0
s=[]
ans=[]

def dfs(a,b,c,i,root):
    if i==n:
        global ans
        ans=root.copy()
        return True
    l=False
    r=False
    if s[i]=='AB':
        if a>0:
            root.append('B')
            l=dfs(a-1,b+1,c,i+1,root)
            root.pop()
        if not l and b>0:
            root.append('A')
            r=dfs(a+1,b-1,c,i+1,root)
            root.pop()
    elif s[i]=='AC':
        if a>0:
            root.append('C')
            l=dfs(a-1,b,c+1,i+1,root)
            root.pop()
        if not l and c>0:
            root.append('A')
            r=dfs(a+1,b,c-1,i+1,root)
            root.pop()
    else:
        if b>0:
            root.append('C')
            l=dfs(a,b-1,c+1,i+1,root)
            root.pop()
        if not l and c>0:
            root.append('B')
            r=dfs(a,b+1,c-1,i+1,root)
            root.pop()
    return l or r

n,a,b,c=map(int,input().split())
s=['']*n
for i in range(n):
    s[i]=input()
flag=dfs(a,b,c,0,[])

if flag:
    print("Yes")
    for t in ans:
        print(t)
else:
    print("No")

### FIXED CODE ###

n,a,b,c=map(int,input().split())
s=[]
for i in range(n):
    s.append(input())
s.append('EOF')

ans=[]
 
flag=True
 
for i in range(n):
    if s[i]=='AB':
        if a==0 and b==0:
            flag=False
            break
        if a==0 or (b!=0 and a==1 and s[i+1]=='AC'):
            ans.append('A')
            a+=1
            b-=1
        else:
            ans.append('B')
            a-=1
            b+=1
    elif s[i]=='AC':
        if a==0 and c==0:
            flag=False
            break
        if a==0 or (c!=0 and a==1 and s[i+1]=='AB'):
            ans.append('A')
            a+=1
            c-=1
        else:
            ans.append('C')
            a-=1
            c+=1
    else:
        if c==0 and b==0:
            flag=False
            break
        if c==0 or (b!=0 and c==1 and s[i+1]=='AC'):
            ans.append('C')
            c+=1
            b-=1
        else:
            ans.append('B')
            c-=1
            b+=1

if flag:
    print("Yes")
    for i in ans:
        print(i)
else:
    print("No")
li = stdin.readline().rstrip()
count = 0

for i in range(2):
    if li[i] == "1":
        count = count + 1

print(count)

### FIXED CODE ###

a = input()

count = 0

for i in range(3):
    temp = a[i]
    if temp == "1":
        count = count + 1

print(count)
# coding:utf-8

n,m=map(int,raw_input().split())

def kaijo(n):
    if n==1:
        return 1
    return n*kaijo(n-1)

# 引数として、nかmのうちの小さい方の数字を受け取る
def count(n,m):
    print kaijo(n)*kaijo(m)

if n-m==-1 or n-m==1:
    count=count(n,m)
elif n-m==0:
    count=count(n,m)
    count*=2
else:
    print "0"

### FIXED CODE ###

n,m=map(int,raw_input().split())

mod=10**9+7

def kaijo(n):
    result=1
    for i in range(2,n+1):
        result*=i
        if result>mod:
            result=result%mod
    return result
    
def count(n,m):
    return kaijo(n)*kaijo(m)

if n-m==-1 or n-m==1:
    result=count(n,m)
    amari=result%mod
    print amari
elif n-m==0:
    result=count(n,m)
    result*=2
    amari=result%mod
    print amari
else:
    print 0
a=input()+"o"
b=["A","T","C","G"]
ans=0
c=0
for i in range(len(a)):
  if a[i] in b
    c+=1
  else:
    if c>ans:
      ans=c
    c=0
print(ans)

### FIXED CODE ###

a=input()+"o"
b=["A","T","C","G"]
ans=0
c=0
for i in range(len(a)):
  if a[i] in b:
    c+=1
  else:
    if c>ans:
      ans=c
    c=0
print(ans)
import numpy as np
X, K, D = (list(map(int, input('').split(' '))))

sign = np.sign(X)*(-1)
if K%2 == 0:
    new_X = X
    for i in range(2*sign, (K+1)*sign, 2*sign):
        old_X = new_X
        new_X = i*D + X
        if np.abs(new_X) > np.abs(old_X):
            ans = np.abs(old_X)
            break
else:
    new_X = X
    for i in range(sign, (K+1)*sign, 2*sign):
        old_X = new_X
        new_X = i*D + X#2*sign*D
        if np.abs(new_X) > np.abs(old_X):
            ans = np.abs(old_X)
            break
            
try:
    print(ans)
except NameError:
    print(np.abs(new_X))

### FIXED CODE ###

import numpy as np
X, K, D = (list(map(int, input('').split(' '))))
X = np.abs(X)

if np.abs(X)/D <= K:
    new_K = K - int(X/D)
    new_X = X - D*int(X/D)
    if new_K%2==0:
        print(new_X)
    else:
        print(np.abs(new_X-D))
else:
    print(np.abs(X-D*K))
n = int(stdin.readline().rstrip()[-1])

if n == '3':
    print('bon')
elif n in ['0', '1', '6', '8']:
    print('pon')
else:
    print('hon')


### FIXED CODE ###

input = input()[-1]
if input == '3':
    print('bon')
elif input in ['0', '1', '6', '8']:
    print('pon')
else:
    print('hon')
def gcd3(x,y):
    if x>=y:
        if x%y==0:
            return y
        else:
            return gcd3(y,x%y)
    else:
        if y%x==0:
            return x
        else:
            return gcd3(x,y%x)
def gcd2(x4):
    if len(x4)>2:
        return gcd2([gcd3(x4[0],x4[1]),]+x4[2:])
    elif len(x4) ==2:
        return gcd3(x4[0],x4[1])
    else:
        return x4[0]
N, X = map(int,input().split())
x=[int(i) for i in input().split()]
x.append(X)
x3=[]
for i in range(len(x)-1):
    x3.append(abs(x[i+1]-x[i]))
print(gcd2(x3))


### FIXED CODE ###

def gcd3(x,y):
    if x>=y:
        if x%y==0:
            return y
        else:
            return gcd3(y,x%y)
    else:
        if y%x==0:
            return x
        else:
            return gcd3(x,y%x)
def gcd2(x4):
    if len(x4)>2:
        return gcd3(gcd2(x4[:len(x4)//2]),gcd2(x4[len(x4)//2:]))
    elif len(x4) ==2:
        return gcd3(x4[0],x4[1])
    else:
        return x4[0]
N, X = map(int,input().split())
x=[int(i) for i in input().split()]
x.append(X)
x3=[]
for i in range(len(x)-1):
    x3.append(abs(x[i+1]-x[i]))
print(gcd2(x3))
from math import gcd

n=int(input())

print(n*2//gcd(2,n))

### FIXED CODE ###

from fractions import gcd

n=int(input())

print(n*2//gcd(2,n))
b = input()

if b="A":
  print("T")
elif b="T":
  print("A")
elif b="C":
  print("G")
else:
  print("C")
  

### FIXED CODE ###

b = input()
 
if b =="A":
  print("T")
elif b=="T":
  print("A")
elif b=="C":
  print("G")
else:
  print("C")
r=int(input())
print(3(r**2))

### FIXED CODE ###

r=int(input())
print(3*(r**2))
import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def cut(A, k, size) -> bool:
    cnt = 0
    for a in A:
        cnt += a // size
        if a % size == 0:
            cnt -= 1
        if cnt > k:
            return False
    if cnt <= k:
        return True


def main():
    n, k = input_int_list()
    A = input_int_list()

    left = 0
    right = max(A)

    fail = 0
    success = right

    while True:
        mid = (left + right) // 2
        res = cut(A, k, mid)
        if res:
            right = mid - 1
            success = min(mid, success)
        else:
            left = mid + 1
            fail = max(mid, fail)
        if left == right:
            break
    print(success)
    return


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def cut(A, k, size) -> bool:
    cnt = 0
    for a in A:
        cnt += a // size
        if a % size == 0:
            cnt -= 1
        if cnt > k:
            return False
    if cnt <= k:
        return True


def main():
    n, k = input_int_list()
    A = input_int_list()

    left = 0
    right = max(A)

    while right > left + 1:
        mid = (left + right) // 2
        res = cut(A, k, mid)
        if res:
            right = mid
        else:
            left = mid
    print(right)
    return


if __name__ == "__main__":
    main()
def inpl(): return list(map(int, input().split()))

N, M = inpl()
A = inpl()
A.sort(reverse = True)

inf = float('inf')
match = (inf, 2, 5, 5, 4, 5, 6, 3, 7, 6)
matnum = set([match[a] for a in A])
dp = [0]+[-inf]*N

for i in range(1, N+1):
    dp[i] = max([10*dp[i-a] + a for a in A])

print(''.join(sorted(str(dp[-1]), reverse = True)))


### FIXED CODE ###

def inpl(): return list(map(int, input().split()))

N, M = inpl()
A = inpl()
A.sort(reverse = True)

inf = float('inf')
match = (inf, 2, 5, 5, 4, 5, 6, 3, 7, 6)
matnum = set([match[a] for a in A])
dp = [0]+[-inf]*N

for i in range(1, N+1):
    dp[i] = max([10*dp[max(-1,i-match[a])] + a for a in A])

print(''.join(sorted(str(dp[-1]), reverse = True)))
#coding:utf-8
import sys,os
from collections import defaultdict, deque
from fractions import gcd
from math import ceil, floor
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

    N = II()
    def divisors(x):
        r1 = deque()
        r2 = deque()
        for i in range(1,int(x**0.5)):
            if x % i == 0:
                r1.append(i)
                r2.appendleft(x//i)
        if int(x**0.5) == x**0.5:
            r1.append(int(x**0.5))
        return list(r1+r2)
    #N-1の約数
    ans = len(divisors(N-1))-1
    

    for d in divisors(N)[1:]:
        tmpN = N
        while tmpN % d == 0:
            tmpN //= d
        if tmpN % d == 1:
            ans += 1

            
            
    print(ans)


    

if __name__ == '__main__':
    main()

### FIXED CODE ###

#coding:utf-8
import sys,os
from collections import defaultdict, deque
from fractions import gcd
from math import ceil, floor
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

    N = II()
    def divisors(x):
        r1 = deque()
        r2 = deque()
        for i in range(1,ceil(x**0.5)):
            if x % i == 0:
                r1.append(i)
                r2.appendleft(x//i)
        if int(x**0.5) == x**0.5:
            r1.append(int(x**0.5))
        return list(r1)+list(r2)
    #N-1の約数
    ans = len(divisors(N-1))-1
    # print(ans)
    # print(divisors(N))
    for d in divisors(N)[1:]:
        tmpN = N
        while tmpN % d == 0:
            tmpN //= d
        if tmpN % d == 1:
            ans += 1

            
            
    print(ans)


    

if __name__ == '__main__':
    main()
form collections import Counter
s = input().Counter().most_common(1)[0][1]
if s <= 3:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s = input()
ans = "No"
for i in range(2):
  if s[i] == s[i+1] == s[i+2]:
    ans = "Yes"
    break
print(ans)
n, q = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(n-1)]
px = [list(map(int, input().split())) for i in range(q)]

cnt = [0] * n
tree = {}
subt = {}
for i in range(n-1):
    tree.setdefault(ab[i][0], [])
    tree[ab[i][0]].append(ab[i][1])

def pt(node, subt):
    if not node in subt:
        part = []
        if node in tree:
            for i in range(len(tree[node])):
                part += pt(tree[node][i], subt)
        subt.setdefault(node, [node]+part)
    return subt[node]
pt(1,subt)

for i in range(q):
    for j in subt[px[i][0]]:
        cnt[j-1] += px[i][1]
print(" ".join(map(str, cnt)))

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(300000)

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

root = [[] for _ in range(n+1)]
for i in range(n-1):
    a, b = map(int, input().split())
    root[a].append(b)
    root[b].append(a)
    
cnt = [0 for _ in range(n+1)]
for i in range(q):
    p, x = map(int, input().split())
    cnt[p] += x

def rec(node, parent):
    for i in root[node]:
        if i == parent:
            continue
        cnt[i] += cnt[node]
        rec(i, node)

rec(1, 1)
print(" ".join(map(str, cnt[1:])))
import numpy as np

N, W = map(int, input().split())

dp = np.full(N*10**3+1, W+1, dtype=int)

for i in range(N):
    w, v = map(int, input().split())
    dp[w:] = np.minimum(dp[:-v] + w, dp[v:])

print(np.max(np.where(dp <= W)))

### FIXED CODE ###

import numpy as np

N, W = map(int, input().split())

dp = [float("INF")]*(N*10**3 + 1)
dp = np.array(dp)
dp[0] = 0

for i in range(N):
    w, v = map(int, input().split())
    dp[v:] = np.minimum(dp[:-v] + w, dp[v:])

print(np.max(np.where(dp <= W)))
def main():
    L, R = map(int, input().split())

    ans = L * R % 2019
    if R - L >= 2019
        ans = 0
    else:
        l = L % 2019
        r = R % 2019
        if l == r:
            ans = 2*l
        else:
            ans = min(l*(l+1), l*r)

    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    L, R = map(int, input().split())

    ans = L * R % 2019
    if R - L >= 2019:
        ans = 0
    else:
        for i in range(L, R+1):
            for j in range(i+1, R+1):
                ans = min(ans, i*j % 2019)
    print(ans)


if __name__ == '__main__':
    main()
a = list(map(int, input().split()))
print(int(a[0]*(a[1]*100)/100))

### FIXED CODE ###

from decimal import Decimal

a,b = map(Decimal, input().split())
ans = a*b
print(int(ans))
N, Ma, Mb= (int(i) for i in input().split())
L = []
for i in range(N):
    a, b, c = (int(i) for i in input().split())
    L.append((a-1, b-1, c))

dp= [[[float("inf") for b in range(10 * N + 1)] for a in range(10 * N + 1) ] for i in range(N + 1)]
dp[0][0][0] = 0

for i in range(N):
    a, b, c = L[i]
    for ca in range(10 * N + 1):
        for cb in range(10 * N + 1):
            dp[i+1][ca][cb] = min(dp[i+1][ca][cb], dp[i][ca][cb])
            dp[i+1][ca + a][cb + b] = min(dp[i+1][ca + a][cb + b], dp[i][ca][cb] + c)

reslis = []
ra, rb = (Ma, Mb)
while ra <= 10 * N and rb <= 10 * N:
    reslis.append(dp[N][ra][rb])
    ra += Ma
    rb += Mb

reslis.sort()
res = reslis[0]
if res == float("inf"):
    print(-1)
else:
    print(res)

### FIXED CODE ###

N, Ma, Mb= (int(i) for i in input().split())
L = []
for i in range(N):
    a, b, c = (int(i) for i in input().split())
    L.append((a, b, c))

dp= [[[float("inf")] * (10 * N + 11) for a in range(10 * N + 11) ] for i in range(N + 1)]
dp[0][0][0] = 0

for i in range(N):
    a, b, c = L[i]
    for ca in range(10 * N + 1):
        for cb in range(10 * N + 1):
            dp[i+1][ca][cb] = min(dp[i+1][ca][cb], dp[i][ca][cb])
            dp[i+1][ca + a][cb + b] = min(dp[i+1][ca + a][cb + b], dp[i][ca][cb] + c)

reslis = []
ra, rb = (Ma, Mb)
while ra <= 10 * N and rb <= 10 * N:
    reslis.append(dp[N][ra][rb])
    ra += Ma
    rb += Mb

reslis.sort()
res = reslis[0]
if res == float("inf"):
    print(-1)
else:
    print(res)
s,t = input().split()
a,b = map(int,input().split())
u = input()

if s == u:
    a = a - 1
else:
    b = b - 1

print(a + ' ' + b)

### FIXED CODE ###

s,t = input().split()
a,b = map(int,input().split())
u = input()

if s == u:
    a = a - 1
else:
    b = b - 1

print(str(a) + ' ' + str(b))
n, k = map(int, input())
candidOdd = 0
candidEven = 0
candidEven2 = 0
for i in range(1, n+1):
    if k % 2 == 1:
        if i % k == 0:
            candidOdd += 1
    else:
        if i % k == 0:
            candidEven += 1
        elif i % k == (k/2):
            candidEven2 += 1
print(candidOdd**3 + candidEven**3 + candidEven2**3)

### FIXED CODE ###

n, k = map(int, input().split())
candidOdd = 0
candidEven = 0
candidEven2 = 0
for i in range(1, n+1):
    if k % 2 == 1:
        if i % k == 0:
            candidOdd += 1
    else:
        if i % k == 0:
            candidEven += 1
        elif i % k == (k/2):
            candidEven2 += 1
print(candidOdd**3 + candidEven**3 + candidEven2**3)
import math
n, m, r = map(int, input().split())
a = r - n * m
if a < 0:
    print(0)
else:
    b = 1
    if n - 1 > a:
        for i in range(a):
            b *= a + n - 1 - i
        for i in range(1, a + 1):
            b = int(b / i)
    else:
        for i in range(n - 1):
            b *= a + n - 1 - i
        for i in range(1, n):
            b = int(b / i)
    print(int(b))


### FIXED CODE ###

import math
n, m, r = map(int, input().split())
a = r - n * m
def combination(p, q):
    if q < 0 or p < q:
        return 0
    return math.factorial(p) // math.factorial(q) // math.factorial(p - q)
if a < 0:
    print(0)
else:
    print(int(combination(a + n - 1, a)))
# -*- coding: utf-8 -*-

import sys
input = sys.stdin.readline

def io_generator():
	return input()

#+++++++++++++++++++

def main(io):
	a,b = map(int, io().split())
	if a==b:
		ret==2*a
	else:
		c=max(a,b)
		ret=2*c-1

	return ret

#++++++++++++++++++++

if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

### FIXED CODE ###

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

import sys
input = sys.stdin.readline

def io_generator():
	return input()

#+++++++++++++++++++

def main(io):
	a,b = map(int, io().split())
	if a==b:
		ret=2*a
	else:
		c=max(a,b)
		ret=2*c-1

	return ret

#++++++++++++++++++++

if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))
n,m = map(int,(input().spit()))
L = []
R = []

for i in range(m):
	l,r = map(int(input().spit()))
	L.append(l)
	R.append(r)

ans = min(R) - max(L) + 1

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

### FIXED CODE ###

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

p=[]
q=[]

for i in range(m):
    l,r=map(int,input().split())
    p.append(l)
    q.append(r)

p1=max(p)
q1=min(q)

if q1>=p1:
    print(q1-p1+1)
else:
    print(0)
def main():
    import fractions
    import sys
    input = sys.stdin.readline
    N = int(input())
    a = tuple(map(int,input().split()))
    g = a[0]
    MOD = 10**9+7
    for i in range(1,N):
        t = a[i]
        #g = g*a[i]//fractions.gcd(g,a[i])
        g = divmod(g*t,fractions.gcd(g,t))[0]
    assert()
    res = 0
    for i in range(N):
        res += divmod(g,a[i])[1]
        res += (g//a[i])%MOD
    print(res%MOD)
if __name__ == '__main__':
    main()


### FIXED CODE ###

import fractions
import sys
input = sys.stdin.readline
N = int(input())
a = list(map(int,input().split()))
g = 1
res = 0
MOD = 10**9+7
for elem in a:
    tmp = g*elem//fractions.gcd(g,elem)
    res *= tmp//g
    g = tmp
    res += g//elem
print(res%MOD)
#def poll_height(n):
#    if n:
#        return n + poll_height(n - 1)
#    else:
#        return 1 

def poll_height(n):
    rtn = 0 
    for i in range(n + 1): 
        rtn += i
    return rtn 

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

difference_a_b = b - a 
print(poll_height(difference_a_b) - b)

### FIXED CODE ###

# -*- coding: utf-8 -*-
def margin0(n):
    if n < 10:
        return "00{}".format(n)
    elif n < 100:
        return "0{}".format(n)
    elif n < 1000:
        return "".format(n%1000)
    else:
        return "{}".format(n%1000 - 1)
n = int(input())
# print(n)
name = ""
if n < 1000:
    name = "ABC{}".format(margin0(n))
else:
    name = "ABD{}".format(margin0(n))
print(name[:3])
for i in range(x):
    for i in range(y):
        print("#", end="")
        print()


### FIXED CODE ###

import sys
import os
 
 
for line in sys.stdin:
    H, W = map(int, line.split())
    if H == 0 and W == 0:
        break
    print(('#' * W + '\n') * H)
N,K=[int(x) for x in input().split()]
S=input()
print(S[:K]+S[K].lower()+S[min(K+1,N-1)]:)

### FIXED CODE ###

N,K=[int(x) for x in input().split()]
S=input()
print(S[:K-1]+S[K-1].lower()+S[K:])
n = int(input())
num_of_double = 0

for i in range(n):
    d1 = int(input())
    d2 = int(input())

    if d1 == d2:
        num_of_double += 1

if num_of_double >= 3:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n = int(input())
count = 0
flag = 0

for i in range(n):
    d1, d2 = map(int,input().split())

    if d1 == d2 :
        count += 1
    else:
        count = 0

    if count == 3:
        flag = 1


if flag == 1:
    print("Yes")
else:
    print("No")
n = int(input())
s = [input() for _ in range(n)]
m = int(input())
t = [input() for i in range(m)]

l = []
for i in range(n):
  S = s.count(s[i])
  T = t.count(t[i])
  l.append(S - T)
  
if max(l) < 0:
  print("0")
else:
  print(max(l))


### FIXED CODE ###

n = int(input())
s = [input() for _ in range(n)]
m = int(input())
t = [input() for _ in range(m)]

l = []
for i in range(n):
  S = s.count(s[i])
  T = t.count(s[i])
  l.append(S - T)
  
if max(l) < 0:
  print(0)
else:
  print(max(l))
zn = int(input())
a = list(map(int, input().split()))
ans = [0] * n
m = 0
res = []
# 1 idx
for i in range(n, 0, -1):
    # i の倍数でbit立っているものの個数を数える
    cnt = 0
    idx = 2
    while i * idx <= n:
        if ans[i * idx - 1]:
            cnt += 1
        idx += 1
    debug = cnt
    if cnt % 2 != a[i - 1]:
        ans[i - 1] = 1
        m += 1
        res.append(i)
print(m)
if m:
    print(*res)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
m = 0
res = []
# 1 idx
for i in range(n, 0, -1):
    # i の倍数でbit立っているものの個数を数える
    cnt = 0
    idx = 2
    while i * idx <= n:
        if ans[i * idx - 1]:
            cnt += 1
        idx += 1
    debug = cnt
    if cnt % 2 != a[i - 1]:
        ans[i - 1] = 1
        m += 1
        res.append(i)
print(m)
if m:
    print(*res)
S = input()
T = input()
 
count = 0
for i in S:
  if S[i] != T[i]:
    count +=1
 
print(count)

### FIXED CODE ###

S = input()
T = input()
count = 0
j =0
for i in S:
  if i != T[j]:
    count +=1
  j+=1

print(count)
import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

def Binary_Search(N, K, A):
	#初期化
	left = 0
	right = 10 ** 9
	ans = INF
	
	while left <= right:
		mid = (left + right) // 2
		val = 0
		for i in range(N):
			val += int((A[i] - 1) // mid)
		if val <= K:
			ans = min(ans, mid)
			right = mid - 1
		else:
			left = mid + 1

	return ans

#処理内容
def main():
	N, K = getlist()
	A = getlist()
	ans = Binary_Search(N, K, A)
	print(ans)

if __name__ == '__main__':
	main()

### FIXED CODE ###

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

def Binary_Search(N, K, A):
	#初期化
	left = 0
	right = 10 ** 9
	ans = INF
	
	while left <= right:
		mid = (left + right) // 2
		val = 0
		if mid == 0:
			return 1
		for i in range(N):
			val += int((A[i] - 1) // mid)
		if val <= K:
			ans = min(ans, mid)
			right = mid - 1
		else:
			left = mid + 1

	return ans

#処理内容
def main():
	N, K = getlist()
	A = getlist()
	ans = Binary_Search(N, K, A)
	print(ans)

if __name__ == '__main__':
	main()
n,k=map(int,input().split())
haveSnack = [False]*n
for _ in range(k):
  d = int(input(d))
  for __ in range(d):
    s = [int(i) for i in input().split()]
    for sk in s:
      if not haveSnack[sk-1]:
        haveSnack[sk-1] = True
res=0
for i in range(n):
  if not haveSnack[i]:
    res+=1
print(res)

### FIXED CODE ###

n,k = map(int, input().split())
hs = [False]*n
for _ in range(k):
  d = int(input())
  s = [int(i) for i in input().split()]
  for p in s:
    if not hs[p-1]:
      hs[p-1]=True
res=0
for i in range(n):
  if not hs[i]:
    res+=1
print(res)
A = int(input())
B = list(map(int, input().split()))

for i in range(1,A-1):
  if B[i-1] > B[i] > B[i+1]:
    s += 1
  elif B[i-1] < B[i] < B[i+1]:
    s += 1
    
print(s)

    

### FIXED CODE ###

A = int(input())
B = list(map(int, input().split()))
ans = 0

for i in range(1, A-1):
  if B[i-1] > B[i] > B[i+1]:
    ans += 1
  elif B[i-1] < B[i] < B[i+1]:
    ans += 1
    
print(ans)
N,R = map(int, input().split())
if N >9:
    print(R)
else:
    print(R+100*(10-K))

### FIXED CODE ###

N,R = map(int, input().split())
if N > 9:
    print(R)
else:
    print(R+100*(10-N))