Harryxun/stf_run huggingface dataset:
a,b,c = map(int, raw_input())

s = 3*c

print a,b,s-a-b
print s-(c+s-(s-a-b+s-a-c)),c,s-(s-a-b+s-a-c)
print a+b-c,s-b-c,s-a-c

### FIXED CODE ###

a = int(raw_input())
b = int(raw_input())
c = int(raw_input())

s = 3*c

print a,b,s-a-b
print s-(c+s-(s-a-b+s-a-c)),c,s-(s-a-b+s-a-c)
print a+b-c,s-b-c,s-a-c
n, m = map(int, input().split())
sum = 0
a = np.array(list(map(int, input().split())))
for i in range(m):
    np.sort(a)[::-1]
    a[0] /= 2
b = np.array([abc // 1 for abc in a])
print(sum)

### FIXED CODE ###

import heapq
n, m = map(int, input().split())
a = list(map(lambda x: int(x) * (-1), input().split()))
heapq.heapify(a)
for _ in range(m):
    tmp_min = heapq.heappop(a)
    heapq.heappush(a, (-1)*(-tmp_min//2))
print(-sum(a))
import pandas as pd
a, b = map(int, input().split() )
c = a * b
if c % 2 == 0:
  print('Even')
else:
  print('Odd')


### FIXED CODE ###

a, b = map(int, input().split())
c = a * b
if c % 2 == 1:
  print('Odd')
else:
  print('Even')
import math

while True:
    try:

        g = 9.8 
        l = 4.9 

        v = float(raw_input())
        t = v/g 
                                                                                                                                                                                                             
        y = l*t*t

        n = y/5 + 1 


        print int(math.ceil(n))

    except EOFError:
        break
~                                                                                                                                                                                                            
~                                                                                                                                                                                                            
~                                                                                                                                                                                                            
~                                                

### FIXED CODE ###

while True:                                                                                                                                                                                                  
    try:
        g = 9.8
        l = 4.9
        v = float(raw_input())
        t = v/g
        y = l*(t)**2
        n = y/5 + 2

        print int(n)

    except EOFError:  break
a, b = map(int,raw_input().split())

if a > b:
 print("a > b")
elif a < b:
 print("a < b")
elif a == b:
 print("a == b")
else:
 print("none")

### FIXED CODE ###

a, b = map(int, input().split())
if a < b:
    print('a < b')
elif a > b:
    print('a > b')
else:
    print('a == b')
import math
def find(a):
    ans = a[0]
    for i in range(1,len(a)):
        ans = (ans*a[i])//(math.gcd(ans,a[i]))
    return ans



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

lcm = find(a)
ans = 0
mod = pow(10,9)+7
for i in a:
        ans = (ans + (lcm//i)%mod)%mod

print(ans)


### FIXED CODE ###

from fractions import gcd
def find(a):
    ans = a[0]
    for i in range(1,len(a)):
        ans = ((ans)//(gcd(ans,a[i])) * a[i])
    return ans            
	


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

lcm = find(a)
ans = 0
mod = pow(10,9)+7
for i in a:
	ans = ans + lcm//i
	
print(ans%mod)
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(N, inputs):
    ball_str = list(map(lambda i: string_to_int(i), inputs))
    balls = list(map(lambda b: [b[0], b[1], -1], ball_str))

    red = balls[:N]
    blue = balls[N:]

    red.sort(key=lambda x: x[0], reverse=True)
    blue.sort(key=lambda x: x[0], reverse=True)

    count = 0
    for i, r in enumerate(red):
        for j, b in enumerate(blue):
            if r[0] < b[0] and r[1] < b[1] and b[2] == -1:
                count += 1
                r[2] = j
                b[2] = i
                break
    return count


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    [N] = string_to_int(inputs())
    ret = solve(N, inputs(N))
    print(ret)


### FIXED CODE ###

import sys
from functools import reduce
import copy
import math
from pprint import pprint


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    int_inputs = list(map(string_to_int, inputs))
    N = len(inputs) // 2
    reds = int_inputs[:N]
    blues = int_inputs[N:]

    reds.sort(key=lambda x: x[0])
    blues.sort(key=lambda x: x[0])

    count = 0
    for bi in range(N):
        candidates = []
        for ri in range(len(reds)):
            if blues[bi][0] > reds[ri][0] and blues[bi][1] > reds[ri][1]:
                candidates.append([ri, reds[ri][0], reds[ri][1]])
        if len(candidates) > 0:
            candidates.sort(key=lambda x: x[2])

            reds.pop(candidates[-1][0])
            count += 1

    return count


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    N = int(input())
    ret = solve(inputs(N*2))
    print(ret)
data = [
    "{0} {1}".format(s,r)
    for s in ('S', 'H', 'C', 'D')
    for r in range(1, 13, + 1)
    ]

count = int(input())
for c in range()
    card = input()
    data.remove(card)

print("\n".join(data))

### FIXED CODE ###

cards = {
        'S': [0 for _ in range(13)],
        'H': [0 for _ in range(13)],
        'C': [0 for _ in range(13)],
        'D': [0 for _ in range(13)],
}
n = int(input())
for _ in range(n):
    (s, r) = input().split()
    cards[s][int(r) - 1] = 1
 
for s in ('S', 'H', 'C', 'D'):
    for r in range(13):
        if cards[s][r] == 0:
            print(s, r + 1)
L, R, d = map(int, input().split(" "))

tmp = (R-L+1)/d
if tmp < 1 :
    if (d >= L) & (d <= R):
        count1 = 1
else:
    count1 = tmp

print(int(count1))


### FIXED CODE ###

L, R, d = map(int, input().split(" "))

a = R // d
b = (L-1) // d
print(a-b)
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    print("YES" if (x1 - x2) / (y1 - y2) == (x3 - x4) / (y3 - y4) else "NO")

### FIXED CODE ###

n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    print("YES" if abs((x2 - x1) * (y4 - y3) - (x4 - x3) * (y2 - y1))
          < 1e-10 else 'NO')
s = input()
t = input()

dict_st = {}
dict_st = {}

for x, y in zip(s, t):
    if x not in dict_st:
        dict_st[x] = y 
    else:
        if dict_st[x] != y:
            print("No")
            break

    if y not in dict_ts:
        dict_ts[y]=x
    else:
        if dict_ts[y]!=x:
            print("No")
            break
else:
    print("Yes")

### FIXED CODE ###

import collections
s = input()
t = input()
s = collections.Counter(s)
t = collections.Counter(t)
if sorted(s.values()) == sorted(t.values()):
  print("Yes")
else:
  print("No")
s = input()
K = int(input())

L = []
L.append(s)

for i in range(len(s),0,-1):
    for j in range(len(s)):
        if i + j >= len(s):
            break
        L.append(s[j:i+j])
    L = sorted(set(L))
#    if len(L) >= K:
print(L[K-1])


### FIXED CODE ###

s = input()
K = int(input())

L = []
for i in range(len(s)):
    for j in range(1,K+1):
        L.append(s[i:i+j])
print(sorted(set(L))[K-1])
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,k = inpl()
a = inpl()
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

pr = make_divisors(sum(a))
pr = sorted(list(set(pr)), reverse = True)
def sol(p):
    mo = []
    pl = []
    for i in a:
        if i%p != 0:
            mo += [i%p]
            pl += [p-i%p]
    mo.sort(); pl.sort()
    m = 0; c = sum(pl)
    ln = len(mo)
    for i in range(ln):
        m += mo[i]
        c -= pl[ln-i-1]
        if max(m,c) <= k and m == c:
            return True
    return False
for p in pr:
    if sol(p):
        res = p
        break
print(res)



### FIXED CODE ###

from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,k = inpl()
a = inpl()
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort(reverse = True)
    return divisors
pr = make_divisors(sum(a))
def sol(p):
    mo = []
    pl = []
    for i in a:
        if i%p != 0:
            mo += [i%p]
            pl += [p-i%p]
    mo.sort(); pl.sort()
    m = 0; c = sum(pl)
    ln = len(mo)
    for i in range(ln):
        m += mo[i]
        c -= pl[ln-i-1]
        if max(m,c) <= k and m == c:
            return True
    return False
for p in pr:
    if sol(p):
        res = p
        break
else:
    res = 1
print(res)
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
n=int(input())

a=n//10000
b=(n-10000*a)//1000
c=(n-10000*a-1000*b)//100
d=(n-10000*a-1000*b-100*c)//10
e=(n-10000*a-1000*b-100*c-10*d)

if a=0:
	if b=0:
		if c=0:
			if d=0:
				print(n)
			else:
				print(9)
		else:
		 print(n-90)
	else:
		print(909)
else:
	print(n-9090)
	
print(90909)		

### FIXED CODE ###


    
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
n=int(input())

a=n//10000
b=(n-10000*a)//1000
c=(n-10000*a-1000*b)//100
d=(n-10000*a-1000*b-100*c)//10
e=(n-10000*a-1000*b-100*c-10*d)


if n==100000:
	print(90909)

elif a==0:
	if b==0:
		if c==0:
			if d==0:
				print(n)
			else:
				print(9)
		else:
		  print(n-90)
	else:
		print(909)
else:
	print(n-9090)
a,b=int(input())
print(a/b)

### FIXED CODE ###

a,b = map(int ,input().split())
print(a/b)
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7


a,b,h=MI()
ans=(a+b)*h//2
print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7


a=I()
b=I()
h=I()
ans=(a+b)*h//2
print(ans)
whit True:
  i = raw_input()
  print int(i) ** 3

### FIXED CODE ###

i = int(input())
print i * i * i
n,k=map(int, input().split())
h=list(map(int,input().split()))
H=sorted(h,reverse=True)
for i in range(k):
	H[i]=0
print(sum(H))

### FIXED CODE ###

n,k=map(int, input().split())
h=list(map(int,input().split()))
H=sorted(h,reverse=True)
if n>=k:
	for i in range(k):
		H[i]=0
	print(sum(H))
else: 
	print(0)
from sys import stdout, stderr
def fprintf(fs, s, *argv):
    fs.write(s.format(*argv))

def printf(s, *argv):
    fprintf(stdout, s, *argv)

from math import *

def gets(type=int, sep=' '):
    return map(type, input().split(sep))

def _lcm(a,b):
    return a // gcd(a,b) * b

def num2(a):
    cnt = 0
    while(a % 2 == 0):
        cnt += 1
        a /= 2
    return cnt

def main():
    n,m = gets()
    a = gets()
    lcm = 1
    cnt2 = -1
    for ai in a:
        lcm = _lcm(lcm,ai)
        n2 = num2(ai)
        if (cnt2 != -1 and cnt2 != n2):
            printf('0\n');
            return
        cnt2 = n2

    fprintf(stderr, 'lcm: {}\n', lcm)

    lo, hi = -1, m+1
    while (lo+1 < hi):
        mid = (lo+hi)//2
        if ((mid*2+1) * lcm//2 <= m):
            lo = mid
        else:
            hi = mid

    printf('{}\n', hi)

main()


### FIXED CODE ###

from math import *
from fractions import *
from sys import stdout, stderr, version_info
def fprintf(fs, s, *argv):
    fs.write(s.format(*argv))

def printf(s, *argv):
    fprintf(stdout, s, *argv)

if version_info[0] == 2:
    input = raw_input

def gets(type=int, sep=' '):
    return map(type, input().split(sep))

def _lcm(a,b):
    return a // gcd(a,b) * b

def num2(a):
    cnt = 0
    while(a % 2 == 0):
        cnt += 1
        a /= 2
    return cnt

def main():
    n,m = gets()
    a = gets()
    lcm = 1
    cnt2 = -1
    for ai in a:
        lcm = _lcm(lcm,ai)
        n2 = num2(ai)
        if (cnt2 != -1 and cnt2 != n2):
            printf('0\n');
            return
        cnt2 = n2

    fprintf(stderr, 'lcm: {}\n', lcm)

    lo, hi = -1, m+1
    while (lo+1 < hi):
        mid = (lo+hi)//2
        if ((mid*2+1) * lcm//2 <= m):
            lo = mid
        else:
            hi = mid

    printf('{}\n', hi)

main()
n=int(input())
a=input()

for A in a:
    while int(A)%2==0:
        print(A)
        if int(A)%2==1:
            break

### FIXED CODE ###

ans=10**9
n=int(input())
a=list(map(int,input().split()))

for A in a:
    cnt=0
    while A % 2==0: 
        A//=2
        cnt+=1
      
    if cnt<ans:
        ans=cnt
print(ans)
A=input()
if A="a":
  print("vowel")
if A="i":
  print("vowel")
if A="u":
  print("vowel")
if A="e":
  print("vowel")
if A="o":
  print("vowel")
else:
  print("consonant")

### FIXED CODE ###

a=input()
if a=="a":
  print("vowel")
else:
  if a=="i":
    print("vowel")
  else:
    if a=="u":
      print("vowel")
    else:
      if a=="e":
        print("vowel")
      else:
        if a=="o":
          print("vowel")
        else:
          print("consonant")
a = int(input())
b = int(input())
 
c = a * b
 
if c % 2 == 0:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

a, b = map(int, input().split())
 
if a * b % 2 == 0:
  print("Even")
else:
  print("Odd")
N = input()
if N%2 = 0:
    print(N/2-1)
else:
    print((N-1)/2)
   

### FIXED CODE ###

N = int(input())
if N%2 == 0:
    print(int(N/2-1))
else:
    print(int((N-1)/2))
import numpy as np
import itertools as ittr

def test_switch(e_balls, sw, p):
    for i, e_ball in enumerate(e_balls):
        si = sw[e_ball - 1]
        
        if p[i] != (np.sum(si == 1) % 2):
            return False
    
    return True

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

e_balls = []

for m in range(M):
    i = input().split()
    s = [int(si) for si in i[1:]]
    e_balls.append(np.asarray(s))

p = [int(pi) for pi in input().split()]

cnt = 0

for sw in ittr.product([0, 1], repeat = N):
    if test_switch(e_balls, np.array(sw), p):
        cnt += 1

print(cnt)

### FIXED CODE ###

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

print((3 * A + P) // 2)
# -*- coding:utf-8 -*-

def solve():
    N, A = list(map(int, input().split()))
    X = list(map(int, input().split()))

    # dp[i][j] := 左からi+1枚目までにj枚を選んで、選んだカードの総和がkになるカードの選び方
    dp = [[[0 for _ in range(N+1)] for __ in range(N+1)] for ___ in range(50*51+1)]
    dp[0][0][0] = 1  # 何も選んでない初期値
    for i in range(0, N):
        for j in range(0, N):
            for k in range(50*50+1):
                if dp[i][j][k] != 0:
                    dp[i+1][j][k] += dp[i][j][k]  # i枚目を選ばない
                    dp[i+1][j+1][k] += dp[i][j][k-X[i]]  # i枚目を選んだ

    ans = 0
    for j in range(1, N+1):  # 1枚以上選ぶ必要がある
        ans += dp[N][j][j*A]
    print(ans)


if __name__ == "__main__":
    solve()


### FIXED CODE ###

# -*- coding:utf-8 -*-
"""解説
dp[j][k][s] := x1,...,xjから k枚選んで xiの合計をsにするような選び方の総数

[@lilium氏]
https://atcoder.jp/contests/abc044/submissions/5887235
"""

def solve():
    N, A = list(map(int, input().split()))
    X = list(map(int, input().split()))

    max_x = max(X)
    dp = [[[0 for _ in range(4000+1)] for __ in range(N+1)] for ___ in range(N+1)]

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

    # dp[i][j][k] := i枚のうちj枚を選んで、和がkになる組み合わせ
    for i in range(N):
        for j in range(N):
            for k in range(4000+1):
                if dp[i][j][k] != 0:
                    dp[i+1][j][k] += dp[i][j][k]  # i枚目を選ばなかった
                    dp[i+1][j+1][k+X[i]] += dp[i][j][k]  # i枚目を選んだ

    ans = 0
    for j in range(1, N+1):
        ans += dp[N][j][j*A]
    print(ans)

if __name__ == "__main__":
    solve()
def main():
    rt = 0
    Q,H,S,D = map(int,input())
    N = float(input())
    count_1 = N//2
    count_2 = (N-count_1)//1
    count_3 = (N-count_1-count_2)*100//50
    count_4 = (((N-count_1-count_2)*100)-50*count_3)//25
    if count_1:
       rt+=count_1*min(2*S,D,4*H,8*Q)
    if count_2:
        rt+=count_2*min(S,2*H,4*Q)
    if count_3:
        rt+=min(2*H,Q)*count_3
    if count_4:
        rt+=Q*count_4
    print(rt)

if __name__=="__main__":
    main()

### FIXED CODE ###

def main():
    rt = 0
    Q,H,S,D = map(int,input().split(" "))
    N = float(input())
    count_1 = N//2
    count_2 = (N-count_1*2)//1
    count_3 = (N-count_1*2-count_2)*100//50
    count_4 = (((N-count_1*2-count_2)*100)-50*count_3)//25
    if count_1:
        rt+=int(count_1)*min(2*S,D,4*H,8*Q)
    if count_2:
        rt+=int(count_2)*min(S,2*H,4*Q)
    if count_3:
        rt+=min(H,2*Q)*int(count_3)
    if count_4:
        rt+=Q*int(count_4)
    print(int(rt))

if __name__=="__main__":
    main()
n=int(input())
if n<10:
  print(n)
elif n<100:
  print(9)
elif n<1000:
  print(9+(n-99))
elif n<10000:
  print(909)
elif n<100000:
  print(909+(n-9999))
else:
  print(90909)

### FIXED CODE ###

a, b, c=map(int,input().split())
d=c-(a-b)
if d>0:
  print(d)
else:
  print(0)
a,b = map(int, input().split(" "))
if a => 13 :
  print(b)
elif 6 <= a => 12 :
  print(b/2)
else:
  print(0)

### FIXED CODE ###

a,b = map(int, input().split(" "))
if a >= 13 :
  print(b)
elif a >= 6 :
  print(b//2)
else:
  print(0)
from functools import*
@lru_cache(None)
def s(a,d):
  n=len(a)
  if n==1:return a[0]*d
  return min(s(a[:i],d+1)+s(a[i:],d+1)for i in range(1,n))
n,*a=map(int,open(0).read().split())
print(s(tuple(a),0))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
def main():
  def s(l,r):
    k=l*n+r
    if d[k]:return d[k]
    if r-l<2:return 0
    d[k]=t=min(s(l,i)+s(i,r)for i in range(l+1,r))+a[r-1]-a[l-1]
    return t
  n,*a=map(int,open(0).read().split())
  d=[None]*(n*n+1)
  for i in range(n-1):a[i+1]+=a[i]
  a+=[0]
  print(s(0,n))
main()
n = int(input())
import math

nn = math.factorial(n)

if n ==1:
    print(1)

elif n ==2:
    print(2)
else:
    sosu =[2]  
   
    for i in range(3,n+1,2):
        judge = 0
        for j in range(2,i):
            if i % j == 0:
                judge = 1
        if judge ==0:
            sosu.append(i)
    
    slist =[0]*len(sosu)
    for k in range(0,len(sosu)):
        m = nn
        count = 0
        while m % sosu[k] ==0:
            m = m //sosu[k]
            count +=1
        slist[k] = count
    
    res = 1
    for l in range(0,len(slist)):
        res =res*(slist[l]+1) % 1000000007

print(res)

### FIXED CODE ###

n = int(input())
import math

nn = math.factorial(n)

if n ==1:
    print(1)
    
elif n ==2:
    print(2)
else:
    sosu =[2]  
   
    for i in range(3,n+1,2):
        judge = 0
        for j in range(2,i):
            if i % j == 0:
                judge = 1
        if judge ==0:
            sosu.append(i)
    
    slist =[0]*len(sosu)
    for k in range(0,len(sosu)):
        m = nn
        count = 0
        while m % sosu[k] ==0:
            m = m //sosu[k]
            count +=1
        slist[k] = count
    
    res = 1
    for l in range(0,len(slist)):
        res =res*(slist[l]+1) % 1000000007

    print(res)
p,q,r = int(x) for x in input().split()
print(min(p + q,q + r,r+ p))

### FIXED CODE ###

p,q,r = map(int, input().split())
print(min(p + q,q + r,r+ p))
x,y,a,b,c = list(map(int, input().split(' ')))
p = sorted(list(map(int, input().split(' '))))[-x:]
q = sorted(list(map(int, input().split(' '))))[-y:]
r = sorted(list(map(int, input().split(' '))))[-x-y:]

pidx = 0
qidx = 0
for i in range(x+y):
  ptmp = 0
  qtmp = 0
  valid_p = True
  valid_q = True
  if pidx < a:
  	ptmp = p[pidx]
  else:
    valid_p = False
  if qidx < b:
    qtmp = q[qidx]
  else:
    valid_q = False
  sel_p = True # pを探索
  if valid_q:
    if not valid_p:
      sel_p = False
    elif ptmp<qtmp:
      sel_p = False
  rtmp = r[c - 1 - i] # 逆順
  if sel_p:
    if ptmp < rtmp and pidx < a:
      p[pidx] = rtmp
      pidx += 1
  else:
    if qtmp < rtmp and qidx < b:
      q[qidx] = rtmp
      qidx += 1
print (sum(p) + sum(q))

### FIXED CODE ###

x,y,a,b,c = list(map(int, input().split(' ')))
p = sorted(list(map(int, input().split(' '))))[-x:]
q = sorted(list(map(int, input().split(' '))))[-y:]
r = sorted(list(map(int, input().split(' '))))[-x-y:]

z = sorted(p+q+r)[-x-y:]

print (sum(z))
n=int(input())
a = [int(input()) for _ in range(n)]
a.sort()
for i in range(n):
    if sum(a)%10 == 0:
        if a[i]%10 == 0:
            continue
        else:
            a[i]=0
    else:
        print(sum(a))
        exit(0)
print(0)

### FIXED CODE ###

ans = sum(map(int,input().split()))
print('error' if ans >=10 else ans)
A, B = map(int, input().split())
a, b = input().split("-")
print ("Yes" if len(a) == A and len(b) == B else "No")


### FIXED CODE ###

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

if any([S.count("-") != 1, S[0] == "-", S[-1] == "-"]):
  print ("No")
else:
  a, b = S.split("-")
  if len(a) == A and len(b) == B:
    print ("Yes")
  else:
    print ("No")
n = int(input())
text = input(list()            # テキストをリストに変換
pattern = list('ABC')          # パターンをリストに変換
cnt = 0

for i in range(n):
    match = True                # 一致しているものとして探索開始
    for j in range(len(pattern)):
        if text[i + j] != pattern[j]:
            match = False       # 一致しなかった
            break
    if match:                   # すべての文字が一致していれば出力
        cnt += 1

print(cnt)

### FIXED CODE ###

n = int(input())
s = input()      
pattern = list('ABC')          
cnt = 0

for i in range(n-len(pattern)+1):
    if s[i] == pattern[0]:
        if s[i+1] == pattern[1]:
            if s[i+2] == pattern[2]:
                cnt += 1

print(cnt)
a,b = (int(x) for x in input().split())
if a*b%2 == 0:
    print('Even')
else:
    print('Odd')

### FIXED CODE ###

a,b,c = map(int, input().strip())
0 <= a <= 1
0 <= b <= 1
0 <= c <= 1

print(a + b + c)
N=int(input())
A=[int(i) for i in input().split()]
SA=sum(A)

sum=[(i**2+i)//2 for i in range(2*10**5)]

i=0
while sum[i]<SA:
    i+=1

# print(sum[:20])
# print(i)

ans1=0
ans2=0
for j in range(N):
    ans1+=abs(A[j]-(i-N+j))
    ans2+=abs(A[j]-(i-N+j+1))

print(min(ans1,ans2))



### FIXED CODE ###

N=int(input())
A=[int(i) for i in input().split()]
B=sorted([A[j]-j-1 for j in range(N)])

def median(seq):
    s = sorted(seq)
    if len(s) % 2 == 0:          # 要素が偶数個なら2つの平均
        return (s[len(s) // 2] + s[(len(s) // 2) - 1]) / 2
    else:
        return s[len(s) // 2]    # 要素が奇数個なら中央の値

b=median(B)

ans=0
for i in range(N):
    ans+=abs(A[i]-(b+i+1))

print(int(ans))