n = int(eval(input()))

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

if(len(d)%2 == 0):

    d.sort()

    t = int(len(d)/2)-1

    s = d[t]

    m = s

    i = t

    while (d[t+1] > s):

        s += 1

    print((s-m))

else:

    print((0))
n = int(eval(input()))

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

if(len(d)%2 == 0):

    d.sort()

    t = int(len(d)/2)-1

    print((d[t+1] - d[t]))

else:

    print((0))
n = int(eval(input()))
d = list(map(int, input().split()))
if len(d) % 2 == 0:
    d.sort()
    t = int(len(d) / 2) - 1
    s = d[t]
    m = s
    i = t
    while d[t + 1] > s:
        s += 1
    print((s - m))
else:
    print((0))

n = int(eval(input()))
d = list(map(int, input().split()))
if len(d) % 2 == 0:
    d.sort()
    t = int(len(d) / 2) - 1
    print((d[t + 1] - d[t]))
else:
    print((0))

-    s = d[t] -    m = s -    i = t -    while d[t + 1] > s: -        s += 1 -    print((s - m)) +    print((d[t + 1] - d[t]))