peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
n, m = map(int, input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
 
for i in a:
    for j in b:
        if j not in i:
            print('No')
            quit()
print('Yes')
# Judge status: Accepted
s = input()

s = " " + s

ans = 0

if len(s) % 2 == 0:
    for i in range(1, len(s) // 2 + 1):
        if s[i] != s[i * -1]:
            ans += 1
else:
    for i in range(1, len(s) // 2 + 1):
        if s[i] != s[i * -1]:
            ans += 1

print(ans)
# Judge status: Accepted
N = int(input())
alpha = 'abcdefghijklmnopqrstuvwxyz'

def src(s):
  i = 0
  while s != alpha[i]:
    i += 1
  return i
def super_troop(n):
  if n == 1:
    return ['a']
  else:
    L = super_troop(n-1)
    LL = []
    for i in L:
      S = [j for j in i]
      S.sort(reverse=True)
      for k in range(src(S[0])+2):
        LL.append(i + alpha[k])
    return LL
X = super_troop(N)
X.sort()
for i in range(len(X)):
  print(X[i])
# Judge status: Accepted
a,b,x = map(int,input().split())

up = b//x*x
if a%x == 0:
    down = a
else:
    down = (a//x+1)*x
ans = (up-down)//x+1
print(ans)
# Judge status: Accepted
A, B = map(int, input().split())
print(max(2*A-1, 2*B-1, A+B))
# Judge status: Wrong Answer
x=[1,2,0,4,5]
if 0 in x:
    print(x.index(0))
# Judge status: Accepted
from math import gcd


def lgcd(l):
    res = l[0]
    for i in range(1, len(l)):
        res = gcd(res, l[i])

    return res


n = int(input())
print(lgcd(list(map(int, input().split()))))
# Judge status: Accepted
N=int(input())
A=[]
for i in range (N):
	A.append(list(map(int,input().split())))
C=sorted(A,key=lambda A: A[1])
tmp=0
count=0
for i in range (N):
  tmp+=C[i][0]
  if tmp<=C[i][1]:
    count+=1
  else:
    print("No")
    break
if count==N:
  print("Yes")
# Judge status: Accepted
n = int(input())
l = [51] * 26
z = list('abcdefghijklmnopqrstuvwxyz')
for i in range(n):
    s = input()
    for j in range(26):
        l[j] = min(l[j],s.count(z[j]))

t = []
for i in range(26):
    if l[i] != 51:
        t.append((z[i]) * l[i])

print(''.join(t))
# Judge status: Accepted
n = int(input())

print(n*(n-1)//2)
# Judge status: Accepted
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 12 22:54:45 2020

@author: Kanaru Sato
"""

n,k,q = list(map(int, input().split()))
dict = {}

for i in range(q):
    ans = input()
    if ans not in dict:
        dict[ans] = 1
    else:
        dict[ans] += 1

points = []

for i in range(1,n+1):
    if k-q>0:
        points.append("Yes")
    elif str(i) in dict and dict[str(i)]+k-q>0:
        points.append("Yes")
    else:
        points.append("No")

for i in range(n):
    print(points[i])
# Judge status: Accepted
A, B = map(int, input().split())
S = input()

parta = S[:A]
partb = S[A+1:]

if S[A] != '-':
  ans = "No"
elif parta.isdecimal() and partb.isdecimal():
  ans = "Yes"
else:
  ans = "No"
print(ans)
# Judge status: Accepted
S = input()
l = len(S)
ans = 0

for i in range(2**(l-1)):
    T = S[0]
    for j in range(l-1):
        if i>>j & 1:
            T = T + "-"
        else:
            T = T + "+"
        T = T+S[j+1]
    if eval(T) == 7:
        print(T+"=7")
        exit()
# Judge status: Wrong Answer
a=input()
a=int(a)
b=input()
c=""
if a>=len(b):
  print(b)
else:
  for i in range(a):
    c=c+b[i]
  print(c)
# Judge status: Accepted
n, a, b = map(int,input().split(' '))
total = 0
for num in range(1,n+1):
    split_nums = [int(s) for s in list(str(num))]
    sum = 0
    for s in split_nums:
        sum += s
    if a <= sum and sum <= b:
        total += num
print(total)
# Judge status: Wrong Answer
from fractions import gcd
import math

def get_prime_numbers(n):
  prime_nums = {}
  for i in range(2, int(math.sqrt(n)) + 1):
    while n % i == 0:
      if i in prime_nums.keys():
        prime_nums[i] += 1
      else:
        prime_nums[i] = 1
      n //= i
  if n != 1:
    if n in prime_nums.keys():
      prime_nums[n] += 1
    else:
      prime_nums[n] = 1
  return prime_nums
 
a, b = map(int, input().split())
gcd_n = gcd(a, b)
prime_nums = get_prime_numbers(gcd_n)
print(len(prime_nums.keys()))
# Judge status: Accepted
n = int(input())
ans = "No"
for i in range(0, 101, 4):
    for j in range(0, 101, 7):
        if i+j == n:
            ans = "Yes"
            break

print(ans)
# Judge status: Accepted
n = int(input())
x, y = 1, n
for i in range(1, int(n**0.5)+1):
        if n%i==0: x = i
y = n//x
print(x+y-2)
# Judge status: Wrong Answer
def hoge():
  dp = [0] * (n + 5)
  dp[0] = 0
  dp[1] = 2
  for i in range(2, n):
    if step_list[i - 1] == True:
      dp[i] = dp[i - 2] + dp[i - 1]
      dp[i] %= 1000000007
  return dp[n - 1]

def solve():
  global n, m, a_list, step_list
  n, m = map(int, input().split())
  a_list = [0] * m
  step_list = [True] * (n + 5)
  for i in range(m):
    a_list[i] = int(input())
    step_list[a_list[i]] = False
  ans = hoge()
  print(ans)
  return 0

if __name__ == "__main__":
  solve()
# Judge status: Accepted
n = int(input())
s = input()
t = set(s)
ans = 0

for i in range(1,n):
    count = 0
    s1 = s[:i]
    s2 = s[i:]
    for i in t:
        if s1.count(i) > 0 and s2.count(i) > 0:
            count += 1
            
    if ans < count:
        ans = count
print(ans)
# Judge status: Accepted
def mips():
    return map(int,input().split())
N,K = mips()
C = [c for c in mips()]
dist = []
for i in range(N-K+1):
    dist.append(min(abs(C[i]) + abs(C[i+K-1]-C[i]),abs(C[i+K-1]) + abs(C[i+K-1]-C[i])))
print(min(dist))
# Judge status: Accepted
N = int(input())
st = set()
for _ in range(N):
    st.add(input())
print(len(st))
# Judge status: Accepted
S = input()
subT = ['eraser', 'erase', 'dreamer', 'dream', ]
for i in subT:
    S = S.replace(i, '')

if S == '':
    print('YES')
else:
    print('NO')
# Judge status: Accepted
s,t=input().split()
a,b=map(int,input().split())
u=input()
if u==s:
	a-=1
else:
	b-=1
print(a,b)
# Judge status: Accepted
N = int(input())
S = input()
al = [0 for _ in range(26)]
for i in range(N):
    al[ord(S[i])-97] += 1
count = 1
for j in range(26):
    count *= al[j]+1
    count %= 10**9+7
print((count-1)%(10**9+7))
# Judge status: Accepted
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
        return a

def main():
    X = int( input())
    # if X > 90:
    #     X -= 90
    for i in range(1, X+1):
        if i*360%X == 0:
            print(i*360//X)
            return
if __name__ == '__main__':
    main()
# Judge status: Accepted
A, B = map(int, input().split())

if A == B:
    print('Draw')
elif A == 1:
    print('Alice')
elif B == 1:
    print('Bob')
elif A > B:
    print('Alice')
else:
    print('Bob')
# Judge status: Accepted
l = [int(input()),int(input())]

for i in range(3):
    if((i+1) not in l):
        print(i+1)
        exit()
# Judge status: Accepted
k = int(input())
a, b = list(map(int, input().split()))
if a // k == b // k:
  if a % k == 0:
    print("OK")
  else:
    print("NG")
else:
  print("OK")
# Judge status: Accepted
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

a,b,c=map(int,input().split())
if a<=c<=b or a>=c>=b:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))

def devide(a,c,n):
    even = True
    for i in range(n):
        if a[i] % 2 != 0:
           even = False
        else:
            a[i] = int(a[i] / 2)
    return devide(a,c+1,n) if even else c
print(devide(a,0,n))
# Judge status: Wrong Answer
w = input()
c = w.count('w')
print('Yes' if c % 2 == 0 and c > 0 else 'No')
# Judge status: Accepted
N, M = map(int, input().split())
MOD = 10**9+7
d = abs(N-M)
if d > 1:
    print(0)
else:
    ans = 1
    for i in range((N+M)//2):
        ans *= (N-i)*(M-i)
        ans %= MOD
    if (N+M) % 2 == 0:
        ans *= 2
    print(ans % MOD)
# Judge status: Wrong Answer
w,a,b = map(int, input().split())

ans = min(abs(b - (a + w)), abs(a - (b + w)))
if ans < 0:
	print(0)
else:
	print(ans)
# Judge status: Accepted
from collections import Counter
n=input()
o=Counter(n[0::2])
e=Counter(n[1::2])
m=len(n)-max(o["0"]+e["1"],o["1"]+e["0"])
print(m)
# Judge status: Accepted
input()
A=list(map(int,input().split()))
count=0
while all(a%2==0 for a in A):
    A=[a/2 for a in A]
    count+=1
print(count)
# Judge status: Wrong Answer
n = int(input())
s = list(input())

c0 = 0
c1 = 0
z0 = 0
z1 = 0
for i in range(n):
    if s[i] == "(":
        c0 += 1
    else:
        c1 += 1
    if c0 < c1 and s[i] != "(":
        z0 += 1
    if c0 > c1 - z0 and s[i] != ")":
        z1 += 1

if s[-1] == ")":
    z1 -= 1
ans = ["("]*z0 + s + [")"]*max(z1,0)
print("".join(ans))
# Judge status: Accepted
N = int(input())

ans = 100000
for i in range(0,N+1,1):#i円6で払うj円9で払う
    j = N - i

    icount = 0
    while i!=0:
        icount += (i%6)
        i=i//6

    jcount = 0
    while j!=0:
        jcount += (j%9)
        j=j//9

    ans = min(icount+jcount,ans)

print(ans)
# Judge status: Accepted
a, b, k = map(int, input().split())
ans = []
for i in range(1, min(a, b) + 1):
    if a % i == 0 and b % i == 0:
        ans.append(i)
ans.sort(reverse=True)
print(ans[k-1])
# Judge status: Accepted
d = int(input())
c = {}
s = []
C = list(map(int, input().split()))
for i in range(26):
    c[i] = C[i]
for i in range(d):
    s.append(list(map(int, input().split())))

t = 0
while t < 365:
    for i in range(26):
        if t < 365:
            t += 1
            print(26-i)
        else:
            break;
# Judge status: Accepted
n = int(input())
a = []
for i in range(n):
    ai = int(input())
    a.append(ai)

lst = [a[0]]
for i in range(1, n):
    ai = a[i]
    left = -1
    right = len(lst)
    while left+1 < right:
        mid = (left + right) // 2
        if lst[mid] < ai:
            right = mid
        else:
            left = mid
    if right == len(lst):
        lst.append(ai)
    else:
        lst[right] = ai
print(len(lst))
# Judge status: Accepted
import itertools
import math

n = int(input())
li = list(itertools.permutations(range(1,n+1)))
a = []
for _ in range(n):
    a.append([int(x) for x in input().split()])
ans = 0
for i in li:
    for j in range(n-1):
        x = a[i[j]-1][0]-a[i[j+1]-1][0]
        y = a[i[j]-1][1]-a[i[j+1]-1][1]
        ans += math.sqrt(x**2+y**2)
x = 1
for i in range(1,n+1):
    x *= i
print(ans/x)
# Judge status: Accepted
n = list(map(int,input().split()))

a =n[0]*n[2]
b =n[0]*n[3]
c =n[1]*n[2]
d =n[1]*n[3]

x = max(a,b,c,d)

print(x)
# Judge status: Accepted
N=int(input())
print(N*800-(N//15)*200)
# Judge status: Accepted
import statistics
n = int(input())
X = list(map(int, input().split()))
X_ = sorted(X)
med = X_[n//2-1]
med_2 = X_[n//2]
for i in range(n):
    if X[i]>med:
        print(med)
    else:
        print(med_2)
# Judge status: Accepted
a = []
max, index, ans = 0, 0, 0
for i in range(5):
    tmp = int(input())
    a.append(tmp)
    if 10 - tmp % 10 > max and tmp % 10 != 0:
        max, index = 10 - tmp % 10, i
for i in range(5):
    if i == index or a[i] % 10 == 0:
        ans += a[i]
    else:
        ans += a[i] + 10 - a[i] % 10
print(ans)
# Judge status: Accepted
n,m = map(int,input().split())
l = [0]*m
r = [0]*m
for i in range(m):
    l[i],r[i] = map(int,input().split())
if min(r)-max(l) < 0:
    print(0)
else:
    print(min(r)-max(l)+1)
# Judge status: Wrong Answer
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

W = ['Sunny', 'Cloudy', 'Rainy']
A = readline().decode('utf8').rstrip()


print(W[W.count(A)%3])
# Judge status: Wrong Answer
a = list(map(int, input()))
ans = ""
for i in range(2 ** 3):
  for j in range(1, 4):
    if i << j & 1:
      a[j] *= -1
    if sum(a) == 7:
      ans += (str)(a[0])
      for j in range(1, 4):
        if a[j] >= 0:
          ans += "+" + (str)(a[j])
        else:
          ans += (str)(a[j])
      ans += "=7"
      break
  else:
    continue
  break
print(ans)
# Judge status: Wrong Answer
N,A,B = map(int,input().split())
iti=(B-A+1)/2 +A-1
enu=(B-A+1)/2 +N-B
if( (B-A)%2 == 0):
   print( int( (B-A)/2 ) )
else:
  print(int(iti) if A-1<=N-B else int(enu))
# Judge status: Accepted
from itertools import accumulate
n=int(input())
a=list(map(int,input().split()))
s=sum(a)
# a=[0]+a
acc=accumulate(a)
acc=list(acc)

sunuke=0
arai=0
ans=10**18
for i in range(1,n):
    sunuke=acc[i-1]
    arai=s-sunuke
    t=abs(sunuke-arai)
    ans=min(t,ans)
print(ans)
# Judge status: Accepted
n=int(input())
a=list(map(int, input().split()))
res=0
max=a[0]
for i in range(1,n):
    if a[i]<max:
        res+=max-a[i]
    else:
        max=a[i]
print(res)
# Judge status: Accepted
N, K = map(int, input().split())
if N % K == 0:
  print(0)
else:
  print(1)
# Judge status: Accepted
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

n = int(input())
s = str(n)
k = len(s)
c = int(s[0])
if s == str(c) + "9"*(k-1):
    print(c + 9*(k-1))
else:
    print(c+9*(k-1)-1)
# Judge status: Accepted
def myAnswer(N:int,A:list) -> int:
   accum = [A[0]]
   total = sum(A)
   ans = []
   for i in range(1,N):
      accum.append(accum[i-1] + A[i])
   accum.pop()
   # print(accum)
   for x in accum:
      y = total - x
      ans.append(abs(x - y))
      # print(ans)

   return min(ans)

def modelAnswer():
   return
def main():
   N = int(input())
   A = list(map(int,input().split()))
   print(myAnswer(N,A))
if __name__ == '__main__':
   main()
# Judge status: Wrong Answer
n = int(input())
lis = list(map(int, input().split()))

cnt2 = 0
cnt4 = 0
for i in lis:
    if i % 4 == 0:
        cnt4 += 1
    elif i % 2 == 0:
        cnt2 += 1

if 2 * cnt4 + cnt2 >= n:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n, a, b = map(int, input().split())
if n == 1:
  if a == b:
    print(1)
  else:
    print(0)
elif n == 2:
  if a > b:
    print(0)
  else:
    print(1)
else:
  ans = max(0, (n-2)*(b-a)+1)
  print(ans)
# Judge status: Accepted
input();a,b1,b2,b4,r=list(map(int,input().split())),0,0,0,'NYoe s'
for i in a:
  if i%2!=0: b1+=1
  elif i%4==0: b4+=1
  else: b2+=1
print([r[b1<=b4::2],r[b1<=b4+1::2]][not b2])
# Judge status: Wrong Answer
n, m = map(int, input().split())

if n==1 or m==1:
  c = max(0, m-2)
  d = max(c, n-2)
  print(d)
else:
  print((n-2)*(m-2))
# Judge status: Accepted
N = int(input())

sum = 0
for i in range(30):
    for j in range(20):
        total = 4*i + 7*j
        if total == N:
            sum += 1

if sum > 0:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N,K=map(int,input().split())
R,S,P=map(int,input().split())
T=input()
T=list(T)

score=0

for i in range(N):
    if i-K<0 or T[i-K]!=T[i]:
        if T[i]=="r":
            score+=P
        elif T[i]=="p":
            score+=S
        elif T[i]=="s":
            score+=R
    else:
        T[i]="a"

print(score)
# Judge status: Accepted
import sys

S = list(input())
n = len(S)
for i in range(n) :
    if S[2*i] == "L" :
        print("No")
        sys.exit()
    if 2*i == n-1 :
        break
    if S[2*i+1] == "R" :
        print("No")
        sys.exit()
    if 2*i + 1 == n-1 :
        break
print("Yes")
# Judge status: Accepted
S = input()
if S[-1] == "s":
    print(S + "es")
else:
    print(S + "s")
# Judge status: Accepted
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def main():
    n = ri()
    s = input()
    ns = ""
    for c in s:
        ns += alp[(ord(c)-ord('A')+n)%26]
    print(ns)


if __name__ == '__main__':
    main()
# Judge status: Accepted
n = int(input()) - 1

al = 'abcdefghijklmnopqrstuvwxyz'

def c_a(d, cs):
  nd = d // 26
  cd = d % 26
  if nd >= 26:
    cs = c_a(nd - 1, cs) + al[cd]
  elif nd == 0:
    cs = al[cd]
  else:
    cs = al[nd - 1] + al[cd]
  return cs

print(c_a(n, ''))
# Judge status: Accepted
import math
N = int(input())

ans = 1
for i in range(1,math.floor(math.sqrt(N))+1):
  if i * i <= N:
    ans = i * i
    
print(ans)
# Judge status: Wrong Answer
n, x, y = map(int, input().split())
for k in range(1,n):
  ans = n
  if y - x == k:
    ans -= 1
  if y - x < k:
    ans -= n-k
  if k <= x and n - (k-1) >= y:
    print(ans)
  else:
    minus = max(k-x, 0) + max(y - (n-(k-1)), 0)
    print(ans-minus)
# Judge status: Wrong Answer
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, A, B, C, D = lr()
S = input()
if C > D:
    if "..." not in S[B-1:D]:
        print("No")
        exit(0)
if "##" in S[A-1:C] or "##" in S[B-1:D]:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
N, L = map(int, input().split())
*a, = map(lambda x:L+x-1, range(1, N+1))
a.sort(key=abs)
print(sum(a)-a[0])
# Judge status: Accepted
print('YNeos'[int(input())%500>int(input())::2])
# Judge status: Accepted
L=int(input())
print((L/3)**3)
# Judge status: Accepted
N,M = map(int,input().split())

n = min(N,M)
m = max(N,M)

if n*m == 1:
  print(1)
  exit()
if n == 1:
  print(m-2)
  exit()
print((n-2)*(m-2))
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    A, B, C = map(int, input().split())
    print(min(C, B // A))

if __name__ == '__main__':
    main()
# Judge status: Accepted
s = input()

moji = ("A","C","G","T")
count = [0]
tmp = 0
for i in range(len(s)):
    if s[i] in moji:
        tmp +=1
    else:
        count.append(tmp)
        tmp = 0
count.append(tmp)
print(max(count))
# Judge status: Accepted
n = int(input())
s = list(str(input()))

# (
x = 0
y = 0
for i in range(n):
    if s[i] == '(':
        x += 1

    if s[i] == ')':
        if x >= 1:
            x -= 1
        else:
            y += 1

for _ in range(x):
    s.append(')')

for _ in range(y):
    s.insert(0,'(')
ans = ''.join(s)
print(ans)
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 998244353


def resolve():
    n = int(input())
    A = sorted(list(map(int, input().split())))

    MAX_V = A[-1]
    target = MAX_V // 2 if MAX_V % 2 == 0 else (MAX_V + 1) // 2

    diff = f_inf
    res = A[0]
    for i in range(n - 1):
        if abs(target - A[i]) < diff:
            diff = abs(target - A[i])
            res = A[i]
    print(MAX_V, res)


if __name__ == '__main__':
    resolve()
# Judge status: Accepted
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if abs(A-B) <= T*(V-W):
    print('YES')
else:
    print('NO')
# Judge status: Accepted
from collections import Counter
W = input()
C = Counter(W)
for v in C.values():
    if v % 2 == 1:
        print('No')
        break
else:
    print('Yes')
# Judge status: Accepted
n,x,y=map(int,input().split())
x,y=x-1,y-1

ans=[0]*(n+1)



for i in range(n):
    for j in range(i+1,n):
        a=abs(i-j)
        b=abs(i-x)+1+abs(y-j)
        ans[min(a,b)]+=1
for i in range(1,n):
    print(ans[i])
# Judge status: Accepted
a,b = map(int,input().split())
ans = 0
for i in range(a,b+1):
    str_i = str(i)
    if str_i[0]==str_i[-1] and str_i[1]==str_i[-2]:
        ans += 1
print(ans)
# Judge status: Accepted
n,m = map(int,input().split())
if n>m:
    print(m//2)
else:
    if n*2>m:
        print(m//2)
    else:
        cnt = 0
        m -= n*2
        cnt += n
        if m>=4:
            cnt+=m//4
        print(cnt)
# Judge status: Accepted
n = int(input())
l = [int(x) for x in input().split()]

order = 0
subs = []
tmp = []

prev = 0
d = []
t = [l[0]]
for x in range(len(l)-1):
  a,b = l[x],l[x+1]
  c = a-b
  # print(a,b,c, prev)
  if c == 0:
    t.append(b)
  elif prev == 0:
    t.append(b)
    prev = c
  elif (c < 0  and prev < 0) or (c > 0 and prev > 0):
    t.append(b)
  else:
    prev = 0
    d.append(t)
    t = [b]
d.append(t)

print(len(d))
# Judge status: Accepted
N,M = map(int,input().split())
X = []
for i in range(N):
    K = list(map(int,input().split()))
    for i in range(K[0]):
        X.append(K[i+1])
ans = 0
for j in range(M):
    if X.count(j+1) == N:
        ans += 1
print(ans)
# Judge status: Accepted
n,k = map(int,input().split())
P = list(map(int,input().split()))



def E(x):
    # ans = 0
    tmp = (x*(x+1))/2 if x % 2 == 0 else x+(((x-1)*(x))/2)
    return tmp/x
ans = 0
for i in range(len(P)):
    P[i] = round(E(P[i]),1)
max_v = tmp = sum(P[:k])
l = 0
r = k
for i in range(1,len(P)-k+1):
    tmp = tmp-P[i-1]+P[r]
    max_v = max(max_v, tmp)
    r += 1
print(max_v)
# Judge status: Accepted
from collections import Counter
n = int(input())
lst = list(map(int, input().split()))
cntr = Counter(lst)
res = 0
for i in cntr:
  if cntr[i] >= i:
    res += (cntr[i] - i)
  else:
    res += cntr[i]
print(res)
# Judge status: Wrong Answer
N = int(input())
L = sorted(list(map(int,input().split())))

ans = 0
for i in range(N):
    for j in range(i+1,N):
        for k in range(j+1,N):
            if (L[i] + L[j] >= L[k]) and (L[i] != L[j]) and (L[j] !=L[k]):
                ans += 1
print(ans)
# Judge status: Wrong Answer
#C - Same Integers
ABC = list(map(int,input().split()))
ABC = sorted(ABC,reverse = True)
A = ABC[0]#max
B = ABC[1]
C = ABC[2]#min
print(ABC)
count = 0
while A != B:
    C += 1
    B += 1
    count += 1
while (B - C)%2 == 1:
    A += 1
    B += 1
    count += 1
while A!=C:
    C += 2
    count += 1
print(count)
# Judge status: Accepted
s=list(input())
k=int(input())
for i in range(k):
  if s[i]!="1":
    print(s[i])
    break
else:
  print(1)
# Judge status: Accepted
X,N = map(int,input().split())
P = list(map(int,input().split()))

a = list(range(102))
for i in range(N):
    a[P[i]] = -2
m = 102
for i in range(102):
    if m > (abs(X - a[i])):
        m = (abs(X - a[i]))
        ans = a[i]
print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
if len(a) == len(set(a)):
    print('YES')
else:
    print('NO')
# Judge status: Wrong Answer
print(input().replace('0B','').replace('1B','').replace('B',''))
# Judge status: Accepted
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
a.sort()
check = [True] * (a[-1] + 1)
cnt = Counter(a)

for i in range(n):
    if check[a[i]] == False:continue
    for j in range(a[i], a[-1] + 1, a[i]):
        if j == a[i]:continue
        check[j] = False

ans = 0
for i in range(n):
    if check[a[i]] and cnt[a[i]] == 1:ans += 1

print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())

if a+b>=c:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
a=int(input())
ans=a+a*a+a**2
print(ans)
# Judge status: Wrong Answer
n = int(input())
t,a = map(int,input().split())
h = [int(i) for i in input().split()]
mn = 10**9
for i in range(n):
    mn_kouho = a-(t-h[i]*0.006)
    if mn > mn_kouho:
        mn = mn_kouho
        ans = i+1
print(ans)
# Judge status: Wrong Answer
n = int(input())
a = [int(x) for x in input().split()]

a_even = []
for ai in a:
    if ai%2 == 0:
        a_even += [ai]

ans = "APPROVED"
for a_eveni in a_even:
    if a_eveni%3 != 0 or a_eveni%5 != 0:
        ans = "DENIED"
        break

print(ans)
# Judge status: Wrong Answer
N , K ,S =map(int,input().split())
if S == 10**9:
  ans = [S]*K  + [10**9]*(N-K)
else:
  ans = [S]*K + [1]*(N-K)
print(ans)
# Judge status: Accepted
N = int(input())
a = list(map(int, input().split()))

cnt = {}

for i in range(N):
    cnt.setdefault(a[i], 0)
    cnt[a[i]] += 1

ans = 0

for k, v in cnt.items():
    if k > v:
        ans += v
    else:
        ans += v - k

print(ans)
# Judge status: Accepted
h1, m1, h2, m2, k = map(int, input().split())
time = (h2 * 60 + m2) - (h1 * 60 + m1)
print(max(time - k, 0))
# Judge status: Wrong Answer
a, b, m = map(int, input().split())
li_a = list(map(int, input().split()))
li_b = list(map(int, input().split()))
li_c = []
for _ in range(m):
  x, y, c = map(int, input().split())
  x, y = x-1, y-1
  li_c.append(li_a[x]+li_b[y]-c)
li_a.sort()
li_b.sort()
li_c.sort()
ans = min(li_a[0]+li_b[0], li_c[0])
# Judge status: Accepted
string = list(input().split())

for s in string:
    print(s[0], end="")