Harryxun/stf_run huggingface dataset:
N,X=map(int,input().split())

from functools import lru_cache

@lru_cache(maxsize=None)
def count(N):
    if N == 0:
        return 1
    else:
        temp = pan(N-1)
        return 3 + 2 * count(N-1)
    
@lru_cache(maxsize=None)
def calc(N,X):
    if N == 0:
        return 1
    center = count(N-1) + 1
    if X == 0 :
        return 0
    elif X < center:
        return calc(N-1,X-1)
    elif X == center:
        return calc(N-1,center-2) + 1
    elif X > center:
        return calc(N-1,X-center-1) + calc(N,center)
print(calc(N,X-1))

### FIXED CODE ###

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

from functools import lru_cache
import sys

sys.setrecursionlimit(10*20)

@lru_cache(maxsize=None)
def count(N):
    if N == 0:
        return 1
    else:
        return 3 + 2 * count(N-1)
    
@lru_cache(maxsize=None)
def calc(N,X):
    if N == 0:
        return 1
    center = count(N-1) + 1
    if X == 0 :
        return 0
    elif X < center:
        return calc(N-1,X-1)
    elif X == center:
        return calc(N-1,center-2) + 1
    elif X > center:
        return calc(N-1,X-center-1) + calc(N,center)
print(calc(N,X-1))
N, M = map(int,input().split(' '))
a = [int(input()) for i in range(M)]
for i in range(M-1):
  if a[i]+1 == a[i+1]:
    print(0)
    exit()
def step(n):
  if n <= 1 :
    return 1
  tmp = [0]*n
  tmp[0] = 1
  tmp[1] = 2
  for i in range(2,n):
    tmp[i] = tmp[i-2] + tmp[i-1]
  return tmp[n-1]
ans = step(a[0]-1)
for i in range(1,M):
  n = a[i] - a[i-1] - 2
  ans = ans*step(n)
n = N - a[M-1] -1
ans = ans*step(n)

print(ans%(10**9+7))
print([step(i) for i in range(6)])

### FIXED CODE ###

N, M = map(int,input().split(' '))
a = set([int(input()) for i in range(M)])
ans = [0]*(N+1)
ans[0] = 1
for i in range(1,N+1):
  if i in a:
    ans[i] = 0
  else:
    ans[i] = (ans[i-1]+ans[i-2])%(10**9+7)
print(ans[N])
s = input()
t = input()
s_l = set(s)
t_l = set(t)
s = list(s_l)
t = list(t_l)
go = []
back = []
def has_duplicates(seq):
    return len(seq) != len(set(seq))


for i in range(len(s)):
  go.append(s[i])
  back.append(t[i])
  
ansg = has_duplicates(go)
ansb = has_duplicates(back)

if ansg == True or ansb == True:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

s = input()
t = input()

go = []
back = []
g = []
b = []
def has_duplicates(seq):
    return len(seq) != len(set(seq))


for i in range(len(s)):
  go.append(s[i]+t[i])
  back.append(t[i]+s[i])

go_l = set(go)
back_l = set(back)
go = list(go_l)
back = list(back_l)

#print(go)
#print(back)

for i in range(len(go)):
  g.append(go[i][0])
  b.append(back[i][0])
  
#print(g)
#print(b)
  
ansg = has_duplicates(g)
ansb = has_duplicates(b)

if ansg == True or ansb == True:
  print("No")
else:
  print("Yes")
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N, M = read_ints()
S = read()[:-1]
S = S[::-1]
ans = []
cur_i = 0
while cur_i < N:
    dice = M
    cur_i += dice
    if cur_i > N + 1:
        ans.append(N - (cur_i - M))
        break
    while S[cur_i] == '1':
        cur_i -= 1
        dice -= 1
        if dice == 0:
            print(-1)
            exit()
    ans.append(dice)
print(*ans[::-1])


### FIXED CODE ###

# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N, M = read_ints()
S = read()[:-1]
S = S[::-1]
ans = []
cur_i = 0
while True:
    dice = M
    cur_i += dice
    if cur_i > N:
        if N - (cur_i - M) == 0:
            pass
        else:
            ans.append(N - (cur_i - M))
        break
    # if cur_i == N + 1:
    #     ans.append(cur_i - N)
    #     break
    while S[cur_i] == '1':
        cur_i -= 1
        dice -= 1
        if dice == 0:
            print(-1)
            exit()
    ans.append(dice)
print(*ans[::-1])
k = int(input())
a_b = input().split()[1].split(" ")
a = int(a_b.split(" ")[0])
b = int(a_b.split(" ")[1])

for i in range(1, 1000):
  if a<= (i* k) <= b:
    print("OK")
    break
  elif (i* k) > b:
    print("NG")
    break
else:
    print("NG")


### FIXED CODE ###

k = int(input())
a_b = input()
a = int(a_b.split(" ")[0])
b = int(a_b.split(" ")[1])

for i in range(1, 1000):
  if a<= (i* k) <= b:
    print("OK")
    break
  elif (i* k) > b:
    print("NG")
    break
else:
    print("NG")
n=int(input())
li=[]
for i in range(n):
  li[i]=int(input())
print(len(list(set(li))))

### FIXED CODE ###

n=int(input())
li=[0]*n
for i in range(n):
  li[i]=int(input())
print(len(list(set(li))))
n=97
r=range
L='<'
P='+'
a=lambda i,j:[P,i,j,i]
b=lambda i:[P,i,i,i+1]
d=lambda x,i,j:sum([sum([o:=b(j+t-1),a(j+t,n),*(b(s)for s in r(j+t,j+29)),[L,j+29,x,i+t],o,a(j+t,i+t)],[])for t in r(30)],[])
l=[3933,P,0,1,n,L,2,n,n,P,0,n,3,P,1,n,4,*d(3,5,36),*d(4,36,67),]
for t in r(59):
	l+=[*a(2,2),*sum([[P,5+t-s,36+s,98,L,n,98,99,*a(2,99)]for s in r(max(0,t-30),min(30,t+1))],[])]
print(*l)

### FIXED CODE ###

n=97
r=range
L='<'
P='+'
l=[3933,P,0,1,n,L,2,n,n,P,0,n,3,P,1,n,4]
a=lambda i,j:[P,i,j,i]
b=lambda i:[P,i,i,i+1]
def d(x,i,j):
	return sum([sum([b(j+t-1),a(j+t,n),*(b(s)for s in r(j+t,j+29)),[L,j+29,x,i+t],b(j+t-1),a(j+t,i+t)],[])for t in r(30)],[])
l+=d(3,5,36)
l+=d(4,36,67)
for t in r(59):
	l+=a(2,2)
	for s in r(t+1):
		if t-30<s<30:l+=[P,5+t-s,36+s,98];l+=[L,n,98,99];l+=a(2,99)
print(*l)
import sys
import bisect
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n, k = map(int, input().split())
    X = list(map(int, input().split()))

    if 0 in X:
        ori = X.index(0)
    else:
        ori = bisect.bisect_left(X, 0)

    R = [0]
    for i in range(1, n):
        R.append(R[-1] + abs(X[i - 1] - X[i]))

    mi = f_inf
    left = 0
    for right in range(k - 1, n):
        if left <= ori <= right:
            cost = R[right] - R[left]
            if mi > cost:
                mi = cost
                res = [left, right]
        left += 1

    left, right = res
    if X[left] > 0 and X[right] > 0:
        print(X[right])
    elif X[left] < 0 and X[right] < 0:
        print(abs(X[left]))
    elif X[left] == X[right] == 0:
        print(0)
    else:
        print(min(abs(X[left]) * 2 + abs(X[right]), abs(X[left]) + abs(X[right]) * 2))


if __name__ == '__main__':
    resolve()


### FIXED CODE ###

n, k = map(int, input().split())
x = list(map(int, input().split()))

if x[0] >= 0:
    print(x[k - 1])
    exit()
elif x[n - 1] < 0:
    print(abs(x[n - k]))
    exit()
else:
    for i in range(n):
        if x[i] >= 0:
            ori = i
            break

f_inf = float("inf")
res = f_inf
for i in range(max(ori - k, 0), min(ori + k, n) - k + 1):
    time = min(abs(x[i + k - 1] - x[i]) + abs(x[i + k - 1]), abs(x[i]) + abs(x[i + k - 1] - x[i]))
    res = min(res, time)

print(res)
s=int(input())
k=[]
for i in range(s):
    j=int(input())
    if j in k:
        k=k-j
    else:
        k.append(j)
print(len(k))
    

### FIXED CODE ###

import collections
s=int(input())
k = [input() for i in range(s)]
c = collections.Counter(k)
z=c.values()
lst=[ e for e in z if e%2==1]
print(len(lst))
num=list(map(int,input()))
num.sort(reverse=True)
print(num[0]*10+num[1]+num[2])

### FIXED CODE ###

num=list(map(int,input().split()))
num.sort(reverse=True)
print(num[0]*10+num[1]+num[2])
N = int(input())
xy = []
for count in range(N):
    xy.append(input().split())
    itertools.permutations(xy)
XY = []
sum = 0
ave = 0
count = 0
for XY in itertools.permutations(xy):
    for i in range(N-1):
        leng = math.sqrt(((int(XY[i+1][0]) - int(XY[i][0])) ** 2) +
                         ((int(XY[i + 1][1]) - int(XY[i][1])) ** 2))
        sum += leng

ave = sum / math.factorial(N)
print(ave)


### FIXED CODE ###

import itertools
import math
N = int(input())
xy = []
for count in range(N):
    xy.append(input().split())
    itertools.permutations(xy)
XY = []
sum = 0
ave = 0
count = 0
for XY in itertools.permutations(xy):
    for i in range(N-1):
        leng = math.sqrt(((int(XY[i+1][0]) - int(XY[i][0])) ** 2) +
                         ((int(XY[i + 1][1]) - int(XY[i][1])) ** 2))
        sum += leng

ave = sum / math.factorial(N)
print(ave)
N, K = map(int, input().split())
A = list(map(int, input().split()))
MOD = 10**9 + 7

# case1. N == K のときは答えは確定
if N == K:
    ans = 1
    for i in range(K):
        ans *= A[i]
        ans %= MOD
    print(ans)
# case2. A が全部負の数のとき、 Kが奇数ならば残念ながら答えは負になるのでなるべく絶対値を小さくする
elif max(A) < 0 and K % 2 == 1:
    ans = 1
    A = sorted(A, reverse=True)
    for i in range(K):
        ans *= A[i]
        ans %= MOD
    print(ans)
else:
    # case3. それ以外は正にできるので、絶対値の降順にソートする
    A = sorted(A, key=lambda x: abs(x), reverse=True)
    # とりあえず大きい順に K 個掛けてみる
    ans = 1
    for i in range(K):
        ans *= A[i]
    if ans >= 0:
        ans %= MOD
        print(ans)
    else:
        # 取り除く対象を old, 取り込む対象を new とする
        # case3-1. 負数を取り除いて非負数を取り込む
        # まずは new を探す
        j = K
        while j < N or A[j] < 0:
            j += 1
        if j < N:
            new1 = A[j]
        # old を探す
        l = K-1
        while A[l] >= 0:
            l -= 1
        old1 = A[l]
        if new1 and old1:
            cand1 = ans // old1 * new1
        # case3-2. 非負数を取り除いて負数を取り込む
        # まずは new を探す
        j = K
        while j < N or A[j] >= 0:
            j += 1
        if j < N:
            new2 = A[j]
        # old を探す
        l = K-1
        while A[l] < 0:
            l -= 1
        old2 = A[l]
        if new2 and old2:
            cand2 = ans // old2 * new2

        if cand1 and cand2:
            print(cand1, cand2)
            ans = max(cand1, cand2) % MOD
        elif cand1:
            ans = cand1 % MOD
        else:
            ans = cand2 % MOD
        print(ans)


### FIXED CODE ###

from heapq import heappush, heappop


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

MOD = 10**9 + 7

# case1. N == K のときは答えは確定
if N == K:
    ans = 1
    for i in range(K):
        ans *= A[i]
        ans %= MOD
    print(ans)
# case2. A が全部負の数のとき、 Kが奇数ならば残念ながら答えは負になるのでなるべく絶対値を小さくする
elif max(A) < 0 and K % 2 == 1:
    ans = 1
    for i in range(K):
        ans *= A[i]
        ans %= MOD
    print(ans)
else:
    # case3. それ以外は正にできる

    # K が奇数のとき、非負要素から1つ取って偶数の場合に帰着
    # K が偶数のとき、面倒なので 2 つセットで考えて K//2 個取る問題に帰着

    if K%2 == 1:
        ans = A.pop(0)  # あらかじめ最大値を確保
        n = (K-1)//2
    else:
        ans = 1
        n = K//2

    # 絶対値の降順にソートする
    A = sorted(A, key=lambda x: abs(x), reverse=True)

    # 候補テーブルを作成
    cand = []  # 非負要素、負要素をそれぞれ絶対値の大きい順に 2 つずつ掛けたもの

    BIGINT = 10**9 + 1  # tmp 用
    tmp1 = BIGINT
    tmp2 = BIGINT

    for a in A:
        if a >= 0:
            if tmp1 == BIGINT:
                tmp1 = a
            else:
                heappush(cand, -tmp1*a)
                tmp1 = BIGINT
        else:
            if tmp2 == BIGINT:
                tmp2 = a
            else:
                heappush(cand, -tmp2*a)
                tmp2 = BIGINT

    # あとは大きい方から n 個取る
    for i in range(n):
        ans *= -heappop(cand)
        ans %= MOD
    print(ans)
N = int(input())
idx_to_AB = {}
for i in range(N):
    idx_to_AB[i] = list(map(int, input().split()))

A_to_idx = {value[0]: key for key, value in idx_to_AB.items()}
B_to_idx = {value[1]: key for key, value in idx_to_AB.items()}

A = sorted(A_to_idx, reverse=True)
B = sorted(B_to_idx, reverse=True)

cntA, cntB = 0, 0
while (len(idx_to_AB)):
    # 先行

    if A[0] > B[0]:
        cntA += A[0]
        B.remove(idx_to_AB[A_to_idx[A[0]]][1])
        del idx_to_AB[A_to_idx[A[0]]]
        A = A[1:]

    else:
        cntA += idx_to_AB[B_to_idx[B[0]]][0]
        A.remove(idx_to_AB[B_to_idx[B[0]]][0])
        del idx_to_AB[B_to_idx[B[0]]]
        B = B[1:]
    # print(idx_to_AB)
    # print(A, B)

    if len(idx_to_AB) == 0:
        break
    # 後攻
    if A[0] < B[0]:
        cntB += B[0]
        A.remove(idx_to_AB[B_to_idx[B[0]]][0])
        del idx_to_AB[B_to_idx[B[0]]]
        B = B[1:]
    else:
        cntB += idx_to_AB[A_to_idx[A[0]]][1]
        B.remove(idx_to_AB[A_to_idx[A[0]]][1])
        del idx_to_AB[A_to_idx[A[0]]]
        A = A[1:]

print(cntA-cntB)


### FIXED CODE ###

N = int(input())
# 仮に青木さん(B)が全て食べたとき、高橋(A)にとっては最悪な状況
# これを打破するためには、自分の得点と相手の得るはずだった得点の和を最大にするようなものについて食べれば良い
# 青木さんも同じことを考えるので、要は幸福度の和をソートして交互に食べていけば、互いに最善の行動を取ることとなる。
# 答えを出す際には、AがBから何点奪ったかだけを考えればよい。
# つまり、Aが最善で何点奪えるか　から　全てBさんが食べたとき　を引けばいい

sum_happiness = []
all_for_B = 0

for i in range(N):
    tmp1, tmp2 = list(map(int, input().split()))
    sum_happiness.append(tmp1 + tmp2)
    all_for_B += tmp2

sum_happiness.sort(reverse=True)


gain_A = 0
for i, h in enumerate(sum_happiness):
    if i % 2 == 0:
        gain_A += h
    # print(gain_A)


print(gain_A - all_for_B)
# -*- coding: utf-8 -*-

N = int(input())
A = list(map(int, input().split()))
count=0
L = [0]*N
R = [0]*N
hash_L=[0]*10000000000
hash_R=[0]*10000000000
for i in range(N):
    L[i]=A[i]+i
    hash_L[L[i]]=L[i]
    R[i]=-A[i]+i
    hash_R[R[i]]=R[i]

for i in range(2*N):
    if hash_L[i]==hash_R[i]:
        count=count+1

print("{}".format(count))

### FIXED CODE ###

# -*- coding: utf-8 -*-

N = int(input())
A = list(map(int, input().split()))
count=0
L = [0]*N
R = [0]*N
N2=2*N
hash_L=[0]*N2
hash_R=[0]*N2

sheet_L=[0]*N2
sheet_R=[0]*N2
for i in range(N):
    L[i]=A[i]+i+1
    if L[i]<N2:
        if sheet_L[L[i]]==0:
            hash_L[L[i]]=L[i]
            sheet_L[L[i]]=1
        else:
            sheet_L[L[i]]=sheet_L[L[i]]+1

    R[i]=-A[i]+i+1
    if R[i]>0:
        if sheet_R[R[i]]==0:
            hash_R[R[i]]=R[i]
            sheet_R[R[i]]=1
        else:
            sheet_R[R[i]]=sheet_R[R[i]]+1


for i in range(2*N):
    if not hash_L[i]==0:
        if hash_L[i]==hash_R[i]:
            count=count+sheet_L[i]*sheet_R[i]
#print("{}".format(hash_L))
#print("{}".format(hash_R))
print("{}".format(count))
a=int(input())
b=int(intput())
print(6-a-b)

### FIXED CODE ###

print(6-int(input())-int(input()))
import numpy as np

# Get input
N, K = [int(v) for v in input().split(" ")]
A_arr = np.array([int(v) for v in input().split(" ")])
step = np.arange(len(A_arr))

# Trivial solution
if K > N//2+11:
  print(" ".join([str(N)]*N))
  exit()

def get_Intensity(A_arr):
  inten = np.zeros(len(A_arr))
  for i in range(len(A_arr)):
    isLuminated = np.abs(step - i) < A_arr
    inten[i] = np.sum(isLuminated)
  return inten

Intensity = A_arr
for i in range(K):
  Intensity = get_Intensity(Intensity+1)
  # Termination of calculation (stable solution)
  if np.sum(Intensity) == N**2:
    break
#print(" ".join([str(v) for v in Intensity.astype(int)]))
print(' '.join(map(str, A)))

### FIXED CODE ###

import numpy as np
 
N, K = map(int, input().split(' '))
A = tuple(map(int, input().split(' ')))
indexes = np.arange(0, N)
 
dp = np.zeros(shape=N + 1, dtype=np.int64)
 
for k in range(K):
    np.add.at(dp, np.maximum(0, indexes - A), 1)
    np.add.at(dp, np.minimum(N, indexes + A + 1), -1)
    A = dp.cumsum()[:-1]
    if np.all(A == N):
        break
    dp *= 0
 
print(' '.join(map(str, A)))
n = int(input())
cc = []
ss = []
ff = []
for i in range(n-1):
    c, s, f = list(map(int, input().split()))
    cc.append(c)
    ss.append(s)
    ff.append(f)
for l in range(n-1):
    ans = ss[l]+cc[l]
    for k in range(l+1, n-1):
        temp = ss[k]
        while temp < ans:
            temp += ff[k]
        ans = temp + cc[k]
    print(ans)
print(0)



### FIXED CODE ###

print(48 - int(input()))
import collections as col
N= int(input())
A = [int(x) for x in input().split()]
a = A[::2]
a = col.Counter(a)
b = A[1::2]
b = col.Counter(b)
ans = 0
i = 0
j = 0
#while a.most_common()[i][0]!=b.most_common()[j][0]:
if a.most_common(1)[0][0]!=b.most_common(1)[0][0]:
  ans += sum(a.values())+sum(b.values)-a.most_common(1)[0][1]-b.most_common(1)[0][1]
print(ans)

### FIXED CODE ###

import collections as col
N= int(input())
A = [int(x) for x in input().split()]
a = A[::2]

a = col.Counter(a)
b = A[1::2]

b = col.Counter(b)
ans = 0
i = 0
j = 0
if len(a.most_common())==1 and len(b.most_common())==1 and a.most_common()[i][0]==b.most_common()[j][0]:
  print(N//2)
  exit()
while a.most_common()[i][0]==b.most_common()[j][0]:
  m=a.most_common()[i][1]
  n=b.most_common()[j][1]
  if m>n:
    j +=1
  elif m==n:
      if a.most_common()[i+1][1]>b.most_common()[j+1][1]:
        i+=1
      else:
        j +=1
  else:
    i +=1
#print(i,j,a,b)
ans += sum(a.values())+sum(b.values())-a.most_common()[i][1]-b.most_common()[j][1]
print(ans)
n = int(input())

if n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n = input()

if n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:
  print('Yes')
else:
  print('No')
n=int(input())
xyh = [list(map(int,input().split())) for i in range(n)]

ansh=-1
ans=[]
flag=True
for cx in range(0,101):
  if len(ans)>0:
    break
  for cy in range(0,101):
    if len(ans)>0:
      break
    ansh = -1
    flag=True
    for pira in xyh:
      
      if (flag or ansh == -1) and pira[2] > 0:
        ansh = pira[2]+abs(cx-pira[0])+abs(cy-pira[1])
        ans.append([cx,cy,ansh])
        flag=False
        
      elif (flag or ansh == -1) and pira[2] == 0:
        ansh = pira[2]+abs(cx-pira[0])+abs(cy-pira[1])
        ans.append([cx,cy,ansh])
        
      elif len(ans)>0 and pira[2] > 0 and ansh !=pira[2]+abs(cx-pira[0])+abs(cy-pira[1]):
        ans=[]
        break
        
      elif len(ans)>0 and pira[2]==0 and pira[2]+abs(cx-pira[0])+abs(cy-pira[1])>0:
        ans=[]
        break
print(*ans[0])

### FIXED CODE ###

n=int(input())
xyh = [list(map(int,input().split())) for i in range(n)]
xyh.sort(key=lambda x:x[2], reverse=True)

ansh=-1
ans=[[]]
flag=True
for cx in range(0,101):
  if flag==False:
    break
    
  for cy in range(0,101):
    ansh = 0
    for pira in xyh:
      if ansh==0:
        ansh=pira[2]+(abs(cx-pira[0])+abs(cy-pira[1]))
        ans[0]=[cx,cy,ansh]
        
      elif len(ans[0])>0 and max(ansh -(abs(cx-pira[0])+abs(cy-pira[1])), 0) != pira[2]:
        ans[0]=[]
    if len(ans[0])>0:
      flag=False
      break
print(*ans[0])
a=int(input())
b=int(input())
if a%2==1 and b%2==1:
    print("Odd\n")
else:
    print("Even\n")

### FIXED CODE ###

s=raw_input().split()
a=int(s[0]);
b=int(s[1]);
if a*b%2==0:
   print "Even"
else:
   print "Odd"
import sys

n = int( raw_input( ) )
eles = []
for line in sys.stdin:
	op = line.split( " " )
	op[1] = op[1].strip( )
	if "insert" == op[0]:
		eles.insert( 0, op[1] )
	elif "delete" == op[0]:
		if op[1].rstrip( ) in eles:
			eles.remove( op[1] )
	elif "deleteFirst" == op[0] :
		del eles[0]
	elif "deleteLast" == op[0]:
		eles.pop( )

print( " ".join( eles ) )

### FIXED CODE ###

import sys
from collections import deque

n = int( sys.stdin.readline( ) )
que = deque( )
lines = sys.stdin.readlines()
for line in lines:
	op = line.rstrip().split( " " )
	if "insert" == op[0]:
		que.appendleft( op[1] )
	elif "delete" == op[0]:
		if op[1] in que:
			que.remove( op[1] )
	elif "deleteFirst" == op[0] :
		que.popleft( )
	elif "deleteLast" == op[0]:
		que.pop( )


print( " ".join( que ) )
import math as mt
n,k=map(int,input().split())
l=list(map(int,input().split()))
a=[mt.inf]*(n)
a[0]=0
for i in range(1,n):
    for j in range(1,k+1):
        if i-j>=0:
            a[i]=min(a[i],abs( l[i]-l[i-j])+a[i-j]) 
print(a[-1])


### FIXED CODE ###


n,k=map(int,input().split())
l=list(map(int,input().split()))
a=[10**9+7]*(n)
a[0]=0
for i in range(1,n):
    for j in range(1,k+1):
        if i-j>=0:
            a[i]=min(a[i],abs( l[i]-l[i-j])+a[i-j]) 
print(a[-1])
while True:
    (a, op, b) = input().split()
    if op == '?':
        break
    a = int(a)
    b = int(b)
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)
~                      

### FIXED CODE ###

while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]
    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)
ソースコード
1
N = int(input())
2
a = list(map(int, input().split()))
3
dp = []
4
​
5
def mins(minval, val):
6
  if minval < val:
7
    return minval
8
  else:
9
    return val
10
​
11
for i in range(N):
12
  dp.append(10000000)
13
​
14
for i in range(len(a)):
15
  if i == 0:
16
    dp[0] = 0
17
  if i == 1:
18
    dp[1]= a[1] - a[0]
19
  dp[i] = min(dp[i], dp[i-1] + abs(a[i-1] - a[i]))
20
  dp[i] = min(dp[i], dp[i-2] + abs(a[i-2] - a[i]))
21
​
22

### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
dp = []

def mins(minval, val):
	if minval < val:
			return minval
	else:
			return val

for i in range(N):
	dp.append(1000000000000)

for i in range(len(a)):
	if i == 0:
		dp[0] = 0
	if i == 2:
		dp[1]= abs(a[1] - a[0])
	
	
	dp[i] = min(dp[i], dp[i-1] + abs(a[i-1] - a[i]))
	dp[i] = min(dp[i], dp[i-2] + abs(a[i-2] - a[i]))
#print(dp)
print(dp[N-1])
n = int(input())
s = input()
k = int(input())
w = s[k]
for i in range(n):
    if(s[i] != w):
        s[i] = "*"
print(s)

### FIXED CODE ###

n = int(input())
s = input()
k = int(input())
w = s[k-1]
ss = ""
for i in range(n):
    if(s[i] == w):
        ss += w
    else:
        ss += "*"
print(ss)
t,x=map(int,input())
print(t/x)


### FIXED CODE ###

t,x=map(int,input().split())
print(t/x)
N, M = list(map(int, input().split()))

As = list(map(int, input().split()))
As.sort()

BCs = []
for _ in range(M):
  b, c = tuple(map(int, input().split()))
  BCs.append((b, c))
BCs.sort(key=lambda x: x[1], reverse=True)
  
num = 0
i = 0
for b, c in BCs:
  for j in range(b):
    a = As[i]
    if a < c:
      num += c
      i += 1
    else:
      break
  if a >= c or i == len(As):
    break
num += sum(As[i: ])
    
print(num)

### FIXED CODE ###

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

As = list(map(int, input().split()))
As.sort()

BCs = []
for _ in range(M):
  b, c = tuple(map(int, input().split()))
  BCs.append((b, c))
BCs.sort(key=lambda x: x[1], reverse=True)
  
num = 0
i = 0
for b, c in BCs:
  for j in range(b):
    a = As[i]
    
    if a >= c:
      break
    else:
      num += c
      i += 1
      
    if i == len(As):
      break
      
  if a >= c or i == len(As):
    break
num += sum(As[i: ])
    
print(num)