Harryxun/stf_run huggingface dataset:
import math
x1,y1,x2,y2=map(int,input().split())
dist=math.sqrt((x1-x2)**2+(y1-y2)**2)
print(dist)

### FIXED CODE ###

import math
x1,y1,x2,y2=map(float,input().split())
dist=math.sqrt((x1-x2)**2+(y1-y2)**2)
print(dist)
S=input()
T=input()
s=list(S)
t=list(T)
ss=[]
tt=[]
for i in range('a',chr(ord('z')+1)):
    a=s.count(i)
    ss.append(a)
    b=t.count(i)
    tt.append(b)
ss.sort()
tt.sort()
if ss==tt:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s=raw_input()
t=raw_input()
if [s.find(i) for i in s] == [t.find(j) for j in t]:
 print 'Yes'
else:
 print 'No'
import numpy

def solution():
    n, m = map(int, input().split())
    a = [int(aa) for aa in input().split()]
    a.sort(reverse=True)
    for i in range(m):
        a[0] = a[0] // 2
        numpy.np.sort(a)[::-1]
    print(sum(a))

solution()


### FIXED CODE ###

import heapq as hp
def solution():
    n, m = map(int, input().split())
    a = [int(aa) * -1 for aa in input().split()]
    hp.heapify(a)
    for i in range(m):
        hp.heappush(a, (hp.heappop(a)*-1 // 2) * -1)
    print(abs(sum(a)))

solution()
# coding: utf-8
import sympy
n = int(input())
ans = 0

for i in range(n):
    list = sympy.divisors(i + 1)
    ans = ans + (1 + i) * len(list)
print(ans)


### FIXED CODE ###

# coding: utf-8
n_input = int(input())
ans = 0
for i in range(1, n_input + 1):
    n = n_input // i
    ans += n * (1 + n) * i // 2
print(ans)
# coding: utf-8
# Your code here!

import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
 
n = int(input())
ans = int(input())
for i in range(n-1):
  tmp = int(input())
  ans = lcm(ans,tmp)
  
print(ans)

### FIXED CODE ###

from fractions import gcd

def lcm(x, y):
    return (x*y) // gcd(x, y)

def getN():
    return int(input())
# print(lcm(10, 20))

n = getN()
ans = 1
for i in range(n):
    t = getN()
    ans = lcm(ans, t)

print(ans)
#coding:UTF-8
s = input().split()
w=int(s[0])
h=int(s[1])
x=int(s[2])
y=int(s[3])
r=int(s[4])

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

### FIXED CODE ###

#coding:UTF-8
s = input().split()
w=int(s[0])
h=int(s[1])
x=int(s[2])
y=int(s[3])
r=int(s[4])

if((x-r)>=0 and (x+r)<=w and (y-r)>=0 and (y+r)<=h):
    print("Yes")
else:
    print ("No")
n = int(input().split())
a = [0] + list(map(int,input().split()))

info = [0] * (n+1)

for i in range(0,n):
    count = 0
    for j in range(n-i,n+1):
        count += info[j]
    if count != a[n-i]:
        info[n-i] = 1

ans = []

for k in range(1,n+1):
    if info[k] == 1:
        ans.append(k)

print(len(ans))
print(ans)

### FIXED CODE ###

n = int(input())
a = [0] + list(map(int,input().split()))

info = [0] * (n+1)

for i in range(0,n):
    count = 0
    for j in range(2,n//(n-i) + 1):
        count += info[(n-i)*j]
    if count % 2 != a[n-i]:
        info[n-i] = 1

ans = []

for k in range(1,n+1):
    if info[k] == 1:
        ans.append(k)

print(len(ans))
print(" ".join(map(str,ans)))
X=int(input())
for a in range(101):
 for b in range(201):
  if a**5-(b-100)**5==X:
   x=str(a)
   y=str(b-100)
L=[x,y]
L=' '.join(L)
print(L)


### FIXED CODE ###

X=int(input())
for a in range(201):
 for b in range(401):
  if a**5-(b-200)**5==X:
   x=str(a)
   y=str(b-200)
L=[x,y]
L=' '.join(L)
print(L)
def nsin(X,y):
    if(int(X/y)):
        return nsin(int(X/y),y)+str(X%y)
    return str(X%y)

cost=10000
for i in range(3**n):
    g=list(nsin(i,3).zfill(5))
    if len(set(g))!=3:
        continue
    la=[]
    lb=[]
    lc=[]
    for j in range(n):        
        if g[j]=="0":
            la.append(l[j])
        elif g[j]=="1":
            lb.append(l[j])
        elif g[j]=="2":
            lc.append(l[j])
    costa=10000
    costb=10000
    costc=10000
    for j in range(1,2**len(la)):
        ga=list(nsin(j,2).zfill(len(la)))
        A=0
        cont=-1
        for k in range(len(la)):
            if ga[k]=="1":
                A+=la[k]
                cont+=1
        tmp=cont*10+abs(A-a)
        if tmp<costa:
            costa=tmp
    for j in range(1,2**len(lb)):
        gb=list(nsin(j,2).zfill(len(lb)))
        B=0
        cont=-1
        for k in range(len(lb)):
            if gb[k]=="1":
                B+=lb[k]
                cont+=1
        tmp=cont*10+abs(B-b)
        if tmp<costb:
            costb=tmp
    for j in range(1,2**len(lc)):
        gc=list(nsin(j,2).zfill(len(lc)))
        C=0
        cont=-1
        for k in range(len(lc)):
            if gc[k]=="1":
                C+=lc[k]
                cont+=1
        tmp=cont*10+abs(C-c)
        if tmp<costc:
            costc=tmp
    if cost>(costa+costb+costc):
        cost=costa+costb+costc
print(cost)

### FIXED CODE ###

n,a,b,c=map(int,input().split())
l=[int(input()) for i in range(n)]
def nsin(X,y):
    if(int(X/y)):
        return nsin(int(X/y),y)+str(X%y)
    return str(X%y)

cost=10000
for i in range(3**n):
    g=list(nsin(i,3).zfill(n))
    if len(set(g))!=3:
        continue
    la=[]
    lb=[]
    lc=[]
    for j in range(n):        
        if g[j]=="0":
            la.append(l[j])
        elif g[j]=="1":
            lb.append(l[j])
        elif g[j]=="2":
            lc.append(l[j])
    costa=10000
    costb=10000
    costc=10000
    for j in range(1,2**len(la)):
        ga=list(nsin(j,2).zfill(len(la)))
        A=0
        cont=-1
        for k in range(len(la)):
            if ga[k]=="1":
                A+=la[k]
                cont+=1
        tmp=cont*10+abs(A-a)
        if tmp<costa:
            costa=tmp
    for j in range(1,2**len(lb)):
        gb=list(nsin(j,2).zfill(len(lb)))
        B=0
        cont=-1
        for k in range(len(lb)):
            if gb[k]=="1":
                B+=lb[k]
                cont+=1
        tmp=cont*10+abs(B-b)
        if tmp<costb:
            costb=tmp
    for j in range(1,2**len(lc)):
        gc=list(nsin(j,2).zfill(len(lc)))
        C=0
        cont=-1
        for k in range(len(lc)):
            if gc[k]=="1":
                C+=lc[k]
                cont+=1
        tmp=cont*10+abs(C-c)
        if tmp<costc:
            costc=tmp
    if cost>(costa+costb+costc):
        cost=costa+costb+costc
print(cost)
a,b = map(int, input().split())

multi = a * b

if multi % 2 == 0:
    print("Even")
else:
    pritn("Odd")
    

### FIXED CODE ###

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

multi = a * b

if multi % 2 == 0:
    print("Even")
else:
    print("Odd")
a,b,k=map(int,input().split())
if a==k:
  print('0',b)

elif (a+b)<k:
  print('0','0')

  elif a>k:
  print(a-k,b)
  
else:
  print('0',b+a-k)
  
  
  


### FIXED CODE ###

a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
  
else:
  print(0,max(0,a+b-k))
a, b = input().split()
count = 0
for i in range(len(a)):
  if (a[i]!= b[i]):
    count += 1
print(count)

### FIXED CODE ###

a = input()
b = input()
count = 0
for i in range(len(a)):
  if (a[i]!= b[i]):
    count += 1
print(count)
N, Q  = map(int, input().split())
S = list(input())
Lsub = [0] * N
Rsub = [0] * N
L = 0
R = 0


for k in range(1,N):
  if SS[k-1] == "A" and SS[k] == "C":
    L += 1
  Lsub[k] = L

for j in (0,N-1)[::-1]:
  if SS[j] == "A" and SS[j+1] == "C":
    R += 1
  Rsub[j] = R


for i in range(Q):
  L, R = map(int, input().split())
  print(Rsub[0] - Lsub[L-1] - Rsub[R-1])

### FIXED CODE ###

N, Q  = map(int, input().split())
S = list(input())
Lsub = [0]
Rsub = [0]
L = 0
R = 0


for k in range(1,N):
  if S[k-1] == "A" and S[k] == "C":
    L += 1
  Lsub.append(L)

for j in range(0,N-1)[::-1]:
  if S[j] == "A" and S[j+1] == "C":
    R += 1
  Rsub.append(R)


for i in range(Q):
  L, R = map(int, input().split())
  print(Rsub[N-1] - Lsub[L-1] - Rsub[N-R])
s = []
s.append(int(input()))
for i in range(1, 1000000):
	if s %2:
		s.append(3*s+1)
	else:
		s.append(s/2)
	for j in range(i):
		if s[j] == s[i]:
			print(i)

### FIXED CODE ###

s = [int(input())]
for i in range(1000000):
	if s[i]%2==0:
		
		# print(s)
		if s[i]/2 in s:
			print(i+2)
			break
		s.append(s[i]/2)
	else:
		
		if 3*s[i]+1 in s:
			print(i+2)
			break
		s.append(3*s[i]+1)
	# print(s)
n = int(input())
a = set(map(int, input().split()))

xs = [0] * (2 * 10 ** 5 + 1)
for v in a:
    if xs[v] == 0:
        for j in range(v, len(xs), v):
            xs[j] += 1
    else:
        xs[v] += 1
print(len(list(filter(lambda v: xs[v] == 1, a))))


### FIXED CODE ###

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

xs = [0] * (max(a) + 1)

for v in a:
    if xs[v] == 0:
        for j in range(v, len(xs), v):
            xs[j] += 1
    else:
        xs[v] += 1
print(len(list(filter(lambda v: xs[v] == 1, a))))
print((lambda a,b:sum(b)-a)(input(),list(map(int,input().split()))))

### FIXED CODE ###

print((lambda a,b:sum(b)-int(a))(input(),list(map(int,input().split()))))
A,B,C,D,E,F=map(int,input().split())
w=set()
s=set()
for i in range(31):
    for j in range(16):
        if 100*(A*i+B*j)<=F:
            w.add(100*(A*i+B*j))
for i in range(1501):
    for j in range(751):
        if C*i+D*j<=F/2:
            s.add(C*i+D*j)
w=list(w)
del w[0]
s=list(s)
s.sort()
a=0
M=0
for i in w:
    for j in range(len(s)-1,-1,-1):
        t=s[j]/i
        if t*100<=E and t>M and i+s[j]<=F:
            W,S=i,s[j]
            M=t
            break
print(W+S,S)

### FIXED CODE ###

A,B,C,D,E,F=map(int,input().split())
w=set()
s=set()
for i in range(31):
    for j in range(16):
        if 100*(A*i+B*j)<=F:
            w.add(100*(A*i+B*j))
for i in range(1501):
    for j in range(751):
        if C*i+D*j<=F/2:
            s.add(C*i+D*j)
w=list(w)
w.sort()
del w[0]
s=list(s)
s.sort()
M=-1
for i in w:
    for j in range(len(s)-1,-1,-1):
        if s[j]*100<=E*i:
            if s[j]>M*i and i+s[j]<=F:
                W,S=i,s[j]
                M=s[j]/i
print(W+S,S)
n,m = [int(x) for x in input().split()]
sc = {}
out = False
for _ in range(m):
    s,c = [x for x in input().split()]
    if s in sc.keys():
        if sc[s] != c:
            print("-1")
            out = True
        else:
            sc[s] = c
    else:
        sc[s] = c
        

if not out:
    if n == 1:
        print(sc["1"])
    elif n == 2:
        if "1" in sc.keys():
            if sc["1"] != "0":
                if "2" in sc.keys():
                    print(sc["1"],sc["2"],sep="")
                else:
                    sc["2"] = "0"
                    print(sc["1"],sc["2"],sep="")
            else:
                print("-1")
        else:
            sc["1"] = "1"
            print(sc["1"],sc["2"],sep="")
    elif n == 3:
        if "1" in sc.keys():
            if sc["1"] != "0":
                if "2" in sc.keys():
                    print(sc["1"],sc["2"],sc["3"],sep="")
                else:
                    sc["2"] = "0"
                    print(sc["1"],sc["2"],sc["3"],sep="")
            else:
                print("-1")
        else:
            sc["1"] = "1"
            if not "2" in sc.keys():
                sc["2"] = "0"
            if not "3" in sc.keys():
                sc["3"] = "0"
            print(sc["1"],sc["2"],sc["3"],sep="")

### FIXED CODE ###

n,m = [int(x) for x in input().split()]
sc = {}
out = False
for _ in range(m):
    s,c = [x for x in input().split()]
    if s in sc.keys():
        if sc[s] != c:
            print("-1")
            out = True
        else:
            sc[s] = c
    else:
        sc[s] = c
        

if not out:
    if n == 1:
        if not "1" in sc.keys():
            sc["1"] = "0"
        print(sc["1"])
    elif n == 2:
        if not "1" in sc.keys():
            sc["1"] = "1"
            if not "2" in sc.keys():
                sc["2"] = "0"
            print(sc["1"],sc["2"],sep="")
        else:
            if sc["1"] == "0":
                print("-1")
            else:
                if not "2" in sc.keys():
                    sc["2"] = "0"
                print(sc["1"],sc["2"],sep="")
    elif n == 3:
        if not "1" in sc.keys():
            sc["1"] = "1"
            if not "2" in sc.keys():
                sc["2"] = "0"
            if not "3" in sc.keys():
                sc["3"] = "0"
            print(sc["1"],sc["2"],sc["3"],sep="")
        else:
            if sc["1"] == "0":
                print("-1")
            else:
                if not "2" in sc.keys():
                    sc["2"] = "0"
                if not "3" in sc.keys():
                    sc["3"] = "0"
                print(sc["1"],sc["2"],sc["3"],sep="")
n=input();print-(n==2)or"\n".join(" ".join(`(i+(j^1)if n>i*2and n%2<1and j<n-2else i+j)%n`for j in range(n-1))for i in range(1,n+1))

### FIXED CODE ###

n=input()
if n==2:print-1;exit(0)
r=range(n-1)
s=r+[n-1]
A=[[1+(i+j+1)%n for j in r]for i in s]
for i in r:
    for j in s:
        if A[A[j][i]-1][i]==j+1:
            A[j][i],A[j][i-n]=A[j][i-n],A[j][i]
print"\n".join(" ".join(map(str, e))for e in A)
text = input()
i = 0
ans = "keyence"
for ob_n in range(len(lists)):
    if text[i] != lists[ob_n]:
        if text.endswith(ans[ob_n:]):
            flag = 1
            break
        else:
            flag = 0
            break
    i+=1
    if i == len(text):
        flag = 1
        break
if flag == 1:
    print("YES")
else :
    print("NO")
        

### FIXED CODE ###

text = input()
i = 0
ans = "keyence"
for ob_n in range(len(ans)):
    if text[i] != ans[ob_n]:
        if text.endswith(ans[ob_n:]):
            flag = 1
            break
        else:
            flag = 0
            break
    i+=1
    if i == len(text):
        flag = 1
        break
if flag == 1:
    print("YES")
else :
    print("NO")
# -*- coding: utf-8 -*-
n = int(input())
g = [[] for i in range(n)]
c = [-1 for i in range(n)]

for i in range(n - 1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1
    g[u].append([v, w % 2])
    g[v].append([u, w % 2])


def dfs(p, d):
    if c[p] == -1:
        c[p] = d
        for x, w in g[p]:
            dfs(x, (d + w) % 2)


dfs(0, 0)

for i in range(len(c)):
    print(c[i])


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(100100)

n = int(input())
g = [[] for i in range(n)]
c = [-1 for i in range(n)]

for i in range(n - 1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1
    w = w % 2
    g[u].append([v, w])
    g[v].append([u, w])


def dfs(p, d):
    if c[p] == -1:
        c[p] = d
        for x, w in g[p]:
            dfs(x, d ^ w)


dfs(0, 0)

for i in range(len(c)):
    print(c[i])
## coding: UTF-8

#ダブリングを利用した実装

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

#2**59 < 10**18< 2**60より2**60まで格納する
l = [0] * (N*61)

for j in range(N):
    l[j] = A[j]


for i in range(1,61):
#for i in range(1, 4):
    for j in range(N):
        p = l[(i-1)*N+j] #一段上を参照(2**(i-1)回移動した時の移動先)
        q = l[(i-1)*N+(p-1)] #pから2**(i-1)回移動した時の移動先を参照　＝　2**i 回移動した時の移動先
        l[i*N+(j)] = q
    #print(l)
#print(l)

bin_str = format(K, 'b')
#print(bin_str)
s = bin_str[::-1]
#print(s)
now = 1 #start地点
for i in range(len(s)):
    if(s[i] == '1'):
        now = l[(i)*N + (now-1)]
        #print(now)

        '''
        next_index = i*N + l[i*N + (now-1)]-1
        nex = l[next_index]
        now = nex
        print(now)
        '''
print(now)

### FIXED CODE ###

## coding: UTF-8
#N, M, K = 9, 3, 4
N, M, K = map(int,input().split())
p = 998244353


# 返り値: a と b の最大公約数
# 返り値: ax + by = gcd(a, b) を満たす (x, y) が格納される
def aug_gcd(a, b):
    lq = []
    while b > 0:
        q = int(a/b)
        r = a % b
        a = b
        b = r
        lq.append(q)
    x = 1
    y = 0
    for i in range(len(lq)):
        tmp = x
        x = y
        y = tmp - lq[(-1)*(i+1)] * y
    return a, x, y

#拡張ユークリッドの互除法による逆元計算
#拡張ユークリッドの方が二分累乗法より高速/mが素数でなくとも良い
def modinv(a, p):
    inv = aug_gcd(a, p)[1] #ax == 1(mod p) <==> ax + py == 0, xの値が逆元
    if(inv < 0):
        inv += p #pがマイナスだったらプラスに書き換える
    return inv


#[NC0, NC1, NC2, NC3, ..., NCN % p]
def N_Combination_k(N, p):
    #NCkのリストを作ります
    l = [1]
    res = 1
    for i in range(1, N+1):
        res *= (N+1-i)
        res %= p
        res *= modinv(i, p)
        res %= p
        l.append(res)
    return l


combination_N_1 = N_Combination_k(N-1, p)
#print(combination_N_1)
Cumulative = [0] #累積和
s = 0
tod = 1 #(M-1) ** (N-1-i)
for i in range(N):
    s += M * tod * combination_N_1[(-1)*(i+1)]
    s %= p
    tod *= (M-1)
    tod %= p
    Cumulative.append(s)
    #print(s)
#print(Cumulative)

ans = Cumulative[-1] - Cumulative[(-1)*(K+2)]
if(ans < 0):
    ans += p
print(ans)
a,b = input().split()
a = int(a)
b = int(b.replace('.','')
print(a*b//100)

### FIXED CODE ###

a,b = input().split()
a = int(a)
b = int(b.replace('.',''))
print(a*b//100)
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
>>> import time
>>> time.sleep(1)
if(a>=0):
    print ((b-a)*e);
else:
    print(a*-c+d+b*e);

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
if(a>=0):
    print ((b-a)*e);
else:
    print(a*-c+d+b*e);
N = input()
if len(N) == 1:
    print(int(N))
else:
    print(max(sum(list(N)),(len(N)-1)*9+int(N[0])-1))


### FIXED CODE ###

N = input()
if len(N) == 1:
    print(int(N))
else:
    print(max(sum([int(i) for i in N]),(len(N)-1)*9+int(N[0])-1))
N = int(input())

xy = []
for _ in range N:
  x, y = map(int, input().split())
  xy = xy.append([x, y])

nu = 0
for i in range (N):
  for j in range (i,N):
    nu += ((xy[i][0] - xy[j][0])**2 + (xy[i][1] - xy[j][1])**2)**0.5
    
answer = nu * (2/N)

print(answer)

### FIXED CODE ###

N = int(input())
 
xy = []
for _ in range (N):
  x, y = map(int, input().split())
  xy.append([x, y])
 
nu = 0
for i in range (N):
  for j in range (i,N):
    nu += ((xy[i][0] - xy[j][0])**2 + (xy[i][1] - xy[j][1])**2)**0.5
    
answer = nu * (2/N)
 
print(answer)
def e_multiplication_4(MOD=10**9 + 7):
    from functools import reduce
    N, K = [int(i) for i in input().split()]
    A = [int(i) for i in input().split()]

    sign = {-1: 0, 0: 0, 1: 0}  # A の各要素の符号
    for a in A:
        sign[a // abs(a)] += 1

    if sign[1] == 0 and K % 2 == 1:
        # どうやっても解は負。絶対値の小さなものから掛けていく
        A.sort(reverse=True)
        return reduce(lambda x, y: (x * y) % MOD, A[:K])
    if sign[1] == 0 and K % 2 == 0:
        # 先程と違って絶対値の大きなものから掛けても解は正になる
        A.sort()
        return reduce(lambda x, y: (x * y) % MOD, A[:K])

    A.sort()
    ans = 1
    i, j = 0, N - 1
    while K > 0:
        # 負の絶対値が大きいものから 2 個取るか？　正の絶対値が大きいものから 1 個取るか？
        # i, j がそれぞれ負の値、非負の値を指さなくなった場合、if 文のどちらかを
        # 確実に通らなくなるので、i, j についての条件は必要ない
        if K > 1 and A[i] * A[i + 1] >= A[j] * A[j - 1]:
            ans *= A[i] * A[i + 1]
            i += 2
            K -= 2
        else:
            ans *= A[j]
            j -= 1
            K -= 1
        ans %= MOD
    return ans

print(e_multiplication_4())

### FIXED CODE ###

def e_multiplication_4(MOD=10**9 + 7):
    from functools import reduce
    N, K = [int(i) for i in input().split()]
    A = [int(i) for i in input().split()]

    sign = {-1: 0, 0: 0, 1: 0}  # A の各要素の符号
    for a in A:
        if a == 0:
            sign[0] += 1
            continue
        sign[a // abs(a)] += 1

    if sign[1] == 0 and K % 2 == 1:
        # どうやっても解は負。絶対値の小さなものから掛けていく
        A.sort(reverse=True)
        return reduce(lambda x, y: (x * y) % MOD, A[:K])
    if sign[1] == 0 and K % 2 == 0:
        # 先程と違って絶対値の大きなものから掛けても解は正になる
        A.sort()
        return reduce(lambda x, y: (x * y) % MOD, A[:K])

    A.sort()
    ans = 1
    i, j = 0, N - 1
    while K > 0:
        # 負の絶対値が大きいものから 2 個取るか？　正の絶対値が大きいものから 1 個取るか？
        # i, j がそれぞれ負の値、非負の値を指さなくなった場合、if 文のどちらかを
        # 確実に通らなくなるので、i, j についての条件は必要ない
        if K > 1 and A[i] * A[i + 1] >= A[j] * A[j - 1]:
            ans *= A[i] * A[i + 1]
            i += 2
            K -= 2
        else:
            ans *= A[j]
            j -= 1
            K -= 1
        ans %= MOD
    return ans

print(e_multiplication_4())
n, k = map(int, input().split())
A = []
D = []

for i in range(n):
    A.append(int(input()))

A.sort(reverse=True)
    
for i in range(k):
    diff = A[i] - A[i + k -1]
    D.append(diff)
    
print(min(D))

### FIXED CODE ###

n, k = map(int, input().split())
hs = []
diff = []

for i in range(n):
    h = int(input())
    hs.append(h)

hs.sort()

for i in range(n - k + 1):
    diff.append(hs[i + k - 1] - hs[i])
    
print(min(diff))
h,w=map(int,input().split())
mapdata=[]
result=[]
k=[]
def get_bomb(i,j):
  count=0
  for x in (i-1,i,i+1):
    for y in (j-1,j,j+1):
      if 0<=x<=h-1 and 0<=y<=w-1:
        if mapdata[x][y]=='#':
          count+=1
  return count
for i in range(h):
  line=list(input())
  mapdata.append(line)
for i in range(h):
  for j in range(w):
    if mapdata[i][j]=='.':
      k.append(get_bomb(i,j))
    else:
      k.append('#')
  result.append(k)
  k=[]
for i in range(len(result)):
  result2=','.join(result[i])
  print(result2)

### FIXED CODE ###

h,w=map(int,input().split())
mapdata=[]
for i in range(h):
  line=(str(input()))
  line2=list(line)
  mapdata.append(line2)
result=[]
k=[]
def get_bomb(i,j):
  count=0
  for x in (i-1,i,i+1):
    for y in (j-1,j,j+1):
      if 0<=x<=h-1 and 0<=y<=w-1:
        if mapdata[x][y]=='#':
          count+=1
  return count
for i in range(h):
  for j in range(w):
    if mapdata[i][j]=='.':
      k.append(str(get_bomb(i,j)))
    else:
      k.append('#')
  result.append(k)
  k=[]
for i in range(len(result)):
  result2=''.join(result[i])
  print(result2)
import math

N, X = list(map(int, input().split()))
xlist = list(map(int, input().split()))
xlist.append(X)
xlist.sort()

m = xlist[1] - xlist[0]
for i in range(1, len(xlist) - 1):
    d = xlist[i + 1] - xlist[i]
    m = math.gcd(d, m)
print(m)


### FIXED CODE ###

def gcd(a, b):
    if b > a:
        a, b = b, a
    c = a % b
    if (c == 0):
        return b
    return gcd(b, c)


N, X = list(map(int, input().split()))
xlist = list(map(int, input().split()))
xlist.append(X)
xlist.sort()

m = xlist[1] - xlist[0]
for i in range(1, len(xlist) - 1):
    d = xlist[i + 1] - xlist[i]
    m = gcd(d, m)
print(m)
n, t = map(int,input().split())
mydict = {}
for i in range(n):
	a, b = map(int,input().split())
	mydict.setdefault(a, b)
sortedDict = sorted(mydict.items())
k = 0
for j in sortedDict:
	k += 1
	if j[1] <= t:
		print(j[0])
		break
	if k == len(sortedDict):
		print("TLE")
		break


### FIXED CODE ###

n = int(input())
if n == 1:
	print("Hello World")
elif n == 2:
	a = int(input())
	b = int(input())
	print(a+b)
n, k = map(iht, input().split())
if k == 1:
  print(0)
else:
  print(n-k)

### FIXED CODE ###

n, k = map(int, input().split())
if k == 1:
  print(0)
else:
  print(n-k)
from math import floor, ceil
from math import gcd
# from fractions import gcd


def lcm(x, y):
    return x*y/gcd(x, y)


A, B, C, D = map(int, input().split())
LCM = lcm(C, D)

x = floor(B / C)
y = floor(B / D)
z = floor(B / LCM)
ans = B-x-y+z

x = floor((A-1) / C)
y = floor((A-1) / D)
z = floor((A - 1) / LCM)

ans -= (A - 1) - x - y + z

print(ans)


### FIXED CODE ###

from fractions import gcd


def lcm(x, y):
    return x*y//gcd(x, y)


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

LCM = lcm(C, D)

x = B//C
y = B // D
z = B // LCM
ans = B-x-y+z

x = (A-1) // C
y = (A-1) // D
z = (A-1) // LCM

ans -= (A-1) - x - y + z

print(ans)
num, select = map(int, input())
l = list(map(int, input()))

sum = 0
l = l.sort()
for i in l:
  sum += l[i]

print(sum)

### FIXED CODE ###

N_syu, K_ko = map(int, input().split())
prices = list(map(int, input().split()))

prices.sort()

sum = 0
for i in range(K_ko):
    sum += prices[i]
print(sum)
N, X = map(int, input().split())
a,p=[1],[1] for i in range(N):
  a.append(a[i] * 2 + 3)
  p.append(p[i] * 2 + 1)
def f(N,X): #X<=0やX>a_Nを許容し解説本文から簡略化
  if N == 0:
    return 0 if X <= 0 else 1
  elif X <= 1 + a[N-1]:
    return f(N-1, X-1)
  else:
    return p[N-1] + 1 + f(N-1, X-2-a[N-1])
print(f(N, X))


### FIXED CODE ###

a = input()
if a == "25":
  print("Christmas")
elif a == "24":
  print("Christmas Eve")
elif a == "23":
  print("Christmas Eve Eve")
elif a == "22":
  print("Christmas Eve Eve Eve")