Harryxun/stf_run huggingface dataset:
def Ics(x, y):
    a = len(x)
    b = len(y)
    c1 = [0] * (b + 1)

    for i in range(a):
        d = x[i]
        c2 = c1[:]
        for j in range(n):
            if d == y[j]:
                c1[j + 1] = c2[j] + 1
            elif c1[j + 1] < c1[j]:
                c1[j + 1] = c1[j]
    return c1[-1]

q = int(input().rstrip())
r = []
for k in range(q):
    s1 = input().rstrip()
    s2 = input().rstrip()
    r.append(Ics(s1, s2))

print(*r, sep = "/n")

### FIXED CODE ###

def Ics(x, y):
    a = len(x)
    b = len(y)
    c1 = [0] * (b + 1)

    for i in range(a):
        d = x[i]
        c2 = c1[:]
        for j in range(b):
            if d == y[j]:
                c1[j + 1] = c2[j] + 1
            elif c1[j + 1] < c1[j]:
                c1[j + 1] = c1[j]
    return (c1[-1])

q = int(input().rstrip())
r = []
for k in range(q):
    s1 = input().rstrip()
    s2 = input().rstrip()
    r.append(Ics(s1, s2))

print(*r, sep = "\n")
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq as hq
import itertools as its
import operator as op


# globals
inf = float('inf')
N = 0


def set_inputs():
    global N
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    # ----------MAIN----------
    n = get_int()
    X, Y = get_data(n, [int, int])
    vecs = Counter()
    for i in range(n):
        for j in range(i+1, n):
            if X[i] > X[j] or (X[i] == X[j] and Y[i] > Y[j]):
                vecs[(X[i]-X[j], Y[i]-Y[j])] += 1
            else:
                vecs[(X[j]-X[i], Y[j]-Y[i])] += 1
    print(n-vecs.most_common()[0][1])
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input().strip()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().strip().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    main()


### FIXED CODE ###

from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq as hq
import itertools as its
import operator as op


# globals
inf = float('inf')
N = 0


def set_inputs():
    global N
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    # ----------MAIN----------
    n = get_int()
    if n == 1:
        print(1)
        return
    X, Y = get_data(n, [int, int])
    vecs = Counter()
    for i in range(n):
        for j in range(i+1, n):
            if X[i] > X[j] or (X[i] == X[j] and Y[i] > Y[j]):
                vecs[(X[i]-X[j], Y[i]-Y[j])] += 1
            else:
                vecs[(X[j]-X[i], Y[j]-Y[i])] += 1
    print(n-vecs.most_common()[0][1])
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input().strip()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().strip().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    main()
k=int(input())
s=input()
if len(s)<=k:
    print(s)
else:
    print(s[:k]+"...")

### FIXED CODE ###

n=int(input())
n1=n%10
if n1==3:
    print("bon")
elif n1<=1 or n1==6 or n1==8:
    print("pon")
else:
    print("hon")
n = int(input())
house = []
for i in range(4):
    house.append([])
    for j in range(3):
        house[i].append([])
        for k in range(10):
            house[i][j].append(0)

for i in range(n):
    b,f,r,v = map(int,input().split())
    house[b][f][r] += v


for i in range(4):
    for j in range(3):
        for k in range(10):
            print(" " + house[i][j][k])
        print()
    if b < 3:
        print("#" * 20)

### FIXED CODE ###

n = int(input())
house = []
for i in range(4):
    house.append([])
    for j in range(3):
        house[i].append([])
        for k in range(10):
            house[i][j].append(0)

for i in range(n):
    b,f,r,v = map(int,input().split())
    house[b-1][f-1][r-1] += v


for i in range(4):
    for j in range(3):
        for k in range(10):
            print("" , house[i][j][k], end="")
        print()
    if i < 3:
        print("#" * 20)
N,M=map(int,input().split())
soinsuubunkai={}
tmp=1
i=2
_M=M
while(i <=M and i**2 <=_M):
    if(M%i==0):
        if(i in soinsuubunkai):
            soinsuubunkai[i]+=1
        else:
            soinsuubunkai[i]=1
        M//=i
    else:
        i+=1

tmp=1
for k in list(soinsuubunkai.values()):
    tmp*=com(k+N-1,k)
    tmp%=10**9+7
print(tmp)

### FIXED CODE ###

def com(n,m):
    if(n-m < m):
        m=n-m
    result=1
    mylist=[i for i in range(1,m+1)]
    j=1
    for i in range(1,m+1):
        result*=(n+1-i)
        if(j<m):
            while(result%mylist[j]==0):
                result//=mylist[j]
                j+=1
                if(j>=m):
                    break
    return result

def yakusuu(i,m):
    _i=i
    while(i**2<=m):
        if(m%i==0):
            return i
        else:
            i+=1
    for j in range(_i-1,0,-1):
        if(m%j==0):
            break
    return m//j
    

N,M=map(int,input().split())
soinsuubunkai={}
tmp=2
i=2
_M=M
while(tmp <=M):
    tmp=yakusuu(tmp,M)

    if(tmp in soinsuubunkai):
        soinsuubunkai[tmp]+=1
    else:
        soinsuubunkai[tmp]=1
    M//=tmp
    if(M==1):
        break


tmp=1
for k in list(soinsuubunkai.values()):
    tmp*=com(k+N-1,k)
    tmp%=10**9+7
print(tmp)
n = input()
inf = 1000000000
M = [[inf for i in range(n)] for i in range(n)]
for i in range(n):
  str = map(int, raw_input().split())
  u = str[0]
  k = str[1]
  for j in range(k):
    v = str[2+u]
    c = str[3+u]
    M[u][v] = c
d = [inf for i in range(n)]
color = [0 for i in range(n)]
 
d[0] = 0
color[0] = 1
 
while 1:
  minv = inf
  u = -1
  for i in range(n):
    if minv>d[i] and color[i]!=2:
      u = i
      minv = d[i]
    print minv
  if u == -1:
    break
  color[u] = 2
  for v in range(n):
    if color[v]!=2 and M[u][v]!=inf:
      if d[v]>d[u]+M[u][v]:
        d[v] = d[u] + M[u][v]
        color[v] = 1
for i in range(n):
  if d[i]==inf:
    print '%d -1' % i
  else:
    print '%d %d' % (i, d[i])

### FIXED CODE ###

n = input()
inf = 1000000000
M = [[inf for i in range(n)] for i in range(n)]
for i in range(n):
  str = map(int, raw_input().split())
  u = str[0]
  k = str[1]
  for j in range(k):
    v = str[2+2*j]
    c = str[3+2*j]
    M[u][v] = c
d = [inf for i in range(n)]
color = [0 for i in range(n)]
 
d[0] = 0
color[0] = 1
 
while 1:
  minv = inf
  u = -1
  for i in range(n):
    if minv>d[i] and color[i]!=2:
      u = i
      minv = d[i]
  if u == -1:
    break
  color[u] = 2
  for v in range(n):
    if color[v]!=2 and M[u][v]!=inf:
      if d[v]>d[u]+M[u][v]:
        d[v] = d[u] + M[u][v]
        color[v] = 1
for i in range(n):
  if d[i]==inf:
    print '%d -1' % i
  else:
    print '%d %d' % (i, d[i])
import re

s = input()

if re.match(r'C.*F', s):
    print(YES)
else:
    print(NO)

### FIXED CODE ###

import re

s = input()

if re.match(r'.*C.*F', s):
    print('Yes')
else:
    print('No')
def solve():
    N,M = map(int, input().split())
    
    l = [-1]*(N+1)
    for m in range(M):
        a = int(input())
        l[a] = 0
    if l[1] == 0 and l[2] == 0:
        return 0
    elif l[1] == 0 and l[2] != 0:
        l[2] = 1
    elif l[1] != 0 and l[2] == 0:
        l[1] = 1
    else:
        l[1] = 1
        l[2] = 2
    
    if N == 1:
        return 1
    if N == 2:
        return 2
    
    l.pop(0)
    for i in range(2,N):
        if l[i] == 0:
            continue
        else:
            l[i] = l[i-1] + l[i-2]
    
    return l[-1]%1000000007


if __name__ == '__main__':
    print(solve())

### FIXED CODE ###

def solve():
    N,M = map(int, input().split())
    if N == 1 and M == 0:
        return 1
    elif N == 1 and M == 1:
        return 0
    elif N == 2 and M == 0:
        return 2
    elif N == 2 and M == 1:
        return 1
    elif N == 2 and M == 2:
        return 0
    
    l = [-1]*(N+1)
    for m in range(M):
        a = int(input())
        l[a] = 0
    if l[1] == 0 and l[2] == 0:
        return 0
    elif l[1] == 0 and l[2] != 0:
        l[2] = 1
    elif l[1] != 0 and l[2] == 0:
        l[1] = 1
    else:
        l[1] = 1
        l[2] = 2
    
    l.pop(0)
    for i in range(2,N):
        if l[i] == 0:
            continue
        else:
            l[i] = l[i-1] + l[i-2]
    
    return l[-1]%1000000007


if __name__ == '__main__':
    print(solve())
import sympy
N = int(input())
A = [int(i) for i in input().split()]
ans = [x*2]

x = sympy.Symbol('x')
s = x
for i in range(1, N):
    s = A[i-1]-s
    ans.append(s*2)
    
sol = sympy.solve(A[N-1]-s-x)[0]
for i in range(N):
    ans[i] = ans[i].subs(x, sol)
    print(ans[i], end = " ")

### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]
s = 0

for i in range(N):
    s = A[i]-s
    
s = s//2
ans = [s*2]
for i in range(1,N):
    s = A[i-1] - s
    ans.append(s*2)
    
for i in range(N):
    print(ans[i], end = " ")
from itertools import product
import numpy as np

H, W, K = [int(n) for n in input().split()]
arr = np.zeros((H, W))
count = 0

for h in range(H):
    row = input()
    arr[h, :] = np.array([0 if mark=='.' else 1 for mark in row])


### FIXED CODE ###

from itertools import product
import numpy as np

H, W, K = [int(n) for n in input().split()]
arr = np.zeros((H, W))
count = 0

for h in range(H):
    row = input()
    arr[h, :] = np.array([0 if mark=='.' else 1 for mark in row])

for row_onehot, col_onehot in product(product(range(2), repeat=H), product(range(2), repeat=W)):
    row_indexes = np.argwhere(np.array(row_onehot)==1).flatten()
    col_indexes = np.argwhere(np.array(col_onehot)==1).flatten()
    arr_ = arr.copy()
    for row_idx in row_indexes:
        arr_[row_idx, :] = 0
    for col_idx in col_indexes:
        arr_[:, col_idx] = 0
    if arr_.sum() == K:
        count += 1

print(count)
import math
n,a,b = map(int,input().split())
r = math.ceil(n/(a+b))
retukaioh = ""
for i in range(r):
  retukaioh = retukaioh + "b"*a + "r"*b
print(retukaioh[0:n].count("b"))
print(retukaioh)

### FIXED CODE ###

n,a,b = map(int,input().split())
rest = n%(a+b)
n -= rest
ans = n//(a+b)*a
if rest >= a:
  ans += a
elif rest < a:
  ans += rest

print(ans)
import collections
S=list(input())
c=collections.Counter(S)
n=c["W"]
s=0
i=0
while "B" in S[0:n]:
  if S[i]=="B" and S[i+1]=="W":
    S[i]="W" and S[i+1]="B"
    s+=1
    i=i
  else:
    i+=1
print(s)


### FIXED CODE ###

S=list(input())
N=len(S)
s=0
ans=0
for i  in range(N):
  if S[i]=="B":
    s+=1
  elif S[i]=="W":
    ans+=s
print(ans)
4
2 2 1 3

### FIXED CODE ###

n = int(input())
A = list(map(int, input().split()))
if n == 2:
  print(max(A))
else:
  A.sort(reverse=True)
  ans = A[0]
  for a in A[1:n//2]:
    ans += 2 * a
  if n % 2 == 1:
    ans += A[n//2]
  print(ans)
n = int(input())
h = [int(x) for x in input().split()]
h.reverse()
 
flag = True
 
for i in range(1, n):
    if h[i - 1] >= h[i]:
        continue
    elif h[i] == h[i - 1] + 1:
        h[i] -= 1
    else:
        flag = False
        break
 
print('Yes') if flag else print('No')

### FIXED CODE ###

a, b, c = map(int, raw_input().split())
if (c-(a-b)) > 0:
    print(c-(a-b))
else:
    print(0)
import math
import numpy as np
import queue
from collections import deque,defaultdict
import heapq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    n,s = map(int,ipt().split())
    a = [int(i) for i in ipt().split()]
    mod = 998244353
    two = [1]*(n+1)
    for i in range(n):
        two[i+1] = two[i]*2%mod
    dp = np.zeros((n+1,s+1),dtype = int)
    for i,ai in enumerate(a):
        if ai > s:
            continue
        dp1 = np.zeros((n+1,ai),dtype=int)
        dp2 = np.zeros((1,s+1-ai),dtype=int)
        dp3 = np.array([l[:s+1-ai] for l in dp[:-1]])
        dp4 = np.block([[dp2],[dp3]])
        dp5 = np.block([dp1,dp4])
        dp += dp5
        dp[1][ai] += 1
    ans = 0
    for i in range(n+1):
        dp[i] = dpi
        ans = (ans+(dpi[s]*two[n-i])%mod)%mod
    print(ans)
    return

if __name__ == '__main__':
    main()


### FIXED CODE ###

import math
import numpy as np
import queue
from collections import deque,defaultdict
import heapq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    n,s = map(int,ipt().split())
    a = [int(i) for i in ipt().split()]
    mod = 998244353
    two = [1]*(n+1)
    for i in range(n):
        two[i+1] = two[i]*2%mod
    dp = np.zeros(3010,dtype = int)
    dp[0] = 1
    for i,ai in enumerate(a):
        ndp = dp*2
        ndp[ai:] += dp[:-ai]
        ndp %= mod
        dp = ndp
    print(dp[s])
    return

if __name__ == '__main__':
    main()
4 1
....
....
....
....
#


### FIXED CODE ###

N,M=map(int,input().split())
A=[input() for i in range(N)]
B=[input() for i in range(M)]

for X in range(N-M+1):
    for Y in range(N-M+1):
        flag=1
        for x in range(M):
            for y in range(M):
                if B[x][y]!=A[x+X][y+Y]:
                    flag=0
                    break
            if not flag:
                break
        if flag:
            print("Yes")
            exit()
print("No")
n = int(input())
s = [input() for i in range(n)]
# print(n)
# print(s)
s = list(map(list, s))
# print(s)
for i in range(n):
    s[i].sort()
    s[i] = "".join(s[i])
# print(s)
dic = {}
for i in range(n):
    if s[i] in dic:
        dic[s[i]] += 1
    else:
        dic.setdefault(s[i],1)
a = list(dic.values())
# print(a)
from scipy.misc import comb
# print(comb(n,r,exact=True))
count = 0
for i in range(len(a)):
    count += comb(a[i],2,True)
print(count)

### FIXED CODE ###

n = int(input())
s = [input() for i in range(n)]
# print(n)
# print(s)
s = list(map(list, s))
# print(s)
for i in range(n):
    s[i].sort()
    s[i] = "".join(s[i])
# print(s)
dic = {}
for i in range(n):
    if s[i] in dic:
        dic[s[i]] += 1
    else:
        dic.setdefault(s[i],1)
a = list(dic.values())
# print(a)
import math
count = 0
for i in range(len(a)):
    if a[i] >= 2:
        count += math.factorial(a[i])//(math.factorial(a[i]-2)*2)
print(count)
list = set(map(int, input().split()))
print(len(set))

### FIXED CODE ###

list = list(map(int, input().split()))
print(len(set(list)))
D = int(input())
T = int(input())
S = int(input())
if D / S <= T:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

D, T, S = map(int, input().split())
if D / S <= T:
    print("Yes")
else:
    print("No")
S = input()
if int(S[6]) <= '4':
	print('Heisei')
else:
	print('TBD')


### FIXED CODE ###

S = input()
if int(S[5:7]) <= 4:
	print('Heisei')
else:
	print('TBD')
n, d = map(int,input().split())
cnt = 0
while(n>0):
    p,q = map(int,input().split())
    if d**2 <= (p**2)+(q**2):
        cnt+=1
print(cnt)

### FIXED CODE ###

n,d = map(int, input().split())
ans = 0
for i in range(n):
  x, y = map(int, input().split()) 
  if x*x + y*y <= d*d: # since they have given atmost distance d
    ans+= 1
print(ans)
'''
using distance formula check whether the the distance 
from origin is less than x sq and y sq
'''
N = int(input())
dict1 = {}
for _ in range(N):
  s = input()
  if s in dict1:
    dict[s] += 1
  else:
    dict[s] = 1
list1 = [d[0] for d in dict1.items() if d[1]==max(dict1.values())]
list1.sort()
for s in list1:
  print(s)

### FIXED CODE ###

N = int(input())
dict1 = {}
for _ in range(N):
  s = input()
  if s in dict1:
    dict1[s] += 1
  else:
    dict1[s] = 1
max_num= max(dict1.values())
list1 = [d[0] for d in dict1.items() if d[1]==max_num]
list1.sort()
for s in list1:
  print(s)
cards = {
        'S': [0 for - in range(13)],
        'H': [0 for - in range(13)],
        'C': [0 for - in range(13)],
        'D': [0 for - in range(13)],
}
n = int(input())
for _ in range(n):
    (s, r) = input().split()
    cards[s][int(r) - 1] = 1

for s in ('S' 'H' 'C' 'D'):
    (s, r) = input().split()
    cards[s][int(r) + 1] = -1

### FIXED CODE ###

cards = {
        'S': [0 for _ in range(13)],
        'H': [0 for _ in range(13)],
        'C': [0 for _ in range(13)],
        'D': [0 for _ in range(13)],
}
n = int(input())
for _ in range(n):
    (s, r) = input().split()
    cards[s][int(r) - 1] = 1

for s in ('S', 'H', 'C', 'D'):
    for r in range(13):
        if cards[s][r] == 0:
            print(s, r + 1)
import numpy as np
s = input().split()
a=s[0]
b=s[1]
c=s[2]
if  np.sqrt(a) + np.sqrt(b) < np.sqrt(c):
    print('Yes')
else:
    print('No')
    

### FIXED CODE ###

from decimal import Decimal
s = input().split()
a = Decimal(s[0])
b = Decimal(s[1])
c = Decimal(s[2])
if  4 * a * b < (c - a -b) **2 and c - a - b > 0:
    print('Yes')
else:
    print('No')
def A_product(a,b):
	if (a % 2 == 0) or (b % 2 == 0):
    	return Even
    else:
        return Odd

### FIXED CODE ###

a, b = map(int, input().split())
if a*b%2==0:
    print('Even')
else:
    print('Odd')
if x / 11 < 1:
    ans = 1
    if x / 5 >= 1:
        ans = 2
else:
    ans = x // 11 * 2 + 1

print(ans)

### FIXED CODE ###

x = int(input())
ans = x//11*2
p = x % 11
if p > 0:
    p -= 6
    ans += 1
if p > 0:
    p -= 5
    ans += 1
 
print(ans)
N = int(input())
A = list(map(int, input().split()))
for i in N:
  if A[i] % 2 == 0:
    if A[i] % 3 == 0 or A[i] % 5 == 0:
print('APPROVED')
    else:
print('DENIED')
  else:
print('DENIED')

### FIXED CODE ###

#入力
N = int(input())
A = list(map(int,input().split()))
#2で割り切れるものいれるリスト,要素として0は入らないのでとりあえず0
B = [0 for _ in range(N)]
#2で割り切れるリストの数カウント
count = 0
#2で割り切れるリストに偶数要素を代入&要素数カウント
for i in range(N):
  if A[i] % 2 == 0:
    B[i] = A[i]
    count += 1
#0は後からいれた要素ではありえないので削除
C = [i for i in B if i != 0]
#3と5のどちらでも割り切れない場合はだめ
flag = 0
for i in range(count):
  if C[i] % 3 != 0 and C[i] % 5 != 0:
    flag += 1
if flag == 0:
  print('APPROVED')
else:
  print('DENIED')
n = map(int, raw_input().split())
list_str = []
for count in range(0,n):
    list_str.append(raw_input())

for count in range(0,n-1):
    if count == 0:
        compare1 = set(list_str[count])
    else:
        compare1 = set(output)
    compare2 = set(list_str[count+1])
    output = list(compare1 & compare2)
print output

### FIXED CODE ###

n = int(raw_input())
list_str = []
for count in range(0,n):
    list_str.append(raw_input())
if n != 1:
	for count in range(0,n):
	    if count == 0:
	        output = set(list_str[count])
	    else:
	        compare1 = set(output)
	    	compare2 = set(list_str[count])
	    	output = list(compare1 & compare2)

	tmp_output = ""
	
	for count1 in range(0,len(output)):
		#print output[count1]
		min = 1000
		for count2 in range(0,n):
			num = list_str[count2].count(output[count1])
			if num < min:
				min = num
			#print min
		tmp_output += min*output[count1]
	output = tmp_output
	#output.sort()
else:
	output = list_str[0]
output = sorted(output)
output = ''.join(output)
print output
n,m=map(int,input()split())
dp=[1]*(n+1)
for i in range(m):
  dp[int(input())]=0
for i in range(2,n+1):
  if dp[i]>0:
    dp[i]=dp[i-1]+dp[i-2]
print(dp[n])

### FIXED CODE ###

n,m=map(int,input().split())
dp=[1]*(n+1)
for i in range(m):
  dp[int(input())]=0
for i in range(2,n+1):
  if dp[i]>0:
    dp[i]=dp[i-1]+dp[i-2]
print(dp[n]%1000000007)
N,K = map(int,input().split())
A = map(int, input().split())
count = [0] * N
for a in A:
  count[a] += 1

count.sort(reverse=True)
print(sum(count[K:]))


### FIXED CODE ###

N,K = map(int,input().split())
A = [int(j) for j in input().split()]
count = [0] * N
for a in A:
  count[a - 1] += 1

count.sort(reverse=True)
print(sum(count[K:]))
H,W =map(int,input().split())
if H==1 or W==1:
  print(1)
elif H%2==0:
      print(W*H//2)
else:
  if W%2==1:
    print(W*(H//2)+W//2+1)
  else:
    print(W*(H//2)+W//2)

### FIXED CODE ###

import math
a,b,c=map(int,input().split())
if c-a-b>0 and (c-a-b)**2 > 4*a*b:
  print('Yes')
else:
  print('No')
n,m=map(int,input().split())

t=[-1]*N
for i in range(m):
  s,c=map(int,input().split())
  s-=1
  if t[s] != -1 and t[s] != c:
    print(-1)
    exit()
  t[s]=c

if n != 1:
  if t[0] == 0:
    print(-1)
    exit()
  if t[0] == -1:
    t[0]=1
  for i in range(1,n):
    if t[i] == -1:
      t[i] = 0
else:
  if t[0] == -1:
    t[0] = 0
print(''.join(map(str,t)))

### FIXED CODE ###

n,m=map(int,input().split())

t=[-1]*n
for i in range(m):
  s,c=map(int,input().split())
  s-=1
  if t[s] != -1 and t[s] != c:
    print(-1)
    exit()
  t[s]=c

if n != 1:
  if t[0] == 0:
    print(-1)
    exit()
  if t[0] == -1:
    t[0]=1
  for i in range(1,n):
    if t[i] == -1:
      t[i] = 0
else:
  if t[0] == -1:
    t[0] = 0
print(''.join(map(str,t)))
n = int(input())
a = list(map(int, input().split()))
a.sort()
b = True
for i,j in enumerate(a):
  if n % 2:
    if j != ((i+1) // 2) * 2:
      b = False
      break
  else:
    if j != (i // 2) * 2 + 1:
      b = False
      break
if b == True:
  print(((n // 2) ** 2) % mod)
else:
  print(0)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
a.sort()
b = True
mod = 10 ** 9 + 7
for i,j in enumerate(a):
  if n % 2:
    if j != ((i+1) // 2) * 2:
      b = False
      break
  else:
    if j != (i // 2) * 2 + 1:
      b = False
      break
if b == True:
  print(pow(2,n//2,mod))
else:
  print(0)
array = input().split()
if (int(array[0] > int(array[1]) and int(array[1]) > int(array[2]):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

#
# 2b
#

def main():
    a, b, c = map(int, input().split())
    if a < b < c:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
N, C = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
mod = 10**9+7

acc = [[0] for _ in range(401)]
for i in range(401):
    for j in range(1, C+2):
        acc[i].append(((acc[i][-1] + pow(j, i, mod)) % mod))

dp = [[0 for _ in range(C+1)] for _ in range(N+1)]
dp[0][0] = 1
for i in range(N):
    for candy_cur in range(C+1):
        for candy_plus in range(C - candy_cur+1):
            dp[i+1][candy_cur + candy_plus] = (dp[i+1][candy_cur + candy_plus] + (dp[i][candy_cur]\
                                               * ((acc[candy_plus][B[i]] - acc[candy_plus][A[i]-1])%mod)%mod)) % mod

print(dp[-1][C])


### FIXED CODE ###

N, C = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
mod = 10**9+7

acc = [[0] for _ in range(401)]
for i in range(401):
    for j in range(1, 401):
        acc[i].append(((acc[i][-1] + pow(j, i, mod)) % mod))

dp = [[0 for _ in range(C+1)] for _ in range(N+1)]
dp[0][0] = 1
for i in range(N):
    for candy_cur in range(C+1):
        for candy_plus in range(C - candy_cur+1):
            dp[i+1][candy_cur + candy_plus] = (dp[i+1][candy_cur + candy_plus] + (dp[i][candy_cur]\
                                               * ((acc[candy_plus][B[i]] - acc[candy_plus][A[i]-1])%mod)%mod)) % mod

print(dp[-1][C])