Harryxun/stf_run huggingface dataset:
import bisect
N = int(input())
An = list(map(int,input().split(' '))) 

bit_list = [1]
for i in range(100000):
    bit_list.append(bit_list[i]*2)
    if bit_list[i+1] > 10**12:
        break
start_point = bisect.bisect_right(bit_list,An[-1])
keta_list = [0] * start_point

for A in An:
    abin = format(A, 'b')
    for i in range(len(abin)):
        if abin[i] == '1':
            keta_list[len(abin)-1-i] += 1
count = 0
for idx,keta_count in enumerate(keta_list):
    count += (start_point-keta_count) * bit_list[idx] % (1000000000+7)
print(count)

### FIXED CODE ###

import bisect
N = int(input())
An = list(map(int,input().split(' '))) 

bit_list = [1]
for i in range(100000):
    bit_list.append(bit_list[i]*2)
    if bit_list[i+1] > 2**60:
        break
start_point = bisect.bisect_right(bit_list,max(An))
keta_list = [0] *  start_point

for A in An:
    abin = format(A, 'b')
    for i in range(len(abin)):
        if abin[i] == '1':
            keta_list[len(abin)-1-i] += 1
count = 0
for idx,keta_count in enumerate(keta_list):
    count += (N-keta_count) * bit_list[idx] * keta_count
    count = count % (1000000000+7)
print(count)
import numpy as np
from scipy.sparse.csgraph import floyd_warshall

N,M,L=map(int,input().split())
INF = 1 << 31
dist=np.array([[INF for _ in range(N)] for _ in range(N)])

for i in range(N):
  dist[i][i]=0
  
for i in range(M):
  a,b,c=map(int,input().split())
  a-=1
  b-=1
  dist[a][b]=c
  dist[b][a]=c

dist = floyd_warshall(dist)

for i in range(N):
  for j in range(N):
    if dist[i][j]<=L:
      dist[i][j]=1
    else:
      dist[i][j]=0

dist = floyd_warshall(dist)
#dist[dist==INF]=0
#dist=dist.astype(int)
#print(dist)

Q=int(input())
ans=[0]*Q
for q in range(Q):
  s,t=map(int,input().split())
  s-=1
  t-=1
  ans[q]=int(dist[s][t]-1)

print(*ans,sep='\n')



### FIXED CODE ###

import numpy as np
from scipy.sparse.csgraph import floyd_warshall

N,M,L=map(int,input().split())
INF = 1 << 31
dist=np.array([[INF for _ in range(N)] for _ in range(N)])

for i in range(N):
  dist[i][i]=0
  
for i in range(M):
  a,b,c=map(int,input().split())
  a-=1
  b-=1
  dist[a][b]=c
  dist[b][a]=c

dist = floyd_warshall(dist)

for i in range(N):
  for j in range(N):
    if dist[i][j]<=L:
      dist[i][j]=1
    else:
      dist[i][j]=INF

dist = floyd_warshall(dist)
dist[dist==INF]=0
#dist=dist.astype(int)
#print(dist)

Q=int(input())
ans=[0]*Q
for q in range(Q):
  s,t=map(int,input().split())
  s-=1
  t-=1
  ans[q]=int(dist[s][t]-1)

for a in ans:
  print(-1 if a==INF else a)
n,k = map(int,input().split())
a = sorted(list(map(int,input().split())))
mod = 10**9+7
x = 10**10
count = 0
c=[]
for i in range(n):
    if a[i]!=x:
        if i != 0:
            c.append([x,count])
        x=a[i]
        count = 1
    else:
        count += 1
    
    if i==n-1:
        c.append([x,count])

fact = [1]*(n+1)
inv_fact = [1]*(n+1)
for i in range(n):
    fact[i+1] = fact[i]*(i+1)
    fact[i+1] %= mod
for i in range(n,0,-1):
    if i == n:
        inv_fact[i] = pow(fact[i],mod-2,mod)
    else:
        inv_fact[i] = inv_fact[i+1]*(i+1)
        inv_fact[i] %= mod
        
sum_min = 0
sum_max = 0
b = 0
for i,j in c:
    if n-b < k:
        break
    b += j
    for l in range(max(1,k-n+b),min(k,j)+1):
        d = i*fact[j]*inv_fact[j-l]*inv_fact[l]%mod
        d *= fact[k-j]*fact[n-b]*inv_fact[n-b-k+l]*inv_fact[k-l]%mod
        sum_min += d
        sum_min %= mod
b = 0
for i,j in c[::-1]:
    if n-b < k:
        break
    b += j
    for l in range(max(1,k-n+b),min(k,j)+1):
        d = i*fact[j]*inv_fact[j-l]*inv_fact[l]%mod
        d *= fact[k-j]*fact[n-b]*inv_fact[n-b-k+l]*inv_fact[k-l]%mod
        sum_max += d
        sum_max %= mod
        
print((sum_max-sum_min)%mod)

### FIXED CODE ###

import math
n = int(input())
xy = [list(map(int,input().split())) for _ in range(n)]
point = []
r = 0
for i in range(n-1):
    x1,y1=xy[i]
    for j in range(i+1,n):
        x2,y2=xy[j]
        d = ((x1-x2)/2)**2+((y1-y2)/2)**2
        if r**2 > d:
            if y1-y2 != 0:
                a = -(x1-x2)/(y1-y2)
                x = math.sqrt((r**2-d)/(a**2+1))//10**(-6)*10**(-6)
                point.append([(x1+x2)/2+x,(y1+y2)/2+a*x])
                point.append([(x1+x2)/2-x,(y1+y2)/2-a*x])
            else:
                x = math.sqrt(r**2-d)//1//10**(-6)*10**(-6)
                point.append([(x1+x2)/2,(y1+y2)/2+x])
                point.append([(x1+x2)/2,(y1+y2)/2-x])
        elif r**2 == d:
            point.append([(x1+x2)/2,(y1+y2)/2])

r_o = 800
r_i = 0
while r_o-r_i > 10**(-8):
    judge = 0
    while point:
        x,y = point.pop()
        c = 0
        for i,j in xy:
            if (x-i)**2+(y-j)**2 > r**2:
                c = 1
                break
        if c == 0:
            judge = 1
            break
            
    if judge == 1:
        r_o = r
    else:
        r_i = r
    r = (r_o+r_i)/2
    point = []
    for i in range(n-1):
        x1,y1=xy[i]
        for j in range(i+1,n):
            x2,y2=xy[j]
            d = ((x1-x2)/2)**2+((y1-y2)/2)**2
            if r**2 > d:
                if y1-y2 != 0:
                    a = -(x1-x2)/(y1-y2)
                    x = math.sqrt((r**2-d)/(a**2+1))//10**(-6)*10**(-6)
                    point.append([(x1+x2)/2+x,(y1+y2)/2+a*x])
                    point.append([(x1+x2)/2-x,(y1+y2)/2-a*x])
                else:
                    x = math.sqrt(r**2-d)//10**(-6)*10**(-6)
                    point.append([(x1+x2)/2,(y1+y2)/2+x])
                    point.append([(x1+x2)/2,(y1+y2)/2-x])
            elif r**2 == d:
                point.append([(x1+x2)/2,(y1+y2)/2])
    
print(r)
r1,c1,r2,c2 = map(int, input().split())
def find_power(n,mod=10**9+7):
    powlist=[0]*(n+1)
    powlist[0]=1
    powlist[1]=1
    for i in range(2,n+1):
        powlist[i]=powlist[i-1]*i%(mod)
    return powlist

def find_inv_power(n,mod=10**9+7):
    powlist=find_power(n)
    check=powlist[-1]
    first=1
    uselist=[0]*(n+1)
    secondlist=[0]*30
    secondlist[0]=check
    secondlist[1]=check**2
    for i in range(28):
        secondlist[i+2]=(secondlist[i+1]**2)%(10**9+7)
    a=format(10**9+5,"b")
    for j in range(30):
        if a[29-j]=="1":
            first=(first*secondlist[j])%(10**9+7)
    uselist[n]=first
    for i in range(n,0,-1):
        uselist[i-1]=(uselist[i]*i)%(10**9+7)
    return uselist

mod = 10**9+7
NUM = (10**6)+100
p_lis=find_power(NUM,mod)
ip_lis=find_inv_power(NUM,mod)

def comb(n,r,mod=10**9+7):
    if n<r:
        return 0
    elif n>=r:
        return (p_lis[n]*ip_lis[r]*ip_lis[n-r])%(mod)
def g(x,y):
    return comb(x+y+2,y+1)-1

ans=g(r2,c2) - g(r1-1,c2) - g(r2,c1-1) + g(r1-1,c1-1)
mod=10**9+7
print(ans%mod)

### FIXED CODE ###

r1,c1,r2,c2 = map(int, input().split())
def find_power(n,mod=10**9+7):
    powlist=[0]*(n+1)
    powlist[0]=1
    powlist[1]=1
    for i in range(2,n+1):
        powlist[i]=powlist[i-1]*i%(mod)
    return powlist

def find_inv_power(n,mod=10**9+7):
    powlist=find_power(n)
    check=powlist[-1]
    first=1
    uselist=[0]*(n+1)
    secondlist=[0]*30
    secondlist[0]=check
    secondlist[1]=check**2
    for i in range(28):
        secondlist[i+2]=(secondlist[i+1]**2)%(10**9+7)
    a=format(10**9+5,"b")
    for j in range(30):
        if a[29-j]=="1":
            first=(first*secondlist[j])%(10**9+7)
    uselist[n]=first
    for i in range(n,0,-1):
        uselist[i-1]=(uselist[i]*i)%(10**9+7)
    return uselist

mod = 10**9+7
NUM = (2*10**6)+100
p_lis=find_power(NUM,mod)
ip_lis=find_inv_power(NUM,mod)

def comb(n,r,mod=10**9+7):
    if n<r:
        return 0
    elif n>=r:
        return (p_lis[n]*ip_lis[r]*ip_lis[n-r])%(mod)
def g(x,y):
    return comb(x+y+2,y+1)-1

ans=g(r2,c2) - g(r1-1,c2) - g(r2,c1-1) + g(r1-1,c1-1)
print(ans%mod)
n = input()
 
d = [0 for i in range(n)]
f = [0 for i in range(n)]
X = [0 for i in range(n)]
M = [[0 for i in range(n)] for j in range(n)]
color = [0 for i in range(n)]
t = 0
 
def DFS_v(u):
    color[u] = 1
    t += 1
    d[u] = t
    for v in range(n):
        if M[u][v] == 1 and color[v] == 0:
            DFS_visit(v)
    color[u] == 2
    t += 1
    f[u] = t
 
def DFS():
    for u in range(n):
        if st[u] == 0:
            DFS_v(u)
    for u in range(n):
        print u+1, d[u], f[u])
     
for i in range(n):
    X = map(int, raw_input().split())
    for j in range(X[1]):
        M[X[0]-1][X[2+j]-1] = 1
 
DFS()
    

### FIXED CODE ###

n = int(raw_input())
 
d = [0 for i in range(n)]
f = [0 for i in range(n)]
G = [0 for i in range(n)]
M = [[0 for i in range(n)] for j in range(n)]
col = [0 for i in range(n)]
t = [0]
 
def DFS_visit(u):
    col[u] = 1
    t[0] += 1
    d[u] = t[0]
    for v in range(n):
        if M[u][v] == 1 and col[v] == 0:
            DFS_visit(v)
    col[u] = 2
    t[0] += 1
    f[u] = t[0]
 
def DFS():
    for u in range(n):
        if col[u] == 0:
            DFS_visit(u)
    for u in range(n):
        print'{0} {1} {2}'.format(u+1, d[u], f[u])
     
for i in range(n):
    X = map(int, raw_input().split())
    for j in range(X[1]):
        M[X[0]-1][X[2+j]-1] = 1
 
DFS()
X,A,B = map(int,input().split())
 
if A > B:
    print("delicious")
elif A < B and B-A < X+1:
    print("safe")
elif A < B and B-A > X+1
    print("dangerous")

### FIXED CODE ###

X,A,B = map(int,input().split())
 
if B-A <=0:
    print("delicious")
elif B - A - X <=0:
    print("safe")
else:
    print("dangerous")
l=[int(input()) for _ in range(int(input()))]
x=l[0]
cnt=1
while l[x]!=2:
  if(l[x]==0 or len(l)==cnt):
    print(-1)
    exit()
  index=l[x]
  l[x]=0
  x=int(index-1)
  cnt+=1
print(cnt)

### FIXED CODE ###

n=int(input())
A=list(int(input()) for i in range(n))
a=0
for x in range(n):
  a=A[a]-1
  if a==1:
    print(x+1)
    break
else:
  print(-1)
n, k = map(int, input().split())
a = list(map(int, input().split()))
pmax, m = 1, 1e9+7
for i in range(k):
    pmax *= a[i]
    pmax %= m
prev = pmax
for i in range(1, n-k+1):
    curr = (prev / a[i-1]) * a[i-k+1]
    curr %= m
    pmax = max(pmax, curr)
    prev = curr
print(int((pmax + m) % m))

### FIXED CODE ###

def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    mod = 10**9+7
    ans = 1
    s, t = [], []
    for i in range(n):
        if a[i] < 0:
            t.append(a[i])
        else:
            s.append(a[i])
    # s, t = [i for i in a if i > 0], [j for j in a if j < 0]

    S, T = len(s), len(t)
    ok = False

    if S > 0:
        if n == k:
            ok = (T % 2 == 0)
        else:
            ok = True
    else:
        ok = (k % 2 == 0)

    if not ok:
        a.sort(key=abs)
        for i in range(k):
            ans *= a[i]
            ans %= mod
    else:
        s.sort()
        t.sort(reverse=True)
        if k % 2 == 1:
            ans *= s.pop()
            ans %= mod
        p = []
        while len(s) >= 2:
            x = s.pop()
            x *= s.pop()
            p.append(x)
        while len(t) >= 2:
            x = t.pop()
            x *= t.pop()
            p.append(x)
        p.sort(reverse=True)
        for i in range(k//2):
            ans *= p[i]
            ans %= mod
    print(ans % mod)


if __name__ == '__main__':
    main()
from collections import defaultdict

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

if M == 0:
    print(X)
    exit()

ans = X
x = X

m = []
for i in range(0, M+1):
    m.append((i ** 2) % M)

C = [x]
Xd = defaultdict(lambda: -1)
Xd[x] = 0
Xl = [x]

for i in range(1, N):
    
    x = m[x]

    if Xd[x] > -1:
        # print(i)
        break
    Xd[x] = i
    Xl.append(x)
    ans += x
    C.append(ans)

# print(Xl)
# print(C)
# print(Xd[x], i)
S = C[i-1] - C[Xd[x]-1]
loop_len = i - Xd[x]
if loop_len > 0:
    loop_num = (N - i) // loop_len
    # print(loop_num)
    ans += loop_num * S
    m = N - loop_num * loop_len - i
    # print(ans)
    # print(m)
    ans += C[Xd[x]+m-1] - C[Xd[x]-1]

# print(S)

print(ans)

### FIXED CODE ###

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

ans = X
x = X

C = [0, x]
Xd = [-1] * (M+1)
Xd[x] = 0
i = 1

for i in range(1, N):
    x = x**2 % M

    if Xd[x] > -1:
        break
    Xd[x] = i
    ans += x
    C.append(ans)

loop_len = i - Xd[x]
if loop_len > 0:
    S = C[i] - C[Xd[x]]
    loop_num = (N - i) // loop_len
    ans += loop_num * S
    m = N - loop_num * loop_len - i
    ans += C[Xd[x]+m] - C[Xd[x]]

print(ans)
from collections import defaultdict
d = defaultdict(int)
n, *a = map(int,open(0))
for i in a:
  d[i] += 1
l = list(d.key())
l.sort()
m = l[-1]
if d[m] == 1:
  i = a.index(m)
  [print(m) for j in range(i)]
  print(l[-2])
  [print(m) for j in range(n-i-1)]
else:
  [print(m) for i in range(n)]

### FIXED CODE ###

from collections import defaultdict
d = defaultdict(int)
n, *a = map(int,open(0))
for i in a:
  d[i] += 1
l = list(d.keys())
l.sort()
m = l[-1]
if d[m] == 1:
  i = a.index(m)
  [print(m) for j in range(i)]
  print(l[-2])
  [print(m) for j in range(n-i-1)]
else:
  [print(m) for i in range(n)]
#ABC116D-VariousSushi.py

import sys
import numpy as np

input = sys.stdin.readline

N, K = [int(n) for n in input().split()]
INPUT = [[None for i in range(2)] for j in range(N)]
List1, List2 = [], []
kind1, kind2 = [], []

for i in range(N):
    INPUT[i][0], INPUT[i][1] = [int(m) for m in input().split()]

INPUT = sorted(INPUT, key = lambda x: x[1], reverse=True)

for i in range(N):
    if INPUT[i][0] not in kind1:
        if len(List1) < K:
            List1.append(INPUT[i][1])
            kind1.append(INPUT[i][0])
    elif INPUT[i][0] not in kind2:
        List2.append(INPUT[i][1])
        kind2.append(INPUT[i][0])

List2.sort()

kindnumber = len(kind1)
k = len(List2)-(K-kindnumber)

Score = np.sum(List1) + np.sum(List2[k:]) + kindnumber ** 2
del List2[k:]
Test = Score

for i in range(kindnumber):
    Test = Test - List1.pop() + List2.pop() - 2 * kindnumber + 1
    kindnumber = kindnumber - 1
    if Test >= Score:
        Score = Test
    if List2 == []:
        break

print(int(Score))


### FIXED CODE ###

#ABC116D-VariousSushi.py

from sys import stdin
#from numpy import sum

input = stdin.readline

N, K = list(map(int, input().split()))
List1= []
kind = set()
point1, point2 = 0, 0

INPUT = [tuple(map(int, input().split())) for _ in range(N)]

INPUT.sort(key = lambda x: -x[1])

for ti, di in INPUT[:K]:
    point1 += di
    if ti in kind:
        List1.append(di)
    kind.add(ti)

point2 = len(kind)

Score = point1 + point2**2
Test = Score

List1POP = List1.pop

for ti, di in INPUT[K:]:
    if 0 >= len(List1):
        break
    if ti in kind:
        continue
    Test = Test - List1POP() + di + 2 * point2 + 1
    point2 += 1
    kind.add(ti)
    Score = max(Score, Test)

print(Score)
s = input().split()
output = -1
if (0 < s[0] and s[0] < 10 and 0 < s[1] and s[1] < 10):
  output = s[0]*s[1]
  
return output;

### FIXED CODE ###

s = input().split()
output = -1
s0 = int(s[0]) 
s1 = int(s[1]) 
if (0 < s0 and s0 < 10 and 0 < s1 and s1 < 10):
  output = s0*s1
  
print(output);
a, b, c = map(int, input().split())

if a + b == c or b + c == a or c + a == b:
    print('Yes')
else:
    print('No')
a, b, c = map(int, input().split())

if a + b == c or b + c == a or c + a == b:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

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

if a + b == c or b + c == a or c + a == b:
    print('Yes')
else:
    print('No')
N = int(input())
if n % 2 == 1:
	print (((n+1)/2) /n)
else:
	print ((n/2)/n)

### FIXED CODE ###

n = int(input())
if n % 2 != 0:
	print (((n+1)/2) /n)
else:
	print ((n/2)/n)
bingo = np.zeros([3,3])
check = np.zeros([3,3])
choice = []
flag = "N0"

for i in range(3):
    a = input().split()
    a = [int(x) for x in a]
    bingo[i] = a
N = int(input())
for i in range(N):
    choice.append(int(input()))

convert = bingo.reshape([9])
for i in range(9):
    for j in range(N):
        if(convert[i] == j):
            ckeck[i//3][i%3] = 1
            continue

for i in range(3):
    if(check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1):
        ok = "Yes"
    elif(check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1)
        ok = "Yes"
if(check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1):
    ok = "Yes"
elif(check[2][0] == 1 and check[1][1] == 1 and check[0][2] == 1):
    ok = "Yes"

print(ok)


### FIXED CODE ###

import numpy as np

bingo = np.zeros([3,3])
check = np.zeros([3,3])
choice = []
flag = "No"

for i in range(3):
    a = input().split()
    a = [int(x) for x in a]
    bingo[i] = a
N = int(input())
for i in range(N):
    choice.append(int(input()))

convert = bingo.reshape([9])
for i in range(9):
    for j in choice:
        if(convert[i] == j):
            check[i//3][i%3] = 1
            continue

            
for i in range(3):
    if(check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1):
        flag = "Yes"
    elif(check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1):
        flag = "Yes"
if(check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1):
    flag = "Yes"
elif(check[2][0] == 1 and check[1][1] == 1 and check[0][2] == 1):
    flag = "Yes"

print(flag)
N, K = map(int, input().split())
h = [int(input()) for _ in range(N)]
h = sorted(h)
print(min(h[i+K-1]-h[i] for i in range(N-K+1)))


### FIXED CODE ###

str = "Christmas"
for i in range(25-int(input())):
    str += " Eve"
print(str)
X=input().split(" ")
print(X[0]*X[1])

### FIXED CODE ###

X=input().split(" ")
print(int(X[0])*int(X[1]))
a, b = raw_input()

if  a > b :
print "a > b"
if  a < b :
print "a < b"
if  a == b :
print "a == b"

### FIXED CODE ###

a,b=map(int,raw_input().split())
if a > b:
    print 'a > b'
elif a < b:
    print 'a < b'
else:
    print 'a == b'
from sys import stdin
readline = stdin.readline

def main():
    H, W, M = map(int, readline().rstrip().split())
    HW = [[0] * (W + 1) for _ in range(H + 1)]
    HS = set()
    WS = set()
    for _ in range(M):
        h, w = map(int, readline().rstrip().split())
        HW[h][w] = 1
        HW[h][0] += 1
        HS.add(h)
        HW[0][w] += 1
        WS.add(w)

    ans = 0
    for h in HS:
        for w in WS:
            tmp = HW[h][0] + HW[0][w]
            if HW[h][w] == 1:
                tmp -= 1
            ans = max(ans, tmp)
    print(ans)

if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    import sys
    from collections import defaultdict
    readline = sys.stdin.readline

    H, W, M = map(int, readline().rstrip().split())
    HB = [0] * H
    WB = [0] * W
    HW = defaultdict(lambda : False)
    for _ in range(M):
        h, w = map(int, readline().rstrip().split())
        h -= 1
        w -= 1
        HW[(h,w)] = True
        HB[h] += 1
        WB[w] += 1
    hb = max(HB)
    max_h = [i for i, x in enumerate(HB) if x == hb]
    wb = max(WB)
    max_w = [i for i, x in enumerate(WB) if x == wb]
    
    ans = hb + wb
    for mh in max_h:
        for mw in max_w:
            if HW[(mh, mw)] == False:
                print(ans)
                sys.exit(0)
    print(ans - 1)

if __name__ == "__main__":
    main()
N = input()
print((N-2)*180)

### FIXED CODE ###

N = int(input())
print((N-2)*180)
a,b,c,d=map(int,input().split())
[["Balanced,"Left"][a+b>c+d],"Right"][a+b<c+d]

### FIXED CODE ###

a,b,c,d=map(int,input().split())
print([["Balanced","Left"][a+b>c+d],"Right"][a+b<c+d])
# -*- coding: utf-8 -*-
w = raw_input().upper()
c = 0
while 1:
 t = raw_input().upper()
 if t=="END_OF_TEXT": break
 tt = t.split()
 c += tt.count(w)
print c

### FIXED CODE ###

# -*- coding: utf-8 -*-
w = raw_input().upper()
c = 0
while 1:
 t = raw_input()
 if t=="END_OF_TEXT": break
 c += t.upper().split().count(w)
print c
firstNum = int(input())
numList = list(map(int, input().split())):
flag = 0
count = 0

while flag==0:
    for i in range(firstNum):
        if numList[i]%2 != 0:
            flag = 1

    if flag == 1:
        break
    
    if flag == 0:
        for j in range(firstNum):
            numList[j] = numList[j]/2
    
    count += 1

print(count)

### FIXED CODE ###

def a(n):
    ans = 0
    while n%2==0:
        n = n/2
        ans += 1
    
    return ans

num = int(input())

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

ans = min(map(a,nums))

print(ans)
a,b=map(int,input().split())
x=[]
for i in range(b-a+1,b+a):
  x.append(i)
print(''.join(x),sep=' ')

### FIXED CODE ###

a,b=map(int,input().split())
x=[]
for i in range(b-a+1,b+a):
  x.append(str(i))
print(' '.join(x))
import sys
def b(bs, cs):
    #print(bs, xs[len(bs):])
    d = set()
    bl, cl = len(bs), len(cs)
    bi, ci = 0, 0
    while True:
      if bs[bi] > cs[ci]:
        bi += 1
        bs.append(cs[ci])
        del cs[ci]
      else:
        ci += 1
      if bi == bl or ci == len(cs):
        break
    if len(bs) != 2 * bl:
      print("No")
      sys.exit()
    return bs, cs

n=int(input())
xs = sorted(list(map(int,input().split())))[::-1]
bs, cs = xs[:1], xs[1:]
for _ in range(n):
    bs, cs = b(sorted(bs)[::-1], sorted[cs][::-1])

print("Yes")




### FIXED CODE ###

import sys
def b(bs, cs):
    d = set()
    bl, cl = len(bs), len(cs)
    bi, ci = 0, 0
    ncs = []
    while True:
      if bs[bi] > cs[ci]:
        bs.append(cs[ci])
        bi += 1
      else:
        ncs.append(cs[ci])
      ci += 1
      if bi == bl or ci == cl:
        break
    if len(bs) != 2 * bl:
      print("No")
      sys.exit()
    return bs, ncs + cs[ci:]

n=int(input())
xs = sorted(list(map(int,input().split())))[::-1]
bs, cs = xs[:1], xs[1:]
for _ in range(n):
    bs, cs = b(sorted(bs)[::-1], cs)

print("Yes")
N,M = map(int,input().split())

P = []
Y = []

for i in range(M):
    p,y = map(int,input().split())
    P.append(p)
    Y.append(y)

A = [0]*M
C = [0]*M

B = [0]*M
for i in range(M):
    B[i] = Y[i]*100000+i

B.sort()

for i in range(M):
    d = B[i] % 100000
    if d < 0:
        print(0)
        exit()
    k = P[d] - 1

    C[d] = A[k]
    A[k] += 1

for i in range(M):
    print('%06d%06d' % (P[i],C[i]+1))


### FIXED CODE ###

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

P = [0]*M
Y = [0]*M

for i in range(M):
    P[i],Y[i] = map(int,input().split())

A = [0]*N
C = [0]*M

B = [0]*M
for i in range(M):
    B[i] = Y[i]*100000+i

B.sort()

for i in range(M):
    d = B[i] % 100000
    k = P[d] - 1

    C[d] = A[k]
    A[k] += 1

for i in range(M):
    print('%06d%06d' % (P[i],C[i]+1))
n = int(input())

print(int((n-1)*n/2))


### FIXED CODE ###

S = input()
T = input()
count = 0

for n in range(3):
    if S[n] == T[n]:
        count += 1

print(count)
import math as m
a, b = list(map(int, input().split()))
bin_b = bin(b)[2:]
bin_a = bin(a)[2:].zfill(len(bin_b))
ans = []
for i in range(int(m.log2(b))+1):
    cnt = b-a+1
    d = {-1:0,1:0}
    ai = bin_a[-(i+1)]
    if ai == "0":
        ai = -1
    else:
        ai = 1
    if i == 0:
        hoge = 0
        if ai == 1:
            hoge = (cnt+1)//2
        else:
            hoge = cnt//2
        if hoge%2:
            ans.append(1)
        else:
            ans.append(0)
        continue
    ai_1 = int(bin_a[-i:],2) if i >0 else 0
    start = 2**i - ai_1
    if start >= cnt:
        d[ai] += cnt
        cnt = 0
    else:
        d[ai] += start
        cnt -= start
    ai *= -1
    hoge = cnt//(2**i)
    fuga = cnt % (2**i)
    if hoge%2:
        ai *= -1
    d[ai] += fuga
    if d[1]%2:
        ans.append(1)
    else:
        ans.append(0)
e = int("".join(map(str,ans[::-1])), 2)
print(e)

### FIXED CODE ###

a, b = list(map(int, input().split()))
bin_b = bin(b)[2:]
bin_a = bin(a)[2:].zfill(len(bin_b))
ans = []
for i in range(len(bin_b)):
    cnt = b-a+1
    d = {-1:0,1:0}
    ai = bin_a[-(i+1)]
    if ai == "0":
        ai = -1
    else:
        ai = 1
    if i == 0:
        hoge = 0
        if ai == 1:
            hoge = (cnt+1)//2
        else:
            hoge = cnt//2
        if hoge%2:
            ans.append(1)
        else:
            ans.append(0)
        continue
    ai_1 = int(bin_a[-i:],2) if i >0 else 0
    start = 2**i - ai_1
    if start >= cnt:
        d[ai] += cnt
        cnt = 0
    else:
        d[ai] += start
        cnt -= start
    ai *= -1
    hoge = cnt//(2**i)
    fuga = cnt % (2**i)
    if hoge%2:
        ai *= -1
    d[ai] += fuga
    if d[1]%2:
        ans.append(1)
    else:
        ans.append(0)
e = int("".join(map(str,ans[::-1])), 2)
print(e)