Harryxun/stf_run huggingface dataset:
class DLL:
    class Node:
        def __init__(self, x, y, z):
            self.v = x
            self.prv = y
            self.nxt = z

    def __init__(self):
        init = DLL.Node(None, None, None)
        init.prv = init
        init.nxt = init
        self.size = 0
        self.init = init

    def insert(self, x):
        i = self.init
        j = i.nxt
        k = DLL.Node(x, i, j)
        i.nxt = k
        j.prv = k
        self.size += 1

    def deleteFirst(self):
        #if self.size != 0:
        i = self.init
        k = i.nxt
        j = k.nxt
        i.nxt = j
        j.prv = i
        self.size -= 1

    def deleteLast(self):
        #if self.size != 0:
        i = self.init
        k = i.prv
        j = k.prv
        i.prv = j
        j.nxt = i
        self.size -= 1

    def delete(self, x):
        #if self.size != 0:
        i = self.init
        k = i.nxt
        while 1:
            if k.v == x:
                i = k.prv
                j = k.nxt
                i.nxt = j
                j.prv = i
                self.size -= 1
                break
            else:
                if k.nxt == i:
                    break
                else:
                    k = k.nxt

    def getlist(self):
        f = self.init
        s = f.nxt
        l = f.prv
        lt = []
        while 1:
            if s != l:
                lt.append(s.v)
                s = s.nxt
            else:
                lt.append(l.v)
                break

        return ' '.join(lt)


n = int(input())
L = DLL()

for i in range(n):
    """
    com = input()
    if com[0] == "deleteFirst":
        L.deleteFirst()
    elif com == "deleteLast":
        L.deleteLast()
    else:
        C = com.split()
        if C[0] == "insert":
            L.insert(int(C[1]))
        elif C[0] == "delete":
            L.delete(int(C[1]))
    #L.prt()
    """

    com = input()
    if com[0] == "i":
        C = com.split()
        L.insert(int(C[1]))
    else:
        if com[6] == "F":
            L.deleteFirst()
        elif com[6] == "L":
            L.deleteLast()
        else:
            C = com.split()
            L.delete(int(C[1]))
print(L.getlist())



### FIXED CODE ###

from collections import deque

n = int(input())
L = deque()

for i in range(n):
    com = input()
    if com[0] == 'i':
        C = com.split()
        L.appendleft(int(C[1]))
    else:
        if com[6] == 'F':
            L.popleft()
        elif com[6] == 'L':
            L.pop()
        else:
            C = com.split()
            x = int(C[1])
            try:
                L.remove(x)
            except:
                pass

print(*L)
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, log
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
from decimal import Decimal
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
from decimal import *

N, A, B = MAP()
h = [INT() for _ in range(N)]
h.sort(reverse = True)

def is_OK(T):
	H = h.copy()
	H = [x-B*T for x in h]
	tmp = 0
	for x in H:
		tmp += max(0, -(-x//(A-B)))
		if T < tmp:
			return 0
			break
	else:
		return 1
l = 0
r = -(-max(h)//B)

while l+1 != r:
	p = -(-l-r)//2
	if is_OK(p):
		r = p
	elif is_OK(p)==0:
		l = p


if is_OK(p):
	print(p)
else:
	print(p+1)


### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, log
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
from decimal import Decimal
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
from decimal import *

N, A, B = MAP()
h = [INT() for _ in range(N)]
h.sort(reverse = True)

def is_OK(T):
	H = h.copy()
	H = [x-B*T for x in h]
	tmp = 0
	for x in H:
		tmp += max(0, -(-x//(A-B)))
		if T < tmp:
			return 0
			break
	else:
		return 1
l = 0
r = -(-max(h)//B)
p = -(-l-r)//2
while l+1 != r:
	p = -(-l-r)//2
	if is_OK(p):
		r = p
	elif is_OK(p)==0:
		l = p

if is_OK(p):
	print(p)
else:
	print(p+1)
import numpy as np
from scipy.sparse import lil_matrix, csr_matrix
from scipy.sparse.csgraph import shortest_path

n,m,limit=map(int,input().split())
G=np.zeros((n,n),dtype=np.int64)
for i in range(m):
    a,b,cost=map(int,input().split())
    G[a-1,b-1]=cost
    G[b-1,a-1]=cost
G=shortest_path(G,method='FW')
for c in range(n):
    for l in range(n):
        if G[c][l]<=limit:
            G[c][l]=1
        else:
            G[c][l]=0
G=shortest_path(G,method='FW')
q=int(input())
Q=[map(int,input().split())for i in range(q)]
for a,b in Q:
    print(int(G[a-1][b-1])-1)

### FIXED CODE ###

n,m,l=map(int,input().split())
cost=[[10**9+1]*n for i in range(n)]
length=[[10**9]*n for i in range(n)]
for i in range(m):
    a,b,c=map(int,input().split())
    a-=1
    b-=1
    cost[a][b]=c
    cost[b][a]=c
q=int(input())
st=[map(int,input().split())for i in range(q)]

for k in range(n):
    for i in range(n):
        for j in range(n):
            cost[i][j]=min(cost[i][j],cost[i][k]+cost[k][j])
for i in range(n):
    length[i][i]=0
for i in range(n):
    for j in range(n):
        if cost[i][j]<=l:
            length[i][j]=0
for k in range(n):
    for i in range(n):
        for j in range(n):
            length[i][j]=min(length[i][j],length[i][k]+length[k][j]+1)
for s,t in st:
    ch=min(length[s-1][t-1],length[t-1][s-1])
    print(-1 if ch>10**8 else ch)
_input = [i for i in open(0).read().split('\n') if i]
n, k = [int(i) for i in _input[0].split()]
edge = [[int(p) for p in i.split()] for i in _input[1:n]]

if not edge:
    print(k)
else:
    import collections
    import math

    all_edge_map = collections.defaultdict(list)
    for e in edge:
        all_edge_map[e[0]].append(e[1])
        all_edge_map[e[1]].append(e[0])

    root = edge[0]
    visit  = list(all_edge_map[root[0]])
    tree_edge_map = collections.defaultdict(list)
    colored = []
    total = (math.factorial(k) // math.factorial(k - len(all_edge_map[root[0]]) - 1))


### FIXED CODE ###

import sys
sys.setrecursionlimit(4100000)

_input = [i for i in open(0).read().split('\n') if i]
n, k = [int(i) for i in _input[0].split()]
edge = tuple([tuple([int(p) for p in i.split()]) for i in _input[1:n]])

factorial = [0] * (k + 1)
inverse = [0] * (k + 1)
MOD = 1000000007

# Ref: http://keita-matsushita.hatenablog.com/entry/2016/12/05/175024
def mod_pow1(n, k, mod):
    a = 1
    while k:
        if (k & 1) == 1:
            a = (a * n) % mod
        n = (n * n) % mod
        k >>= 1
    return a

# Ref: https://www.smartbowwow.com/2018/10/mod1097.html
def mod_pow2(n, k, mod):
    if k == 0:
        return 1
    if k % 2 == 0:
        a = mod_pow2(n, k // 2, mod)
        return (a * a) % mod
    else:
        return (n * mod_pow2(n, k - 1, mod)) % mod

#mod_pow = mod_pow1
# It's better to use built-in function for speed.
mod_pow = pow

def mod_factorial_inverse(k, mod):
    factorial[0] = 1
    inverse[0] = 1

    # Ref: http://keita-matsushita.hatenablog.com/entry/2016/12/05/184011
    for i in range(1, k + 1):
        factorial[i] = ((i * factorial[i - 1]) % mod) # factrial[i]
        inverse[i] = mod_pow(factorial[i], mod - 2, mod) # inverse[i]
 
total = 1

if not edge:
    print(k)
else:
    all_edge = tuple([[] for _ in range(n + 1)])
    for e in edge:
        all_edge[e[0]].append(e[1])
        all_edge[e[1]].append(e[0])
    all_edge = [set(v) for v in all_edge]

    if [v for v in all_edge if len(v) >= k]:
        print(0)
    else:
        mod_factorial_inverse(k, MOD)

        root = edge[0]
        total = (factorial[k] * inverse[k - len(all_edge[root[0]]) - 1]) % MOD

        def dfs(current, from_):
            global total
            child = all_edge[current]
            if len(child) - 1 > 0:
                total = (total * factorial[k - 2] * inverse[k - 2 - (len(child) - 1)]) % MOD
            for c in child:
                if c != from_:
                    dfs(c, current)
        for c in all_edge[root[0]]:
            dfs(c, root[0])
        print(total)
D,T,S = input().split(' ')
if D/S>T:
  print('No')
else
  print('Yes')

### FIXED CODE ###

D,T,S = input().split()
if int(D)/int(S) > int(T):
  print('No')
else:
  print('Yes')
import sys
import itertools
# import numpy as np
import time
import math
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import math

a, b, x = map(int, readline().split())

v = a * a * b
s = x / a


if x < v / 2:
    # print(math.degrees(math.atan(2 * s / b / b)))
    print(90 - math.degrees(math.atan(2 * s / b / b)))
else:
    print(90 - math.degrees(math.atan(a / (b - (2 * s / a - b)))))



### FIXED CODE ###

import sys
import itertools
# import numpy as np
import time
import math
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b, x = map(int, readline().split())

v = a * a * b
s = x / a

if x == v:
    print(0)
    exit()

if x <= v / 2:
    # print(math.degrees(math.atan(2 * s / b / b)))
    print(90 - math.degrees(math.atan(2 * x / a / b / b)))
else:
    print(90 - math.degrees(math.atan(a / (b - (2 * s / a - b)))))
from bisect import bisect
    A,B,Q=map(int, input().split())
    s=[int(input()) for _ in range(A)] + [99**99]
    t=[int(input()) for _ in range(B)] + [99**99]
    snt=[0]*A + [99**99]
    tns=[0]*B + [99**99]
    for i in range(A):
    	p = bisect(t, s[i])
    	snt[i] = min(abs(s[i] - t[p-1]), abs(s[i] - t[p]))
    for i in range(B):
    	p = bisect(s, t[i])
    	tns[i] = min(abs(t[i] - s[p-1]), abs(t[i] - s[p]))
    for _ in range(Q):
    	x = int(input())
    	ans = []
    	p = bisect(s, x)
    	ans.append(abs(s[p] - x) + snt[p])
    	ans.append(abs(s[p-1] - x) + snt[p-1])
    	p = bisect(t, x)
    	ans.append(abs(t[p] - x) + tns[p])
    	ans.append(abs(t[p-1] - x) + tns[p-1])
    	print(min(ans))

### FIXED CODE ###

from bisect import bisect
A,B,Q=map(int, input().split())
s=[int(input()) for _ in range(A)] + [10**11]
t=[int(input()) for _ in range(B)] + [10**11]
for _ in range(Q):
	x = int(input())
	ans = []
	ps = bisect(s, x)
	pt = bisect(t, x)
	for vs in (s[ps], s[ps-1]):
		for vt in (t[pt], t[pt-1]):
			ans.append(abs(x - vs) + abs(vs - vt))
			ans.append(abs(x - vt) + abs(vt - vs))
	print(min(ans))
while True:
  w, h = map(int, input().split())
  if not w:
    break

  n = int(input())

  xlst = [0, w - 1]
  ylst = [0, h - 1]
  plst = []

  for i in range(n):
    x1, y1, x2, y2 = map(int, input().split())
    plst.append([x1,y1,x2,y2])
    xlst.append(x1)
#    xlst.append(x1 + 1)
    xlst.append(x2)
#    xlst.append(x2 + 1)
    ylst.append(y1)
#    ylst.append(y1 + 1)
    ylst.append(y2)
#    ylst.append(y2 + 1)

  xlst = list(set(xlst))
  ylst = list(set(ylst))
  sorted_xlst = sorted(xlst)
  sorted_ylst = sorted(ylst)

  xdic = {}
  ydic = {}

  for i, v in enumerate(xlst):
    xdic[v] = i
  for i, v in enumerate(ylst):
    ydic[v] = i

  neww = len(xlst) - 1
  newh = len(ylst) - 1

  painted = [[0] * newh for _ in range(neww)]

  def paint_area(x, y):
    painted[x][y] = 1
    to_lst = [(x - 1, y), (x + 1, y), (x, y - 1), (x, y + 1)]
    for tx, ty in to_lst:
      if 0 <= tx <= neww - 1 and 0 <= ty <= newh - 1 and not painted[tx][ty]:
        paint_area(tx, ty)

  for p in plst:
    x1, y1, x2, y2 = p
    x1, y1, x2, y2 = xdic[x1], ydic[y1], xdic[x2], ydic[y2]
    for x in range(x1, x2):
      for y in range(y1, y2):
        painted[x][y] = 1

#  for area in painted:
#    print(area)

  ans = 0
  for x in range(neww):
    for y in range(newh):
      if not painted[x][y]:
        ans += 1
        paint_area(x, y)

  print(ans)


### FIXED CODE ###

def main():
  while True:
    w, h = map(int, input().split())
    if not w:
      break
  
    n = int(input())
  
    xlst = [0, w - 1]
    ylst = [0, h - 1]
    plst = []
  
    for i in range(n):
      x1, y1, x2, y2 = map(int, input().split())
      plst.append([x1,y1,x2 - 1,y2 - 1])
      xlst.append(x1)
      xlst.append(x2)
      xlst.append(x2 - 1)
      ylst.append(y1)
      ylst.append(y2)
      ylst.append(y2 - 1)
  
    xlst = list(set(xlst))
    ylst = list(set(ylst))
    xlst.sort()
    ylst.sort()
  
    xdic = {}
    ydic = {}
  
    for i, v in enumerate(xlst):
      xdic[v] = i
    for i, v in enumerate(ylst):
      ydic[v] = i
    
    neww = xdic[xlst[-1]]
    newh = ydic[ylst[-1]]

    painted = [[1] * (newh + 2)]
    for _ in range(neww):
      painted.append([1] + [0] * newh +  [1])
    painted.append([1] * (newh + 2))  
  
    for p in plst:
      x1, y1, x2, y2 = p
      x1, y1, x2, y2 = xdic[x1] + 1, ydic[y1] + 1, xdic[x2] + 1, ydic[y2] + 1
      for x in range(x1, x2 + 1):
        for y in range(y1, y2 + 1):
          painted[x][y] = 1
    
    stack = []
    app = stack.append
    pp = stack.pop
    direct = ((-1, 0), (1, 0), (0, -1), (0, 1))
    ans = 0

    for x in range(1, neww + 1):
      for y in range(1, newh + 1):
        if not painted[x][y]:
          ans += 1
          painted[x][y] = 1
          app((x,y))

          while stack:
            px, py = pp()
            for dx, dy in direct:
              tx, ty = px + dx, py + dy
              if not painted[tx][ty]:
                painted[tx][ty] = 1
                app((tx,ty))
    print(ans)

main()
import sys
input = sys.stdin.readline
 
def main():
  n = int(input())
  numList  = [int(input()) for _ in range(n)]
  maxVal = max(numList)
  workList = numList[:]
  workList.remove(maxVal)
  secondVal = max(workList)
  for num in numList:
    if num != maxVal:
      print(maxVal)
    else:
      print(secondVal)
      
if __name__ == '__main__':
    main()

### FIXED CODE ###

r = int(input())
print(3 * r**2)
h,w,k=map(int,input().split())
maze=[input()for i in range(h)]
for i in range(h):
    for j in range(w):
        if maze[i][j]=="S":x,y=i,j;break
    else:
        continue
    break
ans=float("INF")
l=[[0]*w for i in range(h)]
p={(x,y)}
def dfs(wx,wy,cnt):
    if cnt>k:return 1
    if l[wx][wy]:return 1
    l[wx][wy]=1
    p.add((wx,wy))
    for a,s in [(0,1),(0,-1),(1,0),(-1,0)]:
        if 0<=wx+a<h and 0<=wy+s<w and maze[wx+a][wy+s]==".":

            p.add((wx+a,s+wy))
            dfs(wx+a,wy+s,cnt+1)
            if (wx+a in (0,h-1)or wy+s in (0,w-1) ):
                global ans
                ans=1
dfs(x,y,0)

for g,j in p:
    if ans!=min(ans,-((-min(g,w-j-1,h-g-1,j))//k)+1):
        ans=(-((-min(g,w-j-1,h-g-1,j))//k)+1)

print(ans)

### FIXED CODE ###


h,w,k=map(int,input().split())
maze=[]

for i in range(h):
    maze.append(input())
    for j in range(w):
        if maze[i][j]=="S":x,y=i,j
    
ans=float("INF")
l=[[float("INF")]*w for i in range(h)]
l[x][y]=0
from collections import deque
dq=deque([(x,y)])
#pop/append/(append,pop)_left/in/len/count/[]/index/rotate()(右へnずらす)
p={(x,y)}
while len(dq):
    nx,ny=dq.popleft()
    for a,s in [(0,1),(0,-1),(1,0),(-1,0)]:
        if 0<=a+nx<h and 0<=ny+s<w and l[a+nx][s+ny]==float("INf")and maze[a+nx][s+ny]==".":
            l[a+nx][ny+s]=l[nx][ny]+1
            if l[a+nx][ny+s]<=k:p.add((a+nx,s+ny))
            if l[a+nx][ny+s]<k:dq.append((a+nx,s+ny))
ans=float("INf")

for x,y in p:
    ans=min(ans,(min(x,y,h-1-x,w-1-y)+k-1)//k+1)
print(ans)
from statistics import median
N = int(input())
A, B = zip(*tuple(tuple(map(int, input().split())) for _ in range(N)))
print(int((median(B) - median(A)) * (1 + (not N & 1))) + 1)

### FIXED CODE ###

from itertools import accumulate
from bisect import bisect_right
def prime_factorize_dict(n):
    d = dict()
    while not n & 1:
        d[2] = d.get(2, 0) + 1
        n >>= 1
    f = 3
    while f * f <= n:
        if not n % f:
            d[f] = d.get(f, 0) + 1
            n //= f
        else:
            f += 2
    if n != 1:
        d[n] = d.get(n, 0) + 1
    return d

N = int(input())
l = list(prime_factorize_dict(N).values())
L = list(accumulate(range(10 ** 6)))
print(sum(bisect_right(L, item) - 1 for item in l))
n = int(input())
s = input()
s = [a for a in s]
if len(s) == 1:
    print("No")
    exit()
if s[:n/2] == s[n/2:]:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

n = int(input())
s = input()
l = [a for a in s]
if len(l)%2 == 1:
    print("No")
    exit()
n2 = int(n/2)
if "".join(l[:n2]) == "".join(l[n2:]):
    print("Yes")
else:
    print("No")
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 2*10**6
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

r1,c1,r2,c2 = map(int, input().split())
ans = cmb(r2+c2+2,c2+1,mod)-cmb(r2+c1+1,c1,mod)-cmb(r1+c2+1,c2+1,mod)+cmb(r1+c1,c1,mod)
print(ans)


### FIXED CODE ###

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 2*10**6+10
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

r1, c1, r2, c2 = map(int, input().split())

def g(r, c):
  return cmb(r+c+2,c+1,mod)-1

ans = g(r2,c2)-g(r2,c1-1)-g(r1-1,c2)+g(r1-1,c1-1)
print(ans%mod)
D = int(input())
C = list(map(int, input().split()))
S = []
for d in range(D):
    S += [list(map(int, input().split()))]
#print(C)
#print(S)
myans = [i for i in range(26)]
#print(myans)

def estimate(mylist):
    mycost = 0
    dayflag = [0 for n in range(26)]
    for d in range(1,D+1):
        mycontest = mylist[d-1]
        mycost += S[d-1][mycontest]
        dayflag[mycontest] = d
        #print(mycontest, d, dayflag)
        for i in range(26):
             mycost -= C[mycontest] * (d - dayflag[i])
    return mycost

import random
import copy
times = 10**4
bestcost = 0
random.seed(1)
for i in range(times):
    a = random.randrange(26)
    b = random.randrange(26)
    mylist = copy.deepcopy(myans)
    #print(a,b, mylist)
    mylist[a] = myans[b]
    mylist[b] = myans[a]
    #print(mylist)
    #estimate
    mycost = estimate(mylist)
    if  bestcost < mycost:
        bestcost = mycost
        myans = mylist
        #print(i, bestcost)
for d in range(D):
    print(myans[d])

### FIXED CODE ###

D = int(input())
C = list(map(int, input().split()))
S = []
N = 26
for d in range(D):
    S += [list(map(int, input().split()))]
#print(C)
#print(S)
myans = [d%N for d in range(D)]
for d in range(D):
  print(myans[d]+1)
def ok(last4):
    for i in range(4):
        t = list(last4)
        if i >= 1:
            t[i-1], t[i] = t[i], t[i-1]
        if ''.join(t).count('AGC') >= 1:
            return False
    return True
def dfs(cur, last3):
    if last3 in memo[cur]:
        return memo[cur][last3]
    if cur == N:
        return 1
    ret = 0
    for c in 'ACGT':
        if ok(last3 + c):
            ret = (ret + dfs(cur + 1, last3[1:] + c)) % MOD
    memo[cur][last3] = ret
    return ret
print(dfs(0, 'TTT'))


### FIXED CODE ###

N, MOD = int(input()), 10 ** 9 + 7
memo = [{} for i in range(N+1)]
def ok(last4):
    for i in range(4):
        t = list(last4)
        if i >= 1:
            t[i-1], t[i] = t[i], t[i-1]
        if ''.join(t).count('AGC') >= 1:
            return False
    return True
def dfs(cur, last3):
    if last3 in memo[cur]:
        return memo[cur][last3]
    if cur == N:
        return 1
    ret = 0
    for c in 'ACGT':
        if ok(last3 + c):
            ret = (ret + dfs(cur + 1, last3[1:] + c)) % MOD
    memo[cur][last3] = ret
    return ret
print(dfs(0, 'TTT'))
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
mod=10**9+7

s=input()+"T"
N=len(s)
x,y=MI()

F=[[],[]]

temp=0
bit=0
for i in range(N):
    if s[i]=="F":
        temp+=1
    else:
        if temp!=0:
            F[bit].append(temp)
        bit=(bit+1)%2
        temp=0
        
Nx=len(F[0])
Ny=len(F[1])

        
#i番目の文字で，位置x [-N~N]につけるかどうか
dpx=[[False]*(2*N+1) for _ in range(Nx+1)]
dpy=[[False]*(2*N+1) for _ in range(Ny+1)]

dpx[0][N]=True
dpy[0][N]=True

if Nx>=1:
    dpx[1][N]=False
    dpx[1][N+F[0][0]]=True
    if s[0]=="T":
        dpx[1][N-F[0][0]]=True

MA=F[0][0]+1

for i in range(1,Nx):
    MA+=F[0][i]
    for j in range(N-MA,N+MA+1):
        if dpx[i][j]:
            jj=j+F[0][i]
            jjj=j-F[0][i]
            if jj<=(2*N):
                dpx[i+1][jj]=True
            if jjj>=0:
                dpx[i+1][jjj]=True
                
                
MA=F[1][0]+1

for i in range(Ny):
    MA+=F[1][i]
    for j in range(N-MA,N+MA+1):
        if dpy[i][j]:
            jj=j+F[1][i]
            jjj=j-F[1][i]
            if jj<=(2*N):
                dpy[i+1][jj]=True
            if jjj>=0:
                dpy[i+1][jjj]=True

if dpx[-1][N+x] and dpy[-1][N+y]:
    print("Yes")
else:
    print("No")






### FIXED CODE ###

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
mod=10**9+7

s=input()+"T"
N=len(s)
x,y=MI()

F=[[],[]]

temp=0
bit=0
for i in range(N):
    if s[i]=="F":
        temp+=1
    else:
        if temp!=0:
            F[bit].append(temp)
        bit=(bit+1)%2
        temp=0
        
XY=[set([0]), set([0])]
    
for bit in range(2):
    for i in range(len(F[bit])):
        temp=set([])
        a=F[bit][i]
        b=-a
        if bit==0 and i==0 and s[0]=="F":
            b=a
        for j in range(len(XY[bit])):
            aaa=XY[bit].pop()
            temp.add(aaa+a)
            temp.add(aaa+b)
        XY[bit]=temp
        
if (x in XY[0] ) and (y in XY[1] ):
    print("Yes")
else:
    print("No")
import fraction
a,b,c,d = map(int,input().split())
lcm = c*d // fraction.gcd(c,d)
A = ((a-1) // c) + ((a-1) // d) - ((a-1) // lcm)
B = (b // c) + (b // d) - (b // lcm)
total = B - A
print(b - a + 1 - total)


### FIXED CODE ###

a,b,c,d = map(int,input().split())
ans = b - a + 1
x = c * d
e = c
f = d
if e < f:
    e = f
    f = c
r = e % f
while r != 0:
    e = f
    f = r
    r = e % f
x //= f
ans -= b // c - (a-1) // c + b // d - (a-1) // d
ans += b // x - (a-1) // x
print(ans)
a = input()
b = input()
print(a + b)

### FIXED CODE ###

s = [x.strip() for x in input().split()]
print(s[1] + s[0])
n = int(input())
a = list(map(int,input().split()))
ans = []
for i in range(1,n+1):
    ans.append(a.count(i))
for j in ans:
    print(j)

### FIXED CODE ###

r = int(input())
print(2*r*3.14)
import math

A=input()
B=input()

num=int(A)*float(B)
num=math.floor(num) #Round down the value of A*B

print(int(num))

### FIXED CODE ###

str_a, str_b = input().split()
a = int(str_a)
b_100 = int(str_b.replace('.', ''))
print(a * b_100 // 100)