Harryxun/stf_run huggingface dataset:
N,K = map(int,input().split())
list1 = []
for i in range(N):
    list1.append(list(map(int,input().split())))
list1.sort()
list2 = []
for j in range(N):
    list2 += [list1[j][0]]*list1[j][1]
    if len(list2) >= K:
        break
print(list2[K-1])

### FIXED CODE ###

A,B,C = map(int,input().split())
if C >= A and C<= B:
    print("Yes")
else:
    print("No")
N = int(input())
list = []*(N+1)

M =int((N-2)**0.5)
for x in range(1,M+1):
    for y in range(1,M+1):
        for z in range(1,M+1):
            p = (x+y)*(x+z)+y**2+z**2
            if p > N:
                break
            else:
                list[p] = list[p] + 1
for i in range(1,N+1):
    print(list[i])

### FIXED CODE ###

N = int(input())
lst = [0]*(N+1)

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            p = (x+y)*(x+z)+y**2+z**2
            if p > N:
                break
            else:
                lst[p] += 1
for i in range(1,N+1):
    print(lst[i])
N=int(input())
S=input()
ans=0
for i in range(N):
    if S[i]=='A':
        if S[i+1]=='B':
            if S[i+2]=='C':
                ans+=1
print(ans)

### FIXED CODE ###

N=int(input())
S=input()
ans=0
for i in range(N):
    if S[i]=='A':
        if i+1<N and S[i+1]=='B':
            if i+2<N and S[i+2]=='C':
                ans+=1
print(ans)
h,w=map(int,input().split())
A=[list(input()) for i in range(h)]
B=set()
for i in range(w):
  for j in range(h):
    if A[i][j]=="#":
      B.add((i,j))
count=0
while len(B)<h*w:
  C=set()
  for b in B:
    if b[0]>0:
      C.add((b[0]-1,b[1]))
    if b[1]<w-1:
      C.add((b[0],b[1]+1))
    if b[0]<h-1:
      C.add((b[0]+1,b[1]))
    if b[1]>0:
      C.add((b[0],b[1]-1))
  B=B.union(C)
  count+=1
print(count)

### FIXED CODE ###

import sys
input = sys.stdin.readline
h,w=map(int,input().split())
A=[[False]*(w+2) for _ in range(h+2)]
chk,chk2=[],[]
for i in range(h):
  s=input()
  for j in range(w):
    A[i+1][j+1]=(s[j]==".")
    if s[j]=="#":
      chk.append((i+1,j+1))
ans=0
d=((1,0),(0,1),(-1,0),(0,-1))
while chk:
  for cx,cy in chk:
    for dx, dy in d:
      if A[cx+dx][cy+dy]==True:
        chk2.append((cx+dx,cy+dy))
        A[cx+dx][cy+dy]=False
  if chk2:
    ans+=1
  chk=chk2
  chk2=[]
print(ans)
import sys

sys.setrecursionlimit(10 ** 5 * 2)

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

def paint_col(adj, cols, i, col):
    cols[i] = col

    for child in adj[i]:
        if cols[child] == 0:
            paint_col(adj, cols, child, col)

def solve():
    n, m = map(int, input().split())
    adj = [[] for i in range(n)]

    for i in range(m):
        s, t = map(int, sys.stdin.readline().split())
        adj[s].append(t)
        adj[t].append(s)

    cols = [0] * n
    col = 1

    for i in range(n):
        if cols[i] == 0:
            paint_col(adj, cols, i, col)
            col += 1

    # debug(cols, locals())

    q = int(input())

    for i in range(q):
        s, t = map(int, sys.stdin.readline().split())

        if cols[s] == cols[t]:
            print('yes')
        else:
            print('no')

    pass

if __name__ == '__main__':
    solve()

### FIXED CODE ###

import sys

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

def paint_col(adj, cols, i, col):
    nxt = [i]

    while nxt:
        u = nxt[-1]
        try:
            v = next(adj[u])
            if cols[v] == 0:
                cols[v] = col
                nxt.append(v)
        except StopIteration:
            nxt.pop()
            cols[u] = col

def solve():
    n, m = map(int, sys.stdin.readline().split())
    adj = [[] for i in range(n)]

    for i in range(m):
        s, t = map(int, sys.stdin.readline().split())
        adj[s].append(t)
        adj[t].append(s)

    cols = [0] * n
    col = 1
    adj = list(map(iter, adj))

    for i in range(n):
        if cols[i] == 0:
            paint_col(adj, cols, i, col)
            col += 1

    # debug(cols, locals())

    q = int(sys.stdin.readline())

    for i in range(q):
        s, t = map(int, sys.stdin.readline().split())

        if cols[s] == cols[t]:
            ans = 'yes'
        else:
            ans = 'no'

        print(ans)

if __name__ == '__main__':
    solve()
str = input()
for i in range(0x61,0x7b):
    print("%c : %d", %(i,str.count(str(i))))


### FIXED CODE ###

import sys

data = sys.stdin.read()
for i in range(0x61,0x7b):
    print("%c : %d"  %(i,data.lower().count(chr(i))))
S=input()
N=len(S)

if "C" in S and "F" in S:
  print("No")
else:
  c=S.index("C")
  S=S[::-1]
  f=N-S.index("F")-1
  #print(c,f)
  print("Yes" if c<f else "No")



### FIXED CODE ###

S=input()
N=len(S)

if "C" in S and "F" in S:
  c=S.index("C")
  S=S[::-1]
  f=N-S.index("F")-1
  #print(c,f)
  print("Yes" if c<f else "No")
else: 
  print("No")
x,a = mao(int,input())
if x >= a:
  print(10)
else:
  print(0)

### FIXED CODE ###

x,a = map(int,input().split())
if x >= a:
  print(10)
else:
  print(0)
len = int(input())
s = input()
s1 = s[:len / 2]
s2 = s[len/2:]
if s1 == s2:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

l = int(input())
s = input()
s1 = s[:l // 2]
s2 = s[l//2:]
if s1 == s2:
    print('Yes')
else:
    print('No')
from fractions import gcd

N = int(input())
T = []
for i in range(N):
  T.append(int(input()))

res = 1
for t in T:
  res = int(res * t /(gcd(res, t)))
print(res)

### FIXED CODE ###

from fractions import gcd

N = int(input())
T = []
for i in range(N):
  T.append(int(input()))

res = 1
for t in T:
  res = res // gcd(res, t) * t
print(res)
k = int(input())
a,b = map(int,input().split())1
for i in range(a,b+1):
  if i%k == 0:
    print('OK')
    break
  if i == b:
    print('NG')

### FIXED CODE ###

k = int(input())
a,b = map(int,input().split())
for i in range(a,b+1):
  if i%k == 0:
    print('OK')
    break
  if i == b:
    print('NG')
N=int(input())
a=[int(input()) for i in range(N)]
X=1
i=1
while a[i-1]!=2 and X<=n:
    X+=1
    i=a[i-1]
if X>N:
  print(-1)
else:
  print(X)

### FIXED CODE ###

N=int(input())
a=[int(input()) for _ in range(N)]
X=1
i=1
while a[i-1]!=2 and X<=N:
    X+=1
    i=a[i-1]
if X>N:
  print(-1)
else:
  print(X)
N = int(input())
A = list(map(int,input().split()))
S = []
import heapq
for i in range(N+1):
    P = A[:(N+i)]
    Q = A[(N+i):]
    for l in range(len(Q)):
        Q[l] *= -1
    heapq.heapify(P)
    heapq.heapify(Q)
    j = 0
    k = 0
    while j < i:
        heapq.heappop(P)
        j += 1
    while k < N-i:
        heapq.heappop(Q)
        k += 1
    s = sum(P) + sum(Q)
    S.append(s)
ans = max(S)
print(ans)


### FIXED CODE ###

W,H = map(int,input().split())
ans = 10**30
for i in range(1,W):
    a = H*i
    w = W - i
    b = max((w//2)*H,w*(H//2))
    c = w*H - b
    x = max(a,b,c) - min(a,b,c)
    ans = min(ans,x)
for i in range(1,H):
    a = W*i
    h = H - i
    b = max((W//2)*h,W*(h//2))
    c = h*W - b
    x = max(a,b,c) - min(a,b,c)
    ans = min(ans,x)
print(ans)
row1 = list(map(str, input().split()))
row2 = list(map(str, input().split()))
row3 = list(map(str, input().split()))
matrix = [row1, row2, row3]
print(matrix[0][0]+matrix[1][1]+matrix[2][2])

### FIXED CODE ###

row1 = input()
row2 = input()
row3 = input()
print(row1[0]+row2[1]+row3[2])
ary = input().split().sort()
print("{} {} {}".format(ary[0], ary[1], ary[2]))

### FIXED CODE ###

ary=list(map(int, input().split()))
ary.sort()
print("{} {} {}".format(ary[0], ary[1], ary[2]))
a=[]
while True:
 n = raw_input()
  if n == "0":
   break
  a.append(n)
for i in range(len(a)):
 print(f'Case{i+1}: {a[i]}')

### FIXED CODE ###

import sys
i=1
for e in sys.stdin:
 if'0\n'==e:break
 print(f'Case {i}: {e[:-1]}');i+=1
import sys
input=sys.stdin.readline
sys.setrecursionlimit(100000)
n,q=map(int,input().split())
g=[[i] for i in range(n+1)]

for _ in range(n-1):
    a,b=map(int,input().split())
    g[a].append(b)

c=[0]*(n+1)
def dfs(p,x):
    for i in g[p]:
        if r[i]:
            r[i]=0
            c[i]+=x
            dfs(i,x)

for _ in range(q):
    r=[1]*(n+1)
    p,x=map(int,input().split())
    dfs(p,x)


print(*c[1:])


### FIXED CODE ###

import sys
input=sys.stdin.readline
sys.setrecursionlimit(1000000)

n,q=map(int,input().split())
g=[[] for _ in range(n+1)]

for _ in range(n-1):
    a,b=map(int,input().split())
    g[a].append(b)
    g[b].append(a)
c=[0]*(n+1)
que=[1]
done=[0]*(n+1)
done[1]=1
for _ in range(q):
    p,x=map(int,input().split())
    c[p]+=x
while que:
    d=que.pop()
    for node in g[d]:
        if not done[node]:
            c[node]+=c[d]
            que.append(node)
            done[node]+=1
print(*c[1:])
k = input()
s = input()

l = len(s)

if k >= l:
   print(k)
else:
  print(s[k - 1] + '...')

### FIXED CODE ###

k = int(input())
s = input()

l = len(s)

if k >= l:
   print(s)
else:
  print(s[:k] + '...')
from bisect import bisect_right, bisect_left
n, m = map(int, input().split())
cards = [int(i) for i in input().split()]
cards.sort()
manu = []
for i in range(m):
    b, c = map(int, input().split())
    manu.append((b, c))

manu.sort(reverse=True, key=lambda x: x[1]) # 変更すると大きいモノから行う。
p = 0
for b, c in manu:
    if cards[p] < c and p < n:
        for i in range(b):
            if p + i < n and cards[p + i] < c:
                cards[p + i] = c
        p += b
    else:
        break
ans = sum(cards)
print(ans)

### FIXED CODE ###

from bisect import bisect_right, bisect_left
n, m = map(int, input().split())
cards = [int(i) for i in input().split()]
cards.sort()
manu = []
for i in range(m):
    b, c = map(int, input().split())
    manu.append((b, c))

manu.sort(reverse=True, key=lambda x: x[1]) # 変更すると大きいモノから行う。
p = 0
for b, c in manu:
    if p < n and cards[p] < c:
        for i in range(b):
            if p + i < n and cards[p + i] < c:
                cards[p + i] = c
        p += b
    else:
        break
ans = sum(cards)
print(ans)
a, b, m = map(int, input().split())
priceOfMicrowaves = map(int, input().split())
priceOfRefrigerators = map(int, input().split())
priceTable = [list(map(int,input().split())) for i in range(m)]

cheepest = priceOfMicrowaves[0] + priceOfRefrigerators[0]
for p in priceOfMicrowaves:
    for q in priceOfRefrigerators:
        if p + q < cheepest:
            cheepest = p + q
    
for price in priceTable:
    if priceOfMicrowaves[price[0]-1]+priceOfRefrigerators[price[1]-1]-price[2] < cheepest:
        cheepest = priceOfMicrowaves[price[0]-1]+priceOfRefrigerators[price[1]-1]-price[2]
        
print(cheepest)

### FIXED CODE ###

a, b, m = map(int, input().split())
priceOfMicrowaves = list(map(int, input().split()))
priceOfRefrigerators = list(map(int, input().split()))
priceTable = [list(map(int,input().split())) for i in range(m)]
cheepest = priceOfMicrowaves[0] + priceOfRefrigerators[0]
for price in priceTable:
    if priceOfMicrowaves[price[0]-1]-price[2] >= cheepest:
        continue
    elif priceOfRefrigerators[price[1]-1]-price[2] >= cheepest:
        continue
    elif priceOfMicrowaves[price[0]-1]+priceOfRefrigerators[price[1]-1]-price[2] < cheepest:
        cheepest = priceOfMicrowaves[price[0]-1]+priceOfRefrigerators[price[1]-1]-price[2]
if cheepest > min(priceOfMicrowaves) + min(priceOfRefrigerators):
    cheepest = min(priceOfMicrowaves) + min(priceOfRefrigerators)
print(cheepest)
X, Y = map(int, input().split())
mod = 10**9+7
b = (2*Y-X)//3
a = Y - 2*b
max_num = a + b + 1
facts = [1 for i in range(max_num)]
invs = [1 for i in range(max_num)]
 
def inv(x):
    return pow(x,mod-2,mod)
 
for i in range(1,max_num):
    facts[i] = facts[i-1]*i%mod
    invs[i] = inv(facts[i])
 
def nCk(n,k):
    return facts[n]*invs[k] * invs[n-k] % mod

def nHk(n, k):
  return nCk(n-1+k, n-1)

if (X+Y)%3 == 0:
    print(nCk(a+b, a))
else:
    print(0)

### FIXED CODE ###

def sq(a, b, mod):  # aのb乗を剰余,kは初期値#20191116-D-Knight
    if b == 0:
        return 1
    elif b % 2 == 0:
        return sq(a, b // 2, mod)**2 % mod
    else:
        return sq(a, b - 1, mod) * a % mod


def nCk(n, k, mod=10**9 + 7):
    x = max(k, n - k)
    y = min(k, n - k)
    kkai = 1
    for i in range(2, y + 1):
        kkai = (kkai * i) % mod
    nkkai = 1
    for i in range(x + 1, n + 1):
        nkkai = (nkkai * i) % mod
    answer = sq(kkai, mod - 2, mod) * nkkai % mod
    return answer


from sys import exit
X, Y = map(int, input().split())
if (X + Y) % 3 != 0:
    print(0)
    exit()

if X % 2 == 0:
    syurui = X - (X // 2) + 1
else:
    syurui = X - (X // 2)
for i in range(syurui):
    two = i
    one = X - two * 2
    if (two + one * 2) == Y:
        print(nCk(two + one, two))
        exit()
print(0)
while True:
 aw=[]
 ar = raw_input()
 if ar[0] ==0 and ar[1] ==0 and ar[2] ==0: break
 else:
  hit=0
  blo=0
  for t in range(5,9):
    aw.append(ar[t])
  for t in range(0,4):
    if ar[t] == aw[t]: hit+=1
  for t in range(0,4):
    for y in range(0,4):
      if ar[t] == aw[y]:
        if t == y: break
        else: blo +=1
  print hit,blo

### FIXED CODE ###

while True:
  a = raw_input()
  if int(a[0]) == 0 and int(a[2]) == 0: break
  b =[]
  hit=0
  blow=0
  for i in range(5,9):
    b.append(a[i])
  for x in range(0,4):
    for y in range(0,4):
      if a[x] == b[y]:
        if x == y:
          hit +=1
        else: blow +=1
  print hit,blow
n = int(input())
l = list(map(int,input().split()))
m = []
for i in range(n):
  if i%2==0 and l[i]%2!=0:
    l[i].append(m)
print(m)
    

### FIXED CODE ###

n = int(input())
l = list(map(int,input().split()))
count = 0
for i in range(n):
  if i%2==0 and l[i]%2!=0:
    count = count + 1

print(count)
from collections import namedtuple

Point = namedtuple('Point', ('x', 'y', 'h'))

def main():
    n = int(input())
    points = [read_point() for _ in range(n)]
    print(*solve(points))

def solve(points):
    for x in range(0, 101 + 1):
        for y in range(0, 100 + 1):
            h = points[0].h + abs(points[0].x - x) + abs(points[0].y - y)
            for p in points[1:]:
                h2 = p.h + abs(p.x - x) + abs(p.y - y)
                if h != h2:
                    break
            else:
                return Point(x, y, h)

def read_point():
    x, y, h = map(int, input().split())
    return Point(x, y, h)

main()


### FIXED CODE ###

from collections import namedtuple

Point = namedtuple('Point', ('x', 'y', 'h'))

def main():
    n = int(input())
    points = [read_point() for _ in range(n)]
    print(*solve(points))

def solve(points):
    for p in points:
        if p.h != 0:
            base = p
            break

    for x in range(0, 101 + 1):
        for y in range(0, 100 + 1):
            h = base.h + abs(base.x - x) + abs(base.y - y)
            for p in points:
                ph = max(h - abs(x - p.x) - abs(y - p.y), 0)
                if ph != p.h:
                    break
            else:
                return Point(x, y, h)

def read_point():
    x, y, h = map(int, input().split())
    return Point(x, y, h)

main()
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
const int maxn = 2e5 + 10;
ll a[maxn];
int pos(ll x)
{
    int num = 0;
    while (x)
    {
        num++;
        x /= 10;
    }
    return num;
}
int main()
{
    int n, f = 0;
    cin >> n;
    for (int i = 1; i <= n; i++)
        cin >> a[i];
    ll sum = a[1];
    for (int i = 2; i <= n; i++)
    {
        int x = pos(sum);
        int y = pos(a[i]);
        if (x + y >= 21)
        {
            f = 1;
            break;
        }
        else
            sum *= a[i];
        if(sum>1000000000000000000)
            break;
    }
    if ((sum > 1000000000000000000) || f == 1)
        cout << -1 << endl;
    else
        cout << sum << endl;
}

### FIXED CODE ###

n = int(input())
Sum = 1
Max = 1000000000000000000

l = list(map(int, input().split()))
f = 0
for i in range(n):
  if l[i]==0:
    f = 1
for i in range(n):
  Sum=Sum*l[i]
  if Sum>Max:
     break
if f == 1:
  print("0")
elif Sum<=Max:
  print("%d" % Sum)
else :
  print("%d" % -1)
H,W,D = map(int,input().split())
grid = [[0]*W for _ in range(H)]
for h in range(H):
    grid[h] = list(map(int, input().split()))
number_yx = {}
for y in range(H):
    for x in range(W):
        number_yx[grid[y][x]] = [y,x]
fromto_cost = [[0]*(1+H*W) for _ in range(1+H*W)]
for mod_group in range(D):
    # 剰余ごとにスタートを決定
    previous = mod_group
    if previous == 0:
        previous = D
    start = previous
    fromto_cost[previous][previous] = 0
    previous_y, previous_x = number_yx[previous]
    cost = 0
    while previous+D <= (H*W):
        Next = previous+D 
        Next_y, Next_x = number_yx[Next]
        cost += abs(Next_y-previous_y) + abs(Next_x-previous_x)
        fromto_cost[start][Next] = cost

        previous = Next
        previous_y,previous_x = Next_y,Next_x

Q = int(input())
ans_ls = [0] * Q
for i in range(Q):
    start, goal = map(int,input().split())
    mod = start % D
    base = mod
    if base == 0:
        base = D 
    base_to_goal = fromto_cost[base][goal]
    base_to_start = fromto_cost[base][start]
    ans_ls[i] = base_to_goal - base_to_start
for ans in ans_ls:
    print(ans)



### FIXED CODE ###

from collections import defaultdict
H,W,D = map(int,input().split())
grid = [[0]*W for _ in range(H)]
for h in range(H):
    grid[h] = list(map(int, input().split()))
number_yx = [[0,0] for _ in range(H*W+1)]
for y in range(H):
    for x in range(W):
        number_yx[grid[y][x]] = [y,x]
fromto_cost = defaultdict(lambda: defaultdict(int))
for mod_group in range(D):
    # 剰余ごとにスタートを決定
    start = mod_group+1
    previous = start
    fromto_cost[start][start] = 0
    previous_y, previous_x = number_yx[previous]
    cost = 0
    while previous+D <= (H*W):
        Next = previous+D 
        Next_y, Next_x = number_yx[Next]
        cost += abs(Next_y-previous_y) + abs(Next_x-previous_x)
        fromto_cost[start][Next] = cost

        previous = Next
        previous_y,previous_x = Next_y,Next_x

Q = int(input())
ans_ls = [0] * Q
for i in range(Q):
    start, goal = map(int,input().split())
    mod = start % D
    base = mod
    if base == 0:
        base = D 
    base_to_goal = fromto_cost[base][goal]
    base_to_start = fromto_cost[base][start]
    ans_ls[i] = base_to_goal - base_to_start
for ans in ans_ls:
    print(ans)
mojiretsu=input()
kakunin="abcdefghijklmnopqrstuvwxyz"
nagasa=len(mojiretsu)
bunkai=[]
for i in range(nagasa): 
    bunkai.append(mojiretsu[i:i+1])
bunkai1=list(set(bunkai))
bunkai1.sort()
ans="None"
NGFlug=False
j=0

for k in range(len(bunkai)):
    if bunkai1[k]!=kakunin[k:k+1]:
        ans=kakunin[k:k+1]
        NGFlug=True
        break

    j+=1

if NGFlug==True:
    
    print(ans)
elif j<27:
    print(kakunin[j:j+1])
else:
    print(ans)

### FIXED CODE ###

S=input()

if "a" not in S:
    print("a")
elif "b"  not in S:
    print("b")
elif "c"  not in S:
    print("c")
elif "d"  not in S:
    print("d")
elif "e"  not in S:
    print("e")
elif "f"  not in S:
    print("f")
elif "g"  not in S:
    print("g")
elif "h"  not in S:
    print("h")
elif "i"  not in S:
    print("i")
elif "j"  not in S:
    print("j")
elif "k"  not in S:
    print("k")
elif "l"  not in S:
    print("l")
elif "m"  not in S:
    print("m")
elif "n"  not in S:
    print("n")
elif "o"  not in S:
    print("o")
elif "p"  not in S:
    print("p")
elif "q"  not in S:
    print("q")
elif "r"  not in S:
    print("r")
elif "s"  not in S:
    print("s")
elif "t"  not in S:
    print("t")
elif "u"  not in S:
    print("u")
elif "v"  not in S:
    print("v")
elif "w"  not in S:
    print("w")
elif "x"  not in S:
    print("x")
elif "y"  not in S:
    print("y")
elif "z"  not in S:
    print("z")
else:
    print("None")
N=int(input())
if N>=2 and N<=10**5:
    array=list(map(int,input().strip().split()))
    if range(array)==N:
        if array[0]>=0 and array[-1]<=10**18:
            multipul=1
            for i in len(array-1):
                multipul=multipul*array[i]
            print(multipul)

### FIXED CODE ###

n = int(input())
m = list(map(int, input().split()))
ans = 1
if min(m) == 0:
    print(0)
else:
    m.sort(reverse=True)
    for i in m:
        ans *= i
        if ans > 1000000000000000000:
            ans = -1
            break
    print(ans)
import math
A,B = map(int, input().split())
print(A*B//math.gcd(A,B))

### FIXED CODE ###

import fractions
A,B = map(int, input().split())
print(int(A*B//fractions.gcd(A,B)))
N = int(input())
Arr = [int(input()) for i in range(N)]


def funct(i, left_max, right_max):
    n = Arr[i]

    if n==right_max:
        if i ==N-1:
            right_max=0
        else:
            right_max = max(Arr[i+1:])

    print(max(left_max, right_max))

    if i == N-1:
        return

    if n >=left_max:
        if i==0:
            left_max=0
        elif i ==1:
            left_max=Arr[0]
        else:
            left_max=n



    return funct(i + 1, left_max, right_max)


funct(0, 0, max(Arr[1:]))


### FIXED CODE ###

N = int(input())
Arr = [int(input()) for i in range(N)]

left_max=0
right_max=max(Arr)

for i in range(N):
    n = Arr[i]
    if left_max>=right_max:
        print(left_max)
    else:
        if n==right_max:
            if i ==N-1:
                right_max=left_max
                
            else:
                right_max = max(Arr[i+1:])

        print(right_max)

    if i == N-1:
        break
    left_max=max(n,left_max)
# C
import functools
import math

N, X = map(int, input().split())
x = list(map(int, input().split()))
new_list = list(map(lambda l: abs(l - X), x))
new_list.sort()
gcd = functools.reduce(math.gcd, new_list)
print(gcd)

### FIXED CODE ###

from functools import reduce
from fractions import gcd
N, X = map(int, input().split())
x = list(map(int, input().split()))
new_list = list(map(lambda l: abs(l - X), x))
new_list.sort()
gcd = reduce(gcd, new_list)
print(gcd)
from bisect import bisect_right

n,m=map(int,input().split())
lis=list(map(int,input().split()))
lists=sorted(lis)

cnt=0
while cnt<m:
    y=lists[-1]//2
    del lists[-1]
    
    indexes=bisect_left(lists,y)
    #indexesというところに新しいyの値を代入しておきたい
    lists.insert(indexes,y)

    cnt+=1
print(sum(lists))
    

### FIXED CODE ###

from bisect import bisect_right
import heapq
n,m=map(int,input().split())
lists=list(map(int,input().split()))
uselists=[]
for _ in lists:
    uselists.append(-_)

heapq.heapify(uselists)

cnt=0
while cnt<m:
    y=heapq.heappop(uselists)

    z=(-y)//2
    heapq.heappush(uselists,-z)
    

    cnt+=1
anslist=[]
for j in uselists:
    anslist.append(-j)
print(sum(anslist))
n = int(input())
a = [int(e) for e in input().split()]

ans ='Yes' if max(a)>= sum([e for e in a]-max(a)) else 'No'
print(ans)

### FIXED CODE ###

n = int(input())
a = [int(e) for e in input().split()]

ans ='No' if max(a)>= sum([e for e in a])-max(a) else 'Yes'
print(ans)
ソースコード 

Copy
Copy
b = int(input())
 
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "G":
  print("C")
else:
  print("G")

### FIXED CODE ###

b = input()
 
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "G":
  print("C")
else:
  print("G")
a,b,c = map(int,input().split())
if a+c => b:
    print(b)
else:
    pritn(a+c)

### FIXED CODE ###

a,b,c = map(int,input().split())
if b+c >= a:
    print(c-a+b)
else:
    print(0)