Harryxun/stf_run huggingface dataset:
N=int(input())
num=[int(input()) for i in range(N)]
num.sort()

if N%2!=0: #kisu
  manaka=int(N/2)
  if abs(num[manaka]-num[0])<abs(num[manaka]-num[N-1]):
    sum=abs(num[manaka]-num[N-1])
    for i in range(int((N-1)/2)):
      sum+=abs(num[N-1-i]-num[i])
      sum+=abs(num[i]-num[N-2-i])
    print(sum)     
  else:
    jun.append(manaka)
    sum=abs(num[manaka]-num[0])
    for i in range(int((N-1)/2)):
      sum+=abs(num[i]-num[N-1-i])
      sum+=abs(num[i+1]-num[N-1-i])
    print(sum)
else:
  manaka=int(N/2)
  sum=abs(num[manaka]-num[0])
  for i in range(manaka-1):
    sum+=abs(num[i]-num[N-1-i])
    sum+=abs(num[i+1]-num[N-1-i])
  print(sum)

### FIXED CODE ###

N=int(input())
num=[int(input()) for i in range(N)]
num.sort()

if N%2!=0: #kisu
  manaka=int(N/2)  
  sum_a=abs(num[manaka]-num[N-1])
  sum_a+=abs(num[N-1]-num[0])
  for i in range(int((N-1)/2)-1):
    sum_a+=abs(num[N-2-i]-num[i])
    sum_a+=abs(num[i+1]-num[N-2-i])
  sum_b=abs(num[manaka]-num[0])
  sum_b+=abs(num[0]-num[N-1])
  for i in range(int((N-1)/2)-1):
    sum_b+=abs(num[i+1]-num[N-1-i])
    sum_b+=abs(num[i+1]-num[N-2-i])
  print(max(sum_a,sum_b))
else:
  manaka=int(N/2)
  sum=abs(num[manaka]-num[0])
  for i in range(manaka-1):
    sum+=abs(num[i]-num[N-1-i])
    sum+=abs(num[i+1]-num[N-1-i])
  print(sum)
n=input()
s=int(n/100)
if s==7:
    print("Yes")
    exit()
elif n%10 == 7:
    print("Yes")
    exit()
elif n%100>=70 and n%100<80:
    print("Yes")
    exit()
else:
    print("No")

### FIXED CODE ###

n=int(input())
s=int(n/100)
if s==7:
    print("Yes")
    exit()
elif n%10 == 7:
    print("Yes")
    exit()
elif n%100>=70 and n%100<80:
    print("Yes")
    exit()
else:
    print("No")
a=list(map(int,input().split()))
if a[0]==a[1]:
  　print(2*a[0])
else:
　　print(2max(a)-1)

### FIXED CODE ###

a=list(map(int,input().split()))
if a[0]==a[1]:
    print(2*a[0])
else:
    print(2*max(a)-1)
import math
a=int(input())
print(2.math.pi*a)


### FIXED CODE ###

import math
a=int(input())
print(2*math.pi*a)
N, K = int(input())
print(0 if N%K == 0 else 1)

### FIXED CODE ###

N, K = map(int, input().split(" "))
print(0 if N%K == 0 else 1)
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
    
N,M=map(int,input().split())
a=0
b=0
AC=[0]*(M+1)
pen=0
l=[]
for i in range(M):
	j,r=input().split()
	if AC[int(j)]==0:
		if r=="WA":
			pen+=1
		else:
			AC[int(j)]+=1
print(sum(AC),pen)

### FIXED CODE ###

import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
    
N,M=map(int,input().split())
a=0
b=0
AC=[0]*(N+1)
pen=[0]*(N+1)
p=0
l=[]
for i in range(M):
	j,r=input().split()
	if AC[int(j)]==0:
		if r=="WA":
			pen[int(j)]+=1
		else:
			AC[int(j)]+=1
for k in range(N+1):
	if AC[k]==1:
		p+=pen[k]

print(sum(AC),p)
N = int(input())
A = list(map(int, input().split()))
A = sorted(A)
C = [x for x in set(A) if A.count(x) == 1]
A = list(set(A))

MAX_A = 1000000

dp = [0]*MAX_A

for i in A:
  if dp[i] != 1:
    c = i
    while c < MAX_A-i:
      c += i
      dp[c] = 1
  if i > 1000:
    break

c = 0
for i in C:
  c += dp[i]

print(len(C)-c)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
A = sorted(A)

MAX_A = 1000001

dp = [0]*MAX_A

for i in A:
  if dp[i] == 0:
    for j in range(i, MAX_A,i):
      dp[j] += 1
  else:
    dp[i] += 1

c = 0
for i in A:
  if dp[i] == 1:
    c += 1

print(c)
def solve(string):
    n, m, *a = map(int, string.split())
    needs = {i + 1: n for i, n in enumerate(map(int, "2 5 5 4 5 6 3 7 6".split()))}
    b = sorted(a, key=lambda x: needs[x])
    index = 0
    base = str(b[0]) * (n // needs[b[0]])
    n %= needs[b[0]]
    count = 0
    while n > 0 and count < 5:
        use = [_b for _b in b if needs[_b] <= needs[b[0]] + n]
        if max(use) == b[0]:
            tmp_n = use[-1]
            tmp_c = n // (needs[tmp_n] - needs[b[0]])
            base = base[:-tmp_c] + (str(tmp_n) * tmp_c)
            n -= (needs[tmp_n] - needs[b[0]]) * tmp_c
        else:
            tmp_n = use[-1]
            tmp_n = max(use)
            tmp_c = n // (needs[tmp_n] - needs[b[0]])
            base = base[:index] + str(tmp_n) * tmp_c + base[index + tmp_c:]
            n -= (needs[tmp_n] - needs[b[0]]) * tmp_c
            index += tmp_c
        count += 1
    return base


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))


### FIXED CODE ###

def solve(string):
    n, m, *a = map(int, string.split())
    needs = {i + 1: n for i, n in enumerate(map(int, "2 5 5 4 5 6 3 7 6".split()))}
    if 2 in a and 5 in a:
        a.remove(2)
    if 3 in a and 5 in a:
        a.remove(3)
    if 2 in a and 3 in a:
        a.remove(2)
    if 6 in a and 9 in a:
        a.remove(6)
    b = sorted(a, key=lambda x: needs[x])
    index = 0
    base = str(b[0]) * (n // needs[b[0]])
    n %= needs[b[0]]
    while n > 0:
        use = [_b for _b in b if needs[_b] <= needs[b[0]] + n]
        if len(use) == 1:
            base = base[:-1]
            n += needs[b[0]]
        elif max(use) == b[0]:
            tmp_n = use[-1]
            tmp_c = n // (needs[tmp_n] - needs[b[0]])
            base = base[:-tmp_c] + str(tmp_n) * tmp_c
            n -= (needs[tmp_n] - needs[b[0]]) * tmp_c
        else:
            tmp_n = max(use)
            tmp_c = n // (needs[tmp_n] - needs[b[0]])
            base = base[:index] + str(tmp_n) * tmp_c + base[index + tmp_c:]
            n -= (needs[tmp_n] - needs[b[0]]) * tmp_c
            index += tmp_c
    return base


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))
from fractions import gcd # python 3.4
# from math import gcd # from python 3.5 
def lcm(a,b):
    return int(a*b/gcd(a,b))

N,M = map(int, input().split())
S = input()
T = input()
L= lcm(N,M)
ans = dict()
for i in range(N):
    idx = i*(L//N)
    ans[idx] = S[i]

for j in range(M):
    idx = j*(L//M)
    if ans[idx]!="?":
        if ans[idx]==T[j]:
            continue
        else:
            print(-1)
            break
else:
    print(L)

### FIXED CODE ###

from fractions import gcd # python 3.4
# from math import gcd # from python 3.5 
def lcm(a,b):
    return int(a*b/gcd(a,b))

N,M = map(int, input().split())
S = input()
T = input()
L= lcm(N,M)
ans = dict()
for i in range(N):
    idx = i*(L//N)
    ans[idx] = S[i]

for j in range(M):
    idx = j*(L//M)
    if idx in ans.keys():
        if ans[idx]==T[j]:
            continue
        else:
            print(-1)
            break
else:
    print(L)
import math
[a, b] = [int(i) for i in input().split()]

for i in range(3000):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        return
print(-1)



### FIXED CODE ###

import math
[a, b] = [int(i) for i in input().split()]

for i in range(3000):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        break
else:
    print(-1)
print(3**int(input())-2**sum(~int(s)%2 for s in input().split()))

### FIXED CODE ###

if "AC"in input():
  print("Yes")
else:
  print("No")
x,y=map(int,input().split())
if ord(x)<ord(y):print('<')
elif ord(x)>ord(y):print('>')
else:print('=')

### FIXED CODE ###

x,y=input().split()
if ord(x)<ord(y):print('<')
elif ord(x)>ord(y):print('>')
else:print('=')
n, m = input()

if n == m:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n, m = input().split(' ')
 
if n == m:
  print('Yes')
else:
  print('No')
n = int(input())
a = list(map(int,input().split()))
a.sort()
a = a[::-1]
s = set(a)
s = list(s)
t = set()
for i in range(len(s)):
    if a.count(s[i]) >= 4 and len(t) == 0:
        print(s[i]**2)
        exit()
    elif a.count(s[i]) >= 2:
        t.get(s[i])
        if len(t) >= 2:
            print(s[0]*s[1])
            exit()

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
a.sort()
a = a[::-1]
i = 0
c = 0
m = list()
while i < n-1:
    if a[i]==a[i+1]:
        m.append(a[i])
        i += 1
        c += 1
    i += 1
    if c == 2:
        break
if c == 2:
    print(m[0]*m[1])
else:
    print(0)
import math
n,w=map(int,input().split())
if n==1 or w==1:
    print(1)
else:
    ans=math.ceil(w/2)*math.ceil(n/2)+(w//2)*(n//2)
print(ans)

### FIXED CODE ###

import math
n,w=map(int,input().split())
if n==1 or w==1:
    print(1)
else:
    ans=math.ceil(w/2)*math.ceil(n/2)+(w//2)*(n//2)
    print(ans)
from math import sqrt

def func(num):
    for i in range(2, lim_n+1):
        for j in range(2, i+1):
            for k in range(2, j+1):
                if i**2 + j ** 2 + k ** 2 == 2 * num:
                    if (j + k) - i != 0 and ((j + k) - i) % 2 == 0:
                        if i == j and j == k:
                            if i  % 2 ==1:
                                break
                            return 1
                        elif i != j and j != k:
                            return 6
                        else:
                            return 3
    return 0

n = int(input())
for i in range(1, n+1):
    print(func(i))

### FIXED CODE ###

from math import sqrt

n = int(input())
lim_n = int(sqrt(n*2))
result = [0] * n

for i in range(2, lim_n+1):
    for j in range(2, i+1):
        for k in range(2, j+1):
            p = i**2+j**2+k**2
            if p > 2*n:
                break
            if p % 2 == 1:
                continue
            if (j + k) - i < 2:
                continue
            if i == j and j == k:
                if i  % 2 ==1:
                    continue
                result[p//2-1] += 1
            elif i != j and j != k:
                result[p//2-1] += 6
            else:
                result[p//2-1] += 3

for item in result:
    print(item)
import sys
input=sys.stdin.readline
class BinaryIndexedTree():
  def __init__(self,n):self.bit=[0]*n
  def add(self,i,x):
    i+=1
    while i<=len(self.bit):
      self.bit[i-1]+=x
      i+=i&-i
  def sum_1(self,i):
    a=0
    i+=1
    while i:
      a+=self.bit[i-1]
      i-=i&-i
    return a
  def sum(self,i,j):
    a=self.sum_1(j-1)
    if i!=0:a-=self.sum_1(i-1)
    return a
def tentousu(a):
  bit=BinaryIndexedTree(n)
  b=[0]*n
  for i in range(n):
    b[a[i]]=i
  ans=0
  for i in range(n):
    j=b[i]+bit.sum(b[i]+1,n)
    ans+=j-i
    bit.add(b[i],1)
  return ans
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
import itertools
xx=[i for i in range(n)]
for i in range(1,n,2):a[i],b[i]=b[i],a[i]
ans=inf=float('inf')
for i in itertools.combinations(xx,(n+1)//2):
  s=set(i)
  ac=[]
  bc=[]
  for j in range(n):
    if j in s:ac.append((a[j],j))
    else:bc.append((b[j],j))
  ac.sort()
  bc.sort()
  x=[]
  m=[]
  for j in range(n):
    if j%2:
      x.append(bc[j//2][0])
      m.append(bc[j//2][1])
    else:
      x.append(ac[j//2][0])
      m.append(ac[j//2][1])
  f=False
  for j in range(1,n):
    if x[j-1][0]>x[j][0]:f=True
  if f:continue
  ans=min(ans,tentousu(m))
if ans==inf:ans=-1
print(ans)

### FIXED CODE ###

class BinaryIndexedTree():
  def __init__(self,n):self.bit=[0]*n
  def add(self,i,x):
    i+=1
    while i<=len(self.bit):
      self.bit[i-1]+=x
      i+=i&-i
  def sum_1(self,i):
    a=0
    i+=1
    while i:
      a+=self.bit[i-1]
      i-=i&-i
    return a
  def sum(self,i,j):
    a=self.sum_1(j-1)
    if i!=0:a-=self.sum_1(i-1)
    return a
def tentousu(a):
  bit=BinaryIndexedTree(n)
  b=[0]*n
  for i in range(n):
    b[a[i]]=i
  ans=0
  for i in range(n):
    j=b[i]+bit.sum(b[i]+1,n)
    ans+=j-i
    bit.add(b[i],1)
  return ans
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
for i in range(1,n,2):a[i],b[i]=b[i],a[i]
ans=inf=float('inf')
for i in range(2**n):
  s=bin(i)[2:].zfill(n)
  if s.count("0")!=n//2:continue
  ac=[]
  bc=[]
  for j in range(n):
    if s[j]=="1":ac.append((a[j],j))
    else:bc.append((b[j],j))
  ac.sort()
  bc.sort()
  x=[]
  for j in range(n):
    if j%2:x.append(bc[j//2])
    else:x.append(ac[j//2])
  f=False
  for j in range(1,n):
    if x[j-1][0]>x[j][0]:f=True
  if f:continue
  m=[]
  for j in range(n):m.append(x[j][1])
  ans=min(ans,tentousu(m))
if ans==inf:ans=-1
print(ans)
A,B = map(int, input().split())

w = '.'
b = '#'

ans = [ [b]* 20 + [w] * 20 for _ in range(100)]

for i in range(A-1):
    x = 2 * i//50
    y = (i%50) * 2
    ans[y][x] = w
    
for i in range(B-1):
    x = 2 * i//50 + 21
    y = (i%50) * 2
    ans[y][x] = b
    
for i in range(100):
    print(''.join(ans[i]))

### FIXED CODE ###

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

w = '.'
b = '#'

ans = [ [b]* 20 + [w] * 20 for _ in range(100)]

for i in range(A-1):
    x = 2 * (i//50)
    y = (i%50) * 2
    ans[y][x] = w
    
for i in range(B-1):
    x = 2 * (i//50) + 21
    y = (i%50) * 2
    ans[y][x] = b
    
print('100 40')
for i in range(100):
    print(''.join(ans[i]))
N=int(input())

ANS=[0]*6
flag=0

if N<100000:
    if N<10000:
        if N<1000:
            if N<100:
                if N<10:
                    ANS[0]=int(N/10)
                    flag=flag+1
                ANS[1]=9
                flag=flag+1
            ANS[2]=9+N-100+1
            flag=flag+1
        ANS[3]=909
        flag=flag+1
    ANS[4]=9+900+N-10000+1
    flag=flag+1
elif N==100000:
    ANS[5]
    print(90909)

if flag==5:
    print(ANS[0])
if flag==4:
    print(ANS[1])
if flag==3:
    print(ANS[2])
if flag==2:
    print(ANS[3])
if flag==1:
    print(ANS[4])

### FIXED CODE ###

x=input().split()

y=[0]*3

for i in range(3):
  y[i]=int(x[i])

ans=(y[2]-(y[0]-y[1]))

if ans>0:
  print(ans)
  
elif ans<=0:
  print(0)
a = int(input())
array = list(map(int, input().strip().split()))
out = 0
for i in range(a):
    out = out + 1 if array[i] == min(array[0:i+1])
print(out)

### FIXED CODE ###

a = int(input())
array = list(map(int, input().strip().split()))
out = 0
min_num = array[0]
for i in array:
    min_num = min(min_num, i)
    out = out + 1 if i == min_num else out
print(out)
import numpy as np

N, C = map(int, input().split())
STC = [tuple(map(int, input().split())) for i in range(N)]

# 0.5秒から10万秒まで0.5秒区切り
time = np.array([np.zeros(30) for i in range(C)])

# STC処理
for s, t, c in STC:
    # c-1でチャンネル番号ごとのtimeにアクセス
    if time[c-1][2*s] != 0:
        time[c-1][2*s] = 0
    else:
        time[c-1][2*s-2] += 1
    time[c-1][2*t] -= 1

# 各チャンネルごとに累積和を取る
for i in range(C):
    time[i-1] = np.cumsum(time[i-1])
    
# チャンネルの被りをあぶりだし
A = np.sum(time, axis=0)
print(int(np.max(A)))




### FIXED CODE ###

import numpy

N, C = map(int, input().split())
STC = [list(map(int, input().split())) for i in range(N)]
Channel = numpy.array([[0]*(2*10**5+1) for i in range(C+1)])

for s, t, c in STC:
    Channel[c][2*s-1] += 1
    Channel[c][2*t] -= 1
    
for i in range(len(Channel)):
    Channel[i] = numpy.cumsum(Channel[i])
bool_Channel = Channel.astype(numpy.bool_)

needs = numpy.sum(bool_Channel, axis=0)
print(needs.max())
n=int(input())
a=list(map(int,input().split()))

import sys
import math
def setwise_coprime(a):
  ans=a[0]
  for i in range(1,n):
    ans=math.gcd(ans,a[i])
  return ans

def erast(n):
  num_set=set()
  prime_set=set()
  for i in range(2,n+1):
    if i not in num_set:
      prime_set.add(i)
      for j in range(i*i,n+1,i):
        num_set.add(j)
  s=list(prime_set)
  return s

def is_prime(n):
  if n==1:
    return False
  if n==2:
    return True
  else:
    for i in range(int(math.sqrt(n))+1):
      if n%i==0:
        return False
    return True
  
check=set()
for i in range(n):
  if is_prime(a[i]):
    check.add(a[i])
  
if setwise_coprime(a)==1:
  s=erast(1000)
  s.sort()
  for i in range(n):
    if a[i]!=1:
      for j in range(len(s)):
        if a[i]%s[j]==0:
          if s[j] in check:
            print("setwise coprime")
            sys.exit()
          else:
            check.add(s[j])
            
  print("pairwise coprime")    
else:
  print("not coprime")
  
  



      
      
    


### FIXED CODE ###

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

import sys
import math
def setwise_coprime(a):
  ans=a[0]
  for i in range(1,n):
    ans=math.gcd(ans,a[i])
  return ans

#エラストテネスのふるい
def create_sieve(n):
  sieve=[0]*(n+1)
  for i in range(2,n+1):
    if sieve[i]==0:
      for j in range(i*i,n+1,i):
        sieve[j]=i
  return sieve

#高速素因数分解
def fast_factorization(n, sieve):
  prime={}
  while n>1:
    p=sieve[n]
    #nが素数の場合
    if p==0:
      prime[n]=prime.get(n,0)+1
      break
    #nが素数ではない場合
    else:
      prime[p]=prime.get(p,0)+1
      n=n//p
  return prime

check=set()
if setwise_coprime(a)==1:
  #素因数のダブリをcheck
  sieve=create_sieve(10**6)
  for i in range(n):
    if a[i]!=1:
      s=fast_factorization(a[i], sieve)
      for i in s:
        if i in check:
          print("setwise coprime")
          sys.exit()
        else:
          check.add(i)
  print("pairwise coprime")    
else:
  print("not coprime")
n,x=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
c=0
for i in range(len(a)+1):
  if x>0 and x>=a[i]:
    x-=a[i]
    c+=1
  else:
    print(c)
    break

### FIXED CODE ###

n,x=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
c=0
for i in range(n):
  if n>=i and x>=a[i]:
    x-=a[i]
    c+=1
    if n==c and x==0:
      print(n)
    if n==c and x!=0:
      print(n-1)
  else:
    print(c)
    break
s = input()
if((t[0:1] == t[1:2] == t[2:3]) or (t[1:2] == t[2:3] == t[3:4]):
   print("Yes")
else:
   print("No")

### FIXED CODE ###

t = input()
if((t[0:1] == t[1:2] == t[2:3]) or (t[1:2] == t[2:3] == t[3:4])):
   print("Yes")
else:
   print("No")
a = int(input())
b = int(input())
c=(a*b)
if c%2==1:
  print("Odd")
else c%2==0:
  print("Even")

### FIXED CODE ###

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

print("Even" if a*b%2==0 else "Odd")
a,b,c=map(int,input().split)
if a<b and b<a:
    print("Yes")
else:
    print("No")
    


### FIXED CODE ###

a,b,c=map(int,input().split())
if a<b and b<c:
    print("Yes")
else:
    print("No")
while True:
    n, m = map(int, input().split())
    if n == 0:
        break
    risks = [(p, d) for d, p in (map(int, input().split()) for _ in range(n))]
    risks.sort()
    while m:
        p, d = risks.pop()
        if d >= m:
            remain = p * (d - m)
            break
        m -= d
    print(remain + sum(p * d for p, d in risks))

### FIXED CODE ###

while True:
    n, m = map(int, input().split())
    if n == 0:
        break
    risks = [(p, d) for d, p in (map(int, input().split()) for _ in range(n))]
    risks.sort()
    remain = 0
    while risks:
        p, d = risks.pop()
        if d >= m:
            remain = p * (d - m)
            break
        m -= d
    print(remain + sum(p * d for p, d in risks))
n = (int, raw_input().split())
x = n.sort()
print x

### FIXED CODE ###

a,b,c = map(int, raw_input().split())
n = [a,b,c]
n.sort()
for i in n:
    print i,
a, b = map(int, input().split())

if a > 12:
    print(b)

eilf 5 < a < 13:
    print(b // 2)

else:
    print(0)

### FIXED CODE ###

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

if a > 12:
    print(b)

elif 5 < a < 13:
    print(b // 2)

else:
    print(0)
n = int(input())
a = list(map(int, input().split()))
a_min = [0] * (n + 1)
a_min[n] = a[n]
for i in range(n - 1, -1, -1):
    a_min[i] = a[i] + a_min[i + 1]

b = [1]
for i in range(n):
    tmp = b[i] - a[i]
    if tmp < 1 or tmp * 2 < a[i + 1]:
        print(-1)
        break
else:
    if n == 0:
        ans = 1 if a[0] == 1 else -1
        print(ans)
    else:
        print(sum(b))


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
a_min = [0] * (n + 1)
a_min[n] = a[n]
for i in range(n - 1, -1, -1):
    a_min[i] = a[i] + a_min[i + 1]

b = [1]
for i in range(n):
    tmp = b[i] - a[i]
    b.append(min(tmp * 2, a_min[i + 1]))
    if tmp < 1 or tmp * 2 < a[i + 1]:
        print(-1)
        break
else:
    if n == 0:
        ans = 1 if a[0] == 1 else -1
        print(ans)
    else:
        print(sum(b))
n, k = map(int, input().split())
d = int(input())
A = []
for i in range(d):
    a = list(map(int, input().split()))
    A += a
A_ = set(A)
print(n - len(A_))

### FIXED CODE ###

n, k = map(int, input().split())
A = []
for i in range(k):
    d = int(input())
    a = list(map(int, input().split()))
    A += a
A_ = set(A)
print(n - len(A_))
N,M = map(int.input().split())
ans = (1900*M + 100*(N-M))*(2**M)
print(ans)

### FIXED CODE ###

N,M = map(int,input().split())
ans = (1900*M + 100*(N-M))*(2**M)
print(ans)
#include<iostream>
#include<algorithm>
#include<vector>

using namespace std;

int main(){
  int N, T; 
  cin >> N >> T;
  vector<int> c[N], t[N];
  for(int i = 0, i < N; ++i) {
    cin >> c[i] >> t[i];
  }
  int MAX = 1 << 30;
  int ans = MAX;

  for (int i = 0; i < N; ++i){
    if(t[i] <= T){
      ans = min(ans, c[i]);
      
    }
  }

  if (ans <  MAX){
    cout << ans << endl;
  }
  else {
    cout << "TLE" << endl;
  }
}

### FIXED CODE ###

n,T = map(int,input().split())
mn = 1001
for i in range(n):
    c,t = map(int,input().split())
    if t <= T:
        mn = min(mn,c)

if mn == 1001:
    print("TLE")
else :
    print(mn)
D,T,S=[int(input()) for i in range(3)]
if D/S<=T:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

D,T,S= map(int, input().split())
if D/S<=T:
    print('Yes')
else:
    print('No')
import math

n, k = map(int, input().split())
x, y, c = zip(*[map(int, input().split()) for _ in range(n)])
que = [(0, 0, 1000)]
res = 1e9
i = 0
while i < len(que):
    px, py, r = que[i]
    i += 1
    lb = [c[j] * math.hypot(max(abs(px - x[j]) - r, 0), max(abs(py - y[j]) - r, 0)) for j in range(n)]
    if 1 - sorted(lb)[k - 1] / res > 5e-7:
        dis = [c[j] * math.hypot(px - x[j], py - y[j]) for j in range(n)]
        res = min(res, sorted(dis)[k - 1])
        for dx in (-0.5, 0.5):
            for dy in (-0.5, 0.5):
                que.append((px + dx * r, py + dy * r, r / 2))
print(res)

### FIXED CODE ###

import math

n, k = map(int, input().split())
x, y, c = zip(*[map(int, input().split()) for _ in range(n)])
que = [(0, 0, 1000)]
res = 1e9
i = 0
while i < len(que):
    px, py, r = que[i]
    i += 1
    lb = [c[j] * math.hypot(max(abs(px - x[j]) - r, 0), max(abs(py - y[j]) - r, 0)) for j in range(n)]
    if res * (1 - 5e-7) > sorted(lb)[k - 1]:
        dis = [c[j] * math.hypot(px - x[j], py - y[j]) for j in range(n)]
        res = min(res, sorted(dis)[k - 1])
        for dx in (-0.5, 0.5):
            for dy in (-0.5, 0.5):
                que.append((px + dx * r, py + dy * r, r / 2))
print(res)
s = raw_input()
s_hold = s
sum = 0
i = 0

while i < 9:
  sum = sum + s % 10
  s = s // 10
  i = i + 1

if s_hold % sum == 0:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

s = int(input())
s_hold = s
sum = 0
i = 0

while i < 9:
  sum = sum + s % 10
  s = s // 10
  i = i + 1

if sum == 0:
  print("Yes")
elif s_hold % sum == 0:
  print("Yes")
else:
  print("No")
from collections import deque

S = deque(input())
Q = int(input())
reverse = 1


for i in range(Q):
    
    q = input()
    
    if (q == 1):
        reverse *= -1
    else:
        integer, judge, cha = q.split()
        
        if (judge == '1'):
            if (reverse == 1):
                S.appendleft(cha)
            else:
                S.append(cha)
        elif (judge == '2'):
            if (reverse == -1):
                S.append(cha)
            else:
                S.appendleft(cha)

if (reverse == -1):
    S.reverse()

print(''.join(list(S)))

### FIXED CODE ###

from collections import deque

S = deque(input())
Q = int(input())
reverse = 1


for i in range(Q):
    
    q = input()
    
    if (q == '1'):
        reverse *= -1
    else:
        integer, judge, cha = q.split()
        
        if (judge == '1'):
            if (reverse == 1):
                S.appendleft(cha)
            else:
                S.append(cha)
        
        elif (judge == '2'):
            if (reverse == 1):
                S.append(cha)
            else:
                S.appendleft(cha)

if (reverse == -1):
    S.reverse()

print(''.join(list(S)))