Harryxun/stf_run huggingface dataset:
n = int(input())
h_list = list(map(lambda x: int(x), input().split()))

max_move = 0
current_move = 0
s = 0
t = 1
continue_flag = True


while continue_flag:
    if h_list[s] >= h_list[t]:
        current_move += 1
        s += 1
        t += 1
    else:
        max_move = max([max_move, current_move])
        current_move = 0
        s += 1
        t += 1
        
    if t == n:
        max_move = max([max_move, current_move])
        continue_flag = False
        
print(max_move)

### FIXED CODE ###

n = int(input())
h_list = list(map(lambda x: int(x), input().split()))

max_move = 0
current_move = 0
s = 0
t = 1
continue_flag = True

if n == 1:
    print(0)
else:
    while continue_flag:
        if h_list[s] >= h_list[t]:
            current_move += 1
            s += 1
            t += 1
        else:
            max_move = max([max_move, current_move])
            current_move = 0
            s += 1
            t += 1

        if t == n:
            max_move = max([max_move, current_move])
            continue_flag = False

    print(max_move)
import math
from functools import reduce
n = int(input())
a = list(map(int, input().split()))

def gcd(*num):
    return reduce(math.gcd, num)

print(gcd(*a))


### FIXED CODE ###

import fractions
from functools import reduce
n = int(input())
a = list(map(int, input().split()))

def gcd(*num):
    return reduce(fractions.gcd, num)

print(gcd(*a))
s = input()
t = input()

dp = [[0]*(len(t)+1) for i in range(len(s)+1)]

for i in range(1,len(s)+1):
  for j in range(1,len(t)+1):
    dp[i][j] = max(dp[i-1][j-1],dp[i][j-1])
    if s[i-1] == t[j-1]:
      dp[i][j] += 1

ansl = []
cnt = dp[-1][-1]
def tami(i,j):
  global cnt
  if cnt == 0:
    return
  if s[i-1] == t[j-1]:
    cnt -= 1
    ansl.append(i-1)
  if dp[i-1][j-1]==cnt:
    tami(i-1,j-1)
  elif dp[i][j-1]==cnt:
    tami(i,j-1)

tami(len(s),len(t))

ans = ""
for i in ansl:
  ans += s[i]
print(ans[::-1])

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

s = input()
t = input()

dp = [[0]*(len(t)+1) for i in range(len(s)+1)]

for i in range(1,len(s)+1):
  for j in range(1,len(t)+1):
    if s[i-1] == t[j-1]:
      dp[i][j] = max(dp[i-1][j-1]+1,dp[i-1][j],dp[i][j-1])
    else:
      dp[i][j] = max(dp[i-1][j],dp[i][j-1])

ansl = []
cnt = dp[-1][-1]
def tami(i,j):
  global cnt
  if cnt == 0:
    return
  if s[i-1] == t[j-1]:
    cnt -= 1
    ansl.append(i-1)
  if dp[i-1][j-1]==cnt:
    tami(i-1,j-1)
  elif dp[i][j-1]==cnt:
    tami(i,j-1)
  elif dp[i-1][j]==cnt:
    tami(i-1,j)

tami(len(s),len(t))

ans = ""
for i in ansl:
  ans += s[i]
print(ans[::-1])
import math

a, b = map(str, input().split())

n = int(a+b)
sq = np.sqrt(n)
if sq == int(sq):
    print('Yes')
else:
    print('No')


### FIXED CODE ###

import numpy as np

# a = '1'; b = '21'
a, b = map(str, input().split())

n = int(a+b)
sq = np.sqrt(n)
if sq == int(sq):
    print('Yes')
else:
    print('No')
X=int(input())
for j in range(100):
    for i in range(100):
        if abs(pow(i,5)-X) == pow(j,5):
            if pow(i,5)-pow(j,5)==X:
                print(i,j)
                sys.exit()
            else:
                print(i,-j)
                sys.exit()

### FIXED CODE ###

import sys
X=int(input())
for j in range(-118,120):
    for i in range(-118,120):
        if pow(i,5)-pow(j,5)==X:
            print(i,j)
            sys.exit()
A, B, C = map(int, input().split())
if A[-1] == B[0] and B[-1] == C[0]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

A, B, C = input().split()
if A[-1] == B[0] and B[-1] == C[0]:
  print("YES")
else:
  print("NO")
# coding: utf-8

# In[ ]:

N = int(input())
A = list(set(map(int, input().split())))


# In[ ]:

import copy
#import numpy as np


# In[3]:

def get_divisor_list(A):
    divisor_list = [1]
    if A == 1:
        return divisor_list
    else:
        for i in range(2, A//2+1):
            if A%i == 0:
                divisor_list.append(i)
        divisor_list.append(A)
        return divisor_list


# In[4]:

all_db = []
for i in range(N):
    all_db.append(set(get_divisor_list(A[i])))
#print(all_db)


# In[5]:

gcd_list = []
for i in range(N):
    all_dbc = copy.copy(all_db)
    all_dbc.pop(i)
    gcds = all_dbc[0].intersection(*all_dbc)
    gcd_list.append(max(gcds))
print(max(gcd_list))


# In[ ]:





### FIXED CODE ###


# coding: utf-8

# In[1]:

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


# In[2]:

#import copy
#import numpy as np
try:
    from fractions import gcd
except:
    from math import gcd


# In[ ]:

# 左からn個の最大公約数を求める O(n)
# 右からn個の最大公約数を求める O(n)
# n個目を抜いた最大公約数は n-1個目までの公約数とn+1個目からの公約数との公約数


# In[3]:

lg = [1]*(N)
rg = [1]*(N)
ans = 0


# In[4]:

#print(lg)
#print(rg)
#print(A)


# In[5]:

lg[0] = A[1]
rg[0] = A[N-2]
lg[1] = A[0]
rg[1] = A[N-1]
#print(lg, rg)
for i in range(1, N-1):
    #print(i)
    lg[i+1] = gcd(lg[i], A[i])
    #print(lg[i], A[i])
    rg[i+1] = gcd(rg[i], A[N-1-i])
    #print(rg[N-1-i], A[N-1-i])
#print(lg, rg)

for i in range(N):
    #print(i, lg[i], rg[N-i-1])
    tmp = gcd(lg[i], rg[N-i-1])
    #print(tmp)
    if ans < tmp:
        ans = tmp
    #print(ans)


# In[6]:

print(ans)


# In[ ]:

"""
[42 54 69 92 12 23]のとき
 1 [54 69 92 12 23]の最大公約数
 2 [42 69 92 12 23]
 3 [42 54 92 12 23]
 4 [42 54 69 12 23]

"""
l,r=map(int,input().split())
for i in range(l,r):
    for j in range(i+1,r+1):
        count=min(count,(i*j)%2019)
        if i*j%2019==0:
            break

print(count)


### FIXED CODE ###

l,r=map(int,input().split())
count=2019
for i in range(l,r):
    for j in range(i+1,r+1):
        count=min(count,(i*j)%2019)
        if i*j%2019==0:
            break
    if i*j%2019==0:
        break
print(count)
n,m = map(int,input().split())

scores = list()
for i in range(n):
    score = list(map(int,input().split()))
    scores.append(score)

smax=None
for i in range(n):
    scores_=list()
    for j in range(len(scores[i])):    
        if scores[i][j]<0:
            for k in range(n):
                scores_[k][j] = -scores[k][j]
        else:
            for k in range(n):
                scores_[k][j] = scores[k][j]
    ssum=list()
    for j in range(n):
        ssum.append(sum(scores_[j]))
    ssum.sort()
    
    for j in range(m):
        tmp+=ssum[-1]
        ssum.pop()
    if smax==None or tmp>smax:
        smax=tmp
print(smax)

### FIXED CODE ###

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

#取得
scores = list()
for i in range(n):
    score = list(map(int,input().split()))
    scores.append(score)

smax=None
for x in range(2):
    scores_=copy.deepcopy(scores)
    
    for i in range(n):
        scores_[i][0] = pow(-1,x)*scores[i][0]
    for y in range(2):
        for i in range(n):
            scores_[i][1] = pow(-1,y)*scores[i][1]
        for z in range(2):
            for i in range(n):
                scores_[i][2] = pow(-1,z)*scores[i][2]
        
            sumlist=list()
            for i in range(n):
                sumlist.append(sum(scores_[i]))
            sumlist.sort()
            
            tmp=0
            for eat in range(m):
                tmp+=sumlist[-1]
                sumlist.pop()
            if smax==None or tmp>smax:
                smax=tmp
print(smax)
import bisect
n,k = map(int,input().split())
a = list(map(int,input().split()))

# i が与えられたとき a1~aiまでの和を計算する( O(log n) )
def bitsum(bit,i):
    s = 0
    while i > 0:
        s += bit[i]
        i -= i&(-i)
    return s
    
# i と x が与えられたとき ai += x とする ( O(log n) )
def bitadd(bit,i,x):
    while i <= n:
        bit[i] += x
        i += i&(-i)
    return bit
    
#################################
import math

#bitの構築
n_ = int(math.log2(n)) + 1
bit = [0] * (2**n_)
bit.append(0)

################################
ass = 0
for j in range(n):
    ass += j-bitsum(bit,a[j])
    #bitsum(bit,a[j]): j-1番目までの中でa[j]以下のもの
    bit = bitadd(bit,a[j],1)

res = 0
b = sorted(a)

for e in b:
    kw = bisect.bisect_right(b,e)
    res += n-kw

mod = 10**9+7

print((k*ass%mod+res*k*(k-1)//2%mod)%mod)

### FIXED CODE ###

import bisect

n,k = map(int,input().split())
a = list(map(int,input().split()))
mod = 10**9+7

ass = 0
for i in range(n):
    for j in range(i):
        if a[i] < a[j]:
            ass += 1

res = 0
b = sorted(a)
for e in b:
    kw = bisect.bisect_right(b,e)
    res += n-kw

print((k*ass%mod+( (k*(k-1)//2)%mod )*res%mod)%mod)
a = int(input())
if (a[-1] == 2,4,5,7,9):
  print("hon")
if (a[-1] == 0,1,6,8):
  print("pon")
if (a[-1] == 3):
  print("bon")

### FIXED CODE ###

N = str(input())
b = int(N[-1])
if (b==2 or b==4 or b==5 or b==7 or b==9):
  print("hon")
elif (b==0 or b==1 or b==6 or b==8):
  print("pon")
elif (b==3):
  print("bon")
else:
  print("Error")
#https://atcoder.jp/contests/agc034/tasks/agc034_a
N,A,B,C,D = [int(i) for i in input().split()]
s = list(input())

flag = True
if C < D:
    for i in range(A,C):
        if s[i] == '#' and s[i+1] == '#':
            flag = False
    for i in range(B,D):
        if s[i] == '#' and s[i+1] == '#':
            flag = False
if C > D:
    for i in range(A,C-1):
        if s[i] == '#' or s[i+1] == '#' or s[i+2] == '#':
            flag = False
    for i in range(B,D-1):
        if s[i] == '#' or s[i+1] == '#' or s[i+2] == '#':
            flag = False

if flag == True:
    print('Yes')
else:
    print('No')



### FIXED CODE ###

import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]

n, a, b, c, d = MAP()
s = STR()

dp1 = [inf for _ in range(n + 1)]
dp1[a] = 0
dp1[a - 1] = 0
for i in range(a + 1,c + 1):
    if s[i - 1] == '.':
        dp1[i] = min(dp1[i - 1], dp1[i - 2]) + 1
dp2 = [inf for _ in range(n + 1)]
dp2[b] = 0
dp2[b - 1] = 0
for i in range(b + 1, d + 1):
    if s[i - 1] == '.':
        dp2[i] = min(dp2[i - 1], dp2[i - 2]) + 1

if a < b and c < d or a > b and c > d:
    if dp1[c] < inf and dp2[d] < inf:
        print('Yes')
    else:
        print('No')
else:
    if a > b and c < d:
        a, b = b, a
        c, d = d, c
    flag = False
    for i in range(b, d + 1): #抜かす場所
        if s[i - 2:i + 1] == '...': #抜かせる
            flag = True
            break
    if dp1[c] < inf and dp2[d] < inf and flag:
        print('Yes')
    else:
        print('No')
n = int(input())
distances = []
for _ in range(n):
    points = list(map(int, input().split()))
    distances.append(points)

total = 0
routes = list(itertools.permutations(range(n), n))
for route in routes:
    distance = 0
    for index in range(len(route)-1):
        idx1 = route[index]
        idx2 = route[index+1]
        distance += math.sqrt((distances[idx1][0] - distances[idx2][0]) ** 2 + (distances[idx1][1] - distances[idx2][1]) ** 2)
    total += distance

print(total / len(routes))

### FIXED CODE ###

import math
import itertools

# 与えられた数値の桁数と桁値の総和を計算する.
def calc_digit_sum(num):
    digits = sums = 0
    while num > 0:
        digits += 1
        sums += num % 10
        num //= 10
    return digits, sums


n = int(input())
distances = []
for _ in range(n):
    points = list(map(int, input().split()))
    distances.append(points)

total = 0
routes = list(itertools.permutations(range(n), n))
for route in routes:
    distance = 0
    for index in range(len(route)-1):
        idx1 = route[index]
        idx2 = route[index+1]
        distance += math.sqrt((distances[idx1][0] - distances[idx2][0]) ** 2 + (distances[idx1][1] - distances[idx2][1]) ** 2)
    total += distance

print(total / len(routes))
while True:
    (x, y) = (int(i) for i in input().split())
    if x = 0 and y = 0:
        break
    elif x <= y:
        print(x, y)
    else:
        print(y, x)

### FIXED CODE ###

while True:
    (x, y) = (int(i) for i in input().split())
    if x == 0 and y == 0:
        break
    elif x <= y:
        print(x, y)
    else:
        print(y, x)
import math
N = int(input())
al = list(map(int,input().split()))

ans = al[0]
for i in range(1,N):
    ans = math.gcd(ans, al[i])
print(ans)



### FIXED CODE ###

import fractions
N = int(input())
al = list(map(int,input().split()))

ans = al[0]
for i in range(1,N):
    ans = fractions.gcd(ans, al[i])
print(ans)
def main():
	N = int(input())
	seq = list(map(int, input().split()))
	seq = [seq[i] - i - 1 for i in range(N)]
	def helper(b):
		return sum([abs(seq[i] - b) for i in range(N)])
	ave = sum(seq) // N
	print(min(helper(ave), helper(ave + 1)))
	return 0
main()

### FIXED CODE ###

def main():
	N = int(input())
	if N % 2:
		print(2 * N)
	else:
		print(N)
	return 0
main()
'''
8方向走査

'.' は 空き、 '#' は爆弾の1行から複数行の「文字列」が与えられるので
Minesweeperのように、空きのマスに周囲8方向にある爆弾の数を埋める。
コンテスト中に実装すると、間違えることがあるので、dy や dx それらを使う部分は
予めスニペットなどで直ぐに読み出せるように準備しておく。
8方向走査の他、4方向走査、2方向走査も出題されるので準備しておく。
「文字列」 は 作成後に変更することができない。

ここでは、「文字列」 を 文字 の 「リスト」 とすることで 変更を可能にしている。
行継続文字はバックスラッシュ(円記号)

例えば if 条件 が長くなった場合、バックスラッシュを入れることで
その後の改行が無視されて行が継続していると見なされる。
上記のプログラム
if ny < 0 or H <= ny\
or nx < 0 or W <= nx:
バックスラッシュ無しで改行の場合、SyntaxError になる。
''(空文字).join(「リスト」)

「リスト」の 各要素 を 区切り文字 なし で結合して出力することができる。

' '(半角スペース).join(「リスト」)とすれば
「リスト」の 各要素 を 区切り文字 半角スペース で結合して出力することができる。
'''

# 下、右、上、左、右下、右上、左下、左上
dy = [1, 0, -1, 0, 1, -1, 1, -1]
dx = [0, 1, 0, -1, 1, 1, -1, -1]

H, W = map(int, input().split())
field = []

for i in range(H):
    field.append(list(input()))

for y in range(H):
    for x in range(W):

        if field[y][x] == '#':
            continue

        cnt = 0

        for k in range(8):
            ny = y + dy[k]
            nx = x + dx[k]

            if ny < 0 or H <= ny:
                    or nx < 0 or W <= nx:
                continue

            if field[ny][nx] == '#':
                cnt += 1

        field[y][x] = str(cnt)

for y in range(H):
    print("".join(field[y]))

### FIXED CODE ###

'''
8方向走査

'.' は 空き、 '#' は爆弾の1行から複数行の「文字列」が与えられるので
Minesweeperのように、空きのマスに周囲8方向にある爆弾の数を埋める。
コンテスト中に実装すると、間違えることがあるので、dy や dx それらを使う部分は
予めスニペットなどで直ぐに読み出せるように準備しておく。
8方向走査の他、4方向走査、2方向走査も出題されるので準備しておく。
「文字列」 は 作成後に変更することができない。

ここでは、「文字列」 を 文字 の 「リスト」 とすることで 変更を可能にしている。
行継続文字はバックスラッシュ(円記号)

例えば if 条件 が長くなった場合、バックスラッシュを入れることで
その後の改行が無視されて行が継続していると見なされる。
上記のプログラム
if ny < 0 or H <= ny\
or nx < 0 or W <= nx:
バックスラッシュ無しで改行の場合、SyntaxError になる。
''(空文字).join(「リスト」)

「リスト」の 各要素 を 区切り文字 なし で結合して出力することができる。

' '(半角スペース).join(「リスト」)とすれば
「リスト」の 各要素 を 区切り文字 半角スペース で結合して出力することができる。
'''

# 下、右、上、左、右下、右上、左下、左上
dy = [1, 0, -1, 0, 1, -1, 1, -1]
dx = [0, 1, 0, -1, 1, 1, -1, -1]

H, W = map(int, input().split())
field = []

for i in range(H):
    field.append(list(input()))

for y in range(H):
    for x in range(W):

        if field[y][x] == '#':
            continue

        cnt = 0

        for k in range(8):
            ny = y + dy[k]
            nx = x + dx[k]

            if ny < 0 or H <= ny\
                    or nx < 0 or W <= nx:
                continue

            if field[ny][nx] == '#':
                cnt += 1

        field[y][x] = str(cnt)

for y in range(H):
    print("".join(field[y]))
from collections import deque
h,w = map(int, input().split())
map = [list(input()) for _ in range(h)]
dis = [[float("inf")]*w for _ in range(h)]
dy = [1,0,-1,0]
dx = [0,1,0,-1]
que = deque([])
que.append((0,0))
dis[0][0]=1
count = 0

for num in range(h*w):
    p = que.popleft()
    if p[0]==h-1 and p[1]==w-1:
        break
    for i in range(4):
        ny = p[0] + dy[i]
        nx = p[1] + dx[i]
        if 0<=ny<h and 0<=nx<w and map[ny][nx]!="#" \
           and dis[ny][nx]==float("inf"):
            que.append((ny,nx))
            dis[ny][nx]=dis[p[0]][p[1]]+1

for i in range(h):
    for j in range(w):
        if map[i][j]=="#":
            count+=1

print(h*w-dis[h-1][w-1]-count if dis[h-1][w-1]!=float("inf") else -1)


### FIXED CODE ###

from collections import deque
h,w = map(int, input().split())
map = [list(input()) for _ in range(h)]
dis = [[float("inf")]*w for _ in range(h)]
dy = [1,0,-1,0]
dx = [0,1,0,-1]
que = deque([])
que.append((0,0))
dis[0][0]=1
count = 0
for i in range(h):
    for j in range(w):
        if map[i][j]=="#":
            count+=1

while que:
    p = que.popleft()
    if p[0]==h-1 and p[1]==w-1:
        break
    for i in range(4):
        ny = p[0] + dy[i]
        nx = p[1] + dx[i]
        if 0<=ny<h and 0<=nx<w and map[ny][nx]!="#" \
           and dis[ny][nx]==float("inf"):
            que.append((ny,nx))
            dis[ny][nx]=dis[p[0]][p[1]]+1

print(h*w-dis[h-1][w-1]-count if dis[h-1][w-1]!=float("inf") else -1)
s = input()
n = int(input())

t = 0
for i in range(n):
  a = input().split()
  if int(a[0]) == 1:
    t += 1
    #s = s[::-1]
  else:
    if t % 2 == 1:
      s = s[::-1]
    t = 0
    if int(a[1]) == 1:
      s = a[2] + s
    if int(a[1]) == 2:
      s = s + a[2]
    
print(s)

### FIXED CODE ###

import math
a = list(map(int,input().split()))

flag = False
for i in range(1001):
  if math.floor(i*0.08) == a[0]:
    if math.floor(i*0.1) == a[1]:
      flag = True
      break

if flag:
  print(i)
else:
  print("-1")
K = int(input())
m = 0
for i in range(K):
    m = (m * 10 + 7) % K
    if m == 0:
        print(i)
        break
    elif m == k-1:
        print(-1)
        break

### FIXED CODE ###

X = int(input())
if X >= 30:
    print("Yes")
else:
    print("No")
list1=[]
A1,A2,A3=map(int,input().split())
A4,A5,A6=map(int,input().split())
A7,A8,A9=map(int,input().split())
N=int(input())
for i in range(1,N+1):
    list1.append(int(input()))

list2=[A1,A2,A3,
    A4,A5,A6,
    A7,A8,A9]
for x in range(N):
    if (list1[x] in list2)==True:
        list2[x]="Bingo"
    else:list2[x]="Not-Bingo"

if list2[0]==list2[1]==list2[2]:
    print("Yes")
if list2[0]==list2[3]==list[6]:
    print("Yes")
if list2[3]==list[4]==list[5]:
    print("Yes")
if list2[6]==list[7]==list[8]:
    print("Yes")
if list2[1]==list[4]==list[7]:
    print("Yes")
if list2[2]==list[5]==list[8]:
    print("Yes")
if list2[0]==list2[4]==list[8]:
    print("Yes")
if list2[2]==list[4]==list[6]:
    print("Yes")

### FIXED CODE ###

import sys
list1=[]
list3=["Bingo","Bingo","Bingo"]
A1,A2,A3=map(str,input().split())
A4,A5,A6=map(str,input().split())
A7,A8,A9=map(str,input().split())
n=int(input())
list1=[input() for i in range(1,n+1)]
list2=[[A1,A2,A3],
    [A4,A5,A6],
    [A7,A8,A9]]
for y in range(3):
    for x in range(n):
            if (list1[x] in list2[y])==True:
                s=list2[y].index(list1[x])
                list2[y][s]="Bingo"
#横
for i in range(3):
    if list2[i]==list3:
        print("Yes")
        sys.exit()
#斜め
if list2[0][0]==list2[1][1] and list2[1][1]==list2[2][2]:
    print("Yes")
elif list2[0][2]==list2[1][1] and list2[1][1]==list2[2][0]:
    print("Yes")
#縦
elif list2[0][0]==list2[1][0] and list2[1][0]==list2[2][0]:
    print("Yes")
elif list2[0][1]==list2[1][1] and list2[1][1]==list2[2][1]:
    print("Yes")
elif list2[0][2]==list2[1][2] and list2[1][2]==list2[2][2]:
    print("Yes")
elif n<=2:
    print("No")
else:
    print("No")
import math
N=int(input())
A=list(map(int,input().split()))
Ae1=[]
Ao1=[]
for i in range(N):
    if A[i]%2==0:
        Ae1.append(A[i])
    else:
        Ao1.append(A[i])
if Ao1!=[]:
    s=0
    Ao=sorted(Ao1,reverse=True)
    i=0
    while i<=len(Ao)-1:
        a=int(math.log2(Ao[i]))
        if 2**(a+1)-Ao[i] in Ao[i:]:
            s+=1
            Ao.remove(2**(a+1)-Ao[i])
            i+=1
        else:
            i+=1
else:
    s=0
if Ae1!=[]:
    t=0
    Ae=sorted(Ae1,reverse=True)
    j=0
    while j<=len(Ae):
        b=int(math.log2(Ae[j]))
        if 2**(a+1)-Ae[j] in Ae[j:]:
            s+=1
            Ae.remove(2**(a+1)-Ae[j])
            j+=1
        else:
            j+=1
else:
    t=0
print(s+t)
        

### FIXED CODE ###

S=input()
a=0
b=0
for i in range(len(S)):
    if S[-i-1]=="B":
        a+=i-b
        b+=1
print(a)
N, A, B = map(int, input().split())

if A > B:
    print(0)
elif N == 1:
    print(0)

else:
    print((B-A)(N-2)+1)

### FIXED CODE ###

N, A, B = map(int, input().split())

if A > B:
    print(0)
elif N == 1 and A != B:
    print(0)
else:
    print((B-A)*(N-2)+1)
n,k = map(int,input().split())
aList = input().split()
aList = [int(i) for i in aList]
cn=0

for i in range(len(aList)):
  for j in range(len(aList[i:])):
    jj = len(aList)-j
    if(i==jj):
       break
    if(sum(aList[i:jj]) >= k):
      cn+=1
    else:
      break;
print(cn)

### FIXED CODE ###

x,a = input().split()
x = int(x)
a = int(a)
if(x<a):
  print(0)
else:
  print(10)
r = input()
print(r ** 2)

### FIXED CODE ###

r = int(input())
print(r ** 2)
x = str(input())
a =int(x[0])
b=int(x[1]9
c=int(x[2])


print(a+b+c)


### FIXED CODE ###

x = str(input())
a =int(x[0])
b=int(x[1])
c=int(x[2])


print(a+b+c)
n=int(input())
l=[]
l1=[]
for i in range(n):
    x,y=map(int,input().split())
    l.append((x,y))
N=math.factorial(n)
c=itertools.permutations(l,n)
l=list(c)
for j in range(N):
    for k in range(n-1):
        l1.append(math.sqrt((l[j][k][0]-l[j][k+1][0])**2+(l[j][k][1]-l[j][k+1][1])**2))
print(sum(l1)/N)


### FIXED CODE ###

import itertools
import math
n=int(input())
l=[]
l1=[]
for i in range(n):
    x,y=map(int,input().split())
    l.append((x,y))
N=math.factorial(n)
c=itertools.permutations(l,n)
l=list(c)
for j in range(N):
    for k in range(n-1):
        d=math.sqrt((l[j][k][0]-l[j][k+1][0])**2+(l[j][k][1]-l[j][k+1][1])**2)
        l1.append(d)
print(sum(l1)/N)
N = int(input())
M = int(input())
lst = []
for i in range(M):
    lst.append(int(input()))
plus = 0
for a in lst:
    plus += a
if plus <= N:
    print(N-plus)
else:
    print('-1')

### FIXED CODE ###

N,M = map(int,input().split())
lst = list(map(int,input().split()))
plus = 0
for a in lst:
    plus += a
if plus <= N:
    print(N-plus)
else:
    print('-1')
N = int(input())
vals = map(int, input().split())
result = 1000000
for i in range(0, N):
    val = vals[i]
    count = 0
    while True:
        if val % 2 == 1:
            break
        val /= 2
        count += 1
    if result > count:
        result = count
print (result)


### FIXED CODE ###

N = int(input())
vals = list(map(int, input().split()))
count = 0
is_odd = False
while True:
    for i in range(0, N):
        if vals[i] % 2 == 1:
            is_odd = True
        vals[i] /= 2
    if is_odd:
        break
    count += 1
print (count)
s=list(input())
t=list(input())
S=[0 for i in range(len(s)-len(t)+1)]
for i in range(len(s)-len(t)+1):
  for j in range(len(t)):
    if t[j]==s[j+i]:
      S[i]+=1

S_max=max(S)
print(t-S_max)

### FIXED CODE ###

s=list(input())
t=list(input())
S=[0 for i in range(len(s)-len(t)+1)]
for i in range(len(s)-len(t)+1):
  for j in range(len(t)):
    if t[j]==s[j+i]:
      S[i]+=1
      
S_0=max(S)
print(len(t)-S_0)
n = int(input)
xy = [list(map(int,input().split())) for _ in range(n)]

ans = 0
for i in range(n-1):
  for j in range(i+1,n):
    ans += pow(pow(xy[i][0] - xy[i][1],2) + pow(xy[j][0] - xy[j][1],2),0.5)
print(ans*2/n)

### FIXED CODE ###

n = int(input())
xy = [list(map(int,input().split())) for _ in range(n)]

ans = 0
for i in range(n-1):
  for j in range(i+1,n):
    ans += ((xy[i][0] - xy[j][0])**2 + (xy[i][1] - xy[j][1])**2)**0.5
print(ans*2/n)