Harryxun/stf_run huggingface dataset:
n, k, q = map(int, input().split())
a = []
for i in range(q):
    a[i] = int(input()) - 1
score = [0 for _ in range(n)]

for a_i in a:
    score[a_i] += 1

for i in range(n):
    result = k - q + score[i]
    print("YES" if result > 0 else "NO")


### FIXED CODE ###

(n, k, q) = map(int, input().split())
a = [int(input()) for _ in range(q)]
points = [0 for _ in range(n)]

for i, answer in enumerate(a):
    points[answer-1] += 1

for i, p in enumerate(points):
    result = "Yes" if k - q + p > 0 else "No"
    print(result)
h, w= map(int, input().split(""))
answer = (h*w)/2 + (h*w)%2
print(answer)

### FIXED CODE ###

h, w = map(int, input().split())
if h==1 or w == 1:
  print(1)
else:
  ans = h * w //2 + (h*w)%2
  print(ans)
def exhaustive_search(start, Sum, answer):
    for i in range(start, n):
        Sum = Sum + A[i]
        if Sum == answer:
            return True
        elif Sum > answer:
            Sum = Sum - A[i]
            next
        else:
            r = exhaustive_search(i+1, Sum, answer)
            if r == True:
                return True
            else:
                Sum = Sum - A[i]
    return False


for i in M:
    r = exhaustive_search(0, 0, i)
    if r == True:
        print('yes')
    else:
        print('no')

return 0

### FIXED CODE ###

def solve(dp, a, i, m):
  if m in dp[i]:
    return dp[i][m]

  if m == 0:
    dp[i][m] = True
  elif i >= len(a):
    dp[i][m] = False
  elif solve(dp, a, i+1, m):
    dp[i][m] = True
  elif solve(dp, a, i+1, m-a[i]):
    dp[i][m] = True
  else:
    dp[i][m] = False

  return dp[i][m]

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

dp = {}
for i in range(N+1):
  dp[i] = {}

for m in M:
  if solve(dp, A, 0, m):
    print('yes')
  else:
    print('no')
k = int(input())
s = int()

if len(s) <= s:
  print(k)
  
else:
  print(k[:s] + "...")

### FIXED CODE ###

k = int(input())
s = input()
 
if len(s) <= k:
  print(s)
  
else:
  print(s[:k] + "...")
N,K=map(int,input().split())
h=[int(input()) for i in range(N)]
h.sort()
a=1000
for i in range(N-K):
  if h[i+K]-h[i]<a:
    a=h[i+k]-h[i]
print(a)


### FIXED CODE ###

N,K=map(int,input().split())
h=[int(input()) for i in range(N)]
h.sort()
a=10**9
for i in range(N-K+1):
  a=min(a,h[K+i-1]-h[i])
print(a)
_, s, _ = input().split()
print(f"A{s[0]}C")

### FIXED CODE ###

_, s, _ = input().split()
print("A{}C".format(s[0]))
import itertools

N = int(input)
coords = [list(map(int, input().split())) for i in range(N)]
dis = 0
n = list(range(N))

for order in itertools.permutations(n):
  for i in range(1, N):
    dis += ((coords[order[i]][0]-coords[order[i-1]][0])**2 + (coords[order[i]][1]-coords[order[i-1]][1])**2)**0.5

ave dis / N
print(ave)

### FIXED CODE ###

import itertools
 
N = int(input())
coord = [list(map(int, input().split())) for _ in range(N)]
dis = 0

for order in itertools.permutations(range(N)):
  for i in range(1, N):
    dis += ((coord[order[i]][0]-coord[order[i-1]][0])**2 + (coord[order[i]][1]-coord[order[i-1]][1])**2)**0.5
 
ave = dis / len(list(itertools.permutations(range(N))))
print(ave)
n=input()
a=[0]*n
sum=0
for i in range(n):
 a[i]= int(input())
 sum=sum+a[i]
a.sort()

print'%d,%d,%d'%(a[0],a[n-1],sum)

### FIXED CODE ###

int(input())
x=map(int,raw_input().split())
print min(x),max(x),sum(x)
n=int(input())
w=list(map(int, input().split()))
a[n]={}
for t in range(n):
  s1=sum(w[0:t+1])
  s2=sum(w[t+1:n])
  a[t]=abs(s1-s2)

print(min(a))

### FIXED CODE ###

n=int(input())
w=list(map(int, input().split()))
a=[]
for t in range(n):
    s1=sum(w[0:t+1])
    s2=sum(w[t+1:n])
    a.append(abs(s1-s2))
 
print(min(a))
sum = 0;
for i in range(3):
    x = input()
    num_x = int(x)
    sum += num_x
if sum >= 21:
    print("bust")
else:
    print("win")


### FIXED CODE ###

sum = 0;
x = list(map(int,input().split()))
for i in x:
    sum += i
if sum > 21:
    print("bust")
else:
    print("win")
N,M,R = map(int,input().split())
r = list(map(int,input().split()))
from itertools import permutations
t = [[float('inf') for i in range(M)] for j in range(M)]

for i in range(M):
    a,b,c = map(int, input().split())
    t[a-1][b-1] = c
    t[b-1][a-1] = c

for i in range(M):
    for j in range(M):
        for k in range(M):
            if t[i][j] > t[j][k] + t[k][j]:
                t[i][j] = t[j][k] + t[k][j]

def c(l):
    last = len(l) - 1
    ret = 0
    for i,j in enumerate(l):
        if i == last:
            return ret
        ret += t[j-1][l[i+1]-1]

print(min([c(i) for i in permutations(r)]))

### FIXED CODE ###

N,M,R = map(int,input().split())
r = list(map(int,input().split()))
from itertools import permutations
from scipy.sparse.csgraph import dijkstra
t = [[float('inf') for i in range(N)] for j in range(N)]

for i in range(M):
    a,b,c = map(int, input().split())
    t[a-1][b-1] = t[b-1][a-1] = c
t=dijkstra(t).astype(int)
def c(l):
    ret = 0
    for i in range(R-1):
        ret += t[l[i]-1][l[i+1]-1]
    return ret

print(min([c(i) for i in permutations(r)]))
from sys import stdin
inf = 10**10
h,w = [int(x) for x in stdin.readline().rstrip().split()]
li = ["" for j in range(h)]
ma = 0
for i in range(h):
    s = stdin.readline().rstrip()
    li[i] = s
for i in range(h):
    for j in range(w):
        if li[i][j] == "#":
            continue
        now_u = 0;now_b = 0;now_r = 0;now_l = 0
        while i+now_b <= h-1:
            if li[i+now_b][j] == ".":
                now_b += 1
            else:
                break
        while i-now_u >= 0:
            if li[i-now_u][j] == ".":
                now_u += 1
            else:
                break
        while j+now_r <= w-1:
            if li[i][j+now_r] == ".":
                now_r += 1
            else:
                break
        while i-now_l >= 0:
            if li[i][j-now_l] == ".":
                now_l += 1
            else:
                break
        point = now_u+now_b+now_r+now_l-3
        ma = max(point,ma)
print(ma)

### FIXED CODE ###

from sys import stdin
h,w = map(int,stdin.readline().rstrip().split())
li = [stdin.readline().rstrip() for _ in range(h)]
#各四方向のDPをつくる
L = [[0 for i in range(w)]for j in range(h)]
R = [[0 for i in range(w)]for j in range(h)]
D = [[0 for i in range(w)]for j in range(h)]
U = [[0 for i in range(w)]for j in range(h)]
ma = 0
for i in range(h):
    for j in range(w):
        if li[i][j] == "#":L[i][j] = 0
        elif j == 0:L[i][j] = 1
        else:L[i][j] = L[i][j-1]+1
for i in range(h):
    for j in range(w):
        if li[i][w-j-1] == "#":R[i][w-j-1] = 0
        elif w-j-1 == w-1:R[i][w-j-1] = 1
        else:R[i][w-j-1] = R[i][w-j]+1
for i in range(h):
    for j in range(w):
        if li[i][j] == "#":U[i][j] = 0
        elif i == 0:U[i][j] = 1
        else:U[i][j] = U[i-1][j]+1
for i in range(h):
    for j in range(w):
        if li[h-i-1][j] == "#":D[h-i-1][j] = 0
        elif h-i-1 == h-1:D[h-i-1][j] = 1
        else:D[h-i-1][j] = D[h-i][j]+1
for i in range(h):
    for j in range(w):
        point = L[i][j]+R[i][j]+D[i][j]+U[i][j]-3
        ma = max(ma,point)
print(ma)
n, l = map(int, input().split())
a = sorted([input() for i in range(n)])
print(*s, sep="")

### FIXED CODE ###

n, l = map(int, input().split())
s = sorted([input() for i in range(n)])
print(*s, sep="")
a = int(input())
s = input()

if a => 3200:
  print(s)
else:
  print('red')

### FIXED CODE ###

a = int(input())
s = input()

if a >= 3200:
  print(s)
else:
  print('red')
a=int(input())
b=input().split(" ")
sequence=[]
for i in range(0,a):
    sequence.append(int(b[i]))
error=[]
for q in range(0,a-1):
    if sequence[q]-sequence[q+1]>0:
        error.append(q)
        error.append(q+1)

if len(error)==0:
    print("YES")

elif len(error)==2:
    if a==2:
        print("YES")
    elif error[0]==0:
        if sequence[error[0]+2]-sequence[error[0]]>0:
            print("YES")
        else:
            print("NO")
    elif error[1]==a:
        if sequence[error[1]]-sequence[error[1]-2]>0:
            print("YES")
        else:
            print("NO")
    else:
        if  sequence[error[1]]-sequence[error[1]-2]>0 and sequence[error[0]+2]-sequence[error[0]]>0:
            print("YES")
        else:
            print("NO")

elif len(error)==4:
    if error[1]==error[2]:
        if sequence[error[0]]>sequence[error[3]]:
            if error[0]==0 and error[3]==a-1:
                if sequence[error[0]]-sequence[error[3]-1]>0 and sequence[error[0]+1]-sequence[error[3]]>0:
                    print("YES")
                else:
                    print("NO")
            elif error[0]==0:
                if sequence[error[0]+3]-sequence[error[0]]>0:
                    print("YES")
                else:
                    print("NO")
            elif error[1]==a:
                if sequence[error[3]]-sequence[error[3]-3]>0:
                    print("YES")
                else:
                    print("NO")
            else:
                if  sequence[error[3]]-sequence[error[3]-3]>0 and sequence[error[0]+3]-sequence[error[0]]>0:
                    print("YES")
                else:
                    print("NO")
    elif sequence[error[0]]-sequence[error[2]]>0 and sequence[error[1]]-sequence[error[3]]>0:
        if error[0]==0 and error[3]==a-1:
            if sequence[error[0]]-sequence[error[3]-1]>0 and sequence[error[0]+1]-sequence[error[3]]>0:
                print("YES")
            else:
                print("NO")
        elif error[0]==0:
            if sequence[error[3]+1]-sequence[error[0]]>0:
                print("YES")
            else:
                print("NO")
        elif error[3]==a:
            if sequence[error[3]]-sequence[error[0]-1]>0:
                print("YES")
            else:
                print("NO")
        elif sequence[error[3]]-sequence[error[0]-1]>0 and sequence[error[3]+1]-sequence[error[0]]>0:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

else:
    print("NO")

### FIXED CODE ###

a=input().split(" ")
A=int(a[0])
B=int(a[1])
answer=int((A+B)/2)
if (A+B)%2==0 :
    print(answer)
else:
    print("IMPOSSIBLE")
S = list(str(input()))
T = list(str(input()))

count = 0
while True:
    if S[count] == T[count]:
        count = count + 1
    else:
        c1 = S[count]
        c2 = T[count]
        for i in range(len(S)):
            if S[i] == c1:
                S[i] = c2
            elif S[i] == c2:
                S[i] = c1
    count = count + 1
    if count == len(S)-1:
        break

if S == T:
    print("Yes")
else:
    print("No")
        

### FIXED CODE ###

s = list(str(input()))
t = list(str(input()))

def judge(S,T):
    start = [-1 for i in range(26) ] 
    goal = [-1 for i in range(26)]
    for i in range(len(S)):
        a = ord(S[i]) - ord('a')
        b = ord(T[i]) - ord('a')
        if start[a] != -1 or goal[b] != -1:
            if start[a]!= b or goal[b] !=a:
                print("No")
                break
        else:
            start[a] = b
            goal[b] =a
        if i==len(S)-1:
            print("Yes")
            
judge(s,t)
visited = [0]*n
ans = 0
i = 0
while True:
  i = A[i]
  ans += 1  
  if visited[i]==1:
    ans = -1
    break    
  visited[i] = 1
  if i == 1:
    break
  
print(ans)    

### FIXED CODE ###

n = int(input())
A = [int(input())-1 for _ in range(n)]

visited = [0]*n
ans = 0
i = 0
while True:
  i = A[i]
  ans += 1  
  if visited[i]==1:
    ans = -1
    break    
  visited[i] = 1
  if i == 1:
    break
  
print(ans)
n,m = map(int,input().split())
l=1
if n%2==1:
    r=n
    for i in range(m):
        print(l,r,min(abs(l-r)))
        l+=1
        r-=1
else:
    if n%4==0:
        r=n
    else:
        r=n-1
    print(l,r,min(abs(l-r),n-abs(l-r)))
    for i in range(m-1):
        l+=1
        r-=1
        print(l,r,min(abs(l-r),n-abs(l-r)))
        if min(abs(l-r),n-abs(l-r))==n//2-1:
            l+=1

### FIXED CODE ###

n,m = map(int,input().split())
l=1
if n%2==1:
    r=n
    for i in range(m):
        d=min(abs(l-r),n-abs(l-r))
        print(l,r)
        l+=1
        r-=1
else:
    if n%4==0:
        r=n-1
    else:
        r=n
    rev=False
    for i in range(m):
        d=min(abs(l-r),n-abs(l-r))
        if d == n//2:
            rev=True
            l+=1
            print(l,r)
        else:
            print(l,r)
        l+=1
        r-=1
import collections

n = int(input())
s = [input() for i in range(n)]
a = collections.Counter(s[0])
b = collections.Counter(s[1])
res = a & b
w = ""
if n <= 2:
    for k in sorted(res):
        w += k * res[k]
    print(w)
else:
    for i in s[2:]:
        res = res & collections.Counter(i)
    if not res:
        print("")
    for k in sorted(res):
        w += k * res[k]
    print(w)

### FIXED CODE ###

import collections

n = int(input())
s = [input() for i in range(n)]
w = ""
if n == 1:
    r = collections.Counter(s[0])
    for k in sorted(r):
        w += k * r[k]
    print(w)
    exit()
a = collections.Counter(s[0])
b = collections.Counter(s[1])
res = a & b
if n <= 2:
    for k in sorted(res):
        w += k * res[k]
    print(w)
else:
    for i in s[2:]:
        res = res & collections.Counter(i)
    if not res:
        print("")
    for k in sorted(res):
        w += k * res[k]
    print(w)
import sys
n, *alst = map(int, sys.stdin.read().split())
lst1 = alst[::2]
lst2 = alst[1::2]
if n % 2:
  lst1.reverse()
  print(''.join(lst1 + lst2))
else:
  lst2.reverse()
  print(''.join(lst2 + lst1))

### FIXED CODE ###

n = int(input())
alst = input().split()
lst1 = alst[::2]
lst2 = alst[1::2]
if n % 2:
  lst1.reverse()
  print(' '.join(lst1 + lst2))
else:
  lst2.reverse()
  print(' '.join(lst2 + lst1))
n=int(input())
l=list(input())
if 'Y' in l:
  print(Four)
else:
  print(Three)n = int(input())
l=list(input())
if 'Y' in l:
  print('Four')
else:
  print('Three')

### FIXED CODE ###

n = int(input())
l=list(input())
if 'Y' in l:
  print('Four')
else:
  print('Three')
N,D=input().split()
N=int(N)
D=int(D)
cnt = 0
for i in range(N):
  
    
  p1,p2 = map(int,input().split())
  t = ((p1*p1)(p2*p2))**(0.5)
  if t >= D:
    
    cnt += 1
    
print(cnt)

### FIXED CODE ###

n,d = map(int,input().split())
ans = 0
k = d**2
for i in range(n):
  
    x,y = map(int,input().split())
    if (x**2)+(y**2) <= k:
        ans += 1
    else:
        None
print(ans)
n,k = map(int,input().split())
a = list(map(int,input().split()))
pre = 1

for i in a[:k]:
    pre *= i
    
for i in range(k,n):
    now = pre * a[i] // a[i-k]
    
    if pre < now:
        print("Yes")
    
    else:
        print("No")
        
    pre = now

### FIXED CODE ###

x = int(input()) - 400
ans = 8

while x >= 200:
    x -= 200
    ans -= 1
    
print(ans)
N = int(input())
x = []
y = []
h = []
for _ in range(N):
    tmp = [int(i) for i in input().split()]
    if tmp[2] == 0:
        continue
    x.append(tmp[0])
    y.append(tmp[1])
    h.append(tmp[2])

for Cx in range(100 + 1):
    for Cy in range(100 + 1):
        correct_flag = True
        H = abs(x[0] - Cx) + abs(y[0] - Cy) + h[0]
        for i in range(1, N):
            if abs(x[i] - Cx) + abs(y[i] - Cy) + h[i] != H:
                correct_flag = False
                break
        if correct_flag:
            print(Cx, Cy, H)
            break


### FIXED CODE ###

N = int(input())
x = []
y = []
h = []
key = 0
for i in range(N):
    tmp = [int(i) for i in input().split()]
    if tmp[2] != 0:
        key = i
    x.append(tmp[0])
    y.append(tmp[1])
    h.append(tmp[2])

for Cx in range(100 + 1):
    for Cy in range(100 + 1):
        correct_flag = True
        H = abs(x[key] - Cx) + abs(y[key] - Cy) + h[key]
        for i in range(N):
            if h[i] == 0:
                if abs(x[i] - Cx) + abs(y[i] - Cy) < H:
                    correct_flag = False
                    break
            else:
                if abs(x[i] - Cx) + abs(y[i] - Cy) + h[i] != H:
                    correct_flag = False
                    break
        if correct_flag:
            print(Cx, Cy, H)
            break
n = int(input())

def Checker(sum, x):
    sum =  0
    while x > 0:
        sum += x % 10
        x = x // 10
    return sum

sum_list = []
for a in range(2, n):
    b = n - a
    sum_a = 0
    sum_b = 0
    y = 0

    y = Checker(sum_a, a)+ Checker(sum_b, b)
    sum_list.append(y)

print(min(sum_list))

### FIXED CODE ###

n = int(input())

def Checker(sum, x):
    sum =  0
    while x > 0:
        sum += x % 10
        x = x // 10
    return sum

sum_list = []
for a in range(1, n):
    b = n - a
    sum_a = 0
    sum_b = 0
    
    y = Checker(sum_a, a)+ Checker(sum_b, b)
    sum_list.append(y)

print(min(sum_list))
A,B,C,D = map(int, input().split())

AB = abs(A-B)
BC = abs(B-C)
ans = 0

if AB <= D and BC <= D or AC <= D:
    ans = "Yes"
else:
        ans = "No"
        
print(ans)

### FIXED CODE ###

A,B,C,D = map(int, input().split())

AB = abs(A-B)
BC = abs(B-C)
AC = abs(A-C) 
ans = 0

if AB <= D and BC <= D or AC <= D:
    ans = "Yes"
else:
    ans = "No"
        
print(ans)
# -*- coding: utf-8 -*-
def inpl(): return map(int, input().split())

N, Ma, Mb = inpl()
INF = 4001

DP = [[INF]*(411) for _ in range(411)]
DP[0][0] = 0

for i in range(N):
    DP2 = [[INF]*(411) for _ in range(411)]
    a, b, c = inpl()
    for i in range(10*(i+1) + 1):
        for j in range(10*(i+1) + 1):
            DP2[i][j] = min(DP[i][j], DP2[i][j])
            DP2[i+a][j+b] = min(DP[i+a][j+b], DP[i][j] + c)
    DP = DP2

x = 1
ans = INF
while Ma*x <= 400 and Mb*x <= 400:
    ans = min(ans, DP[Ma*x][Mb*x])
    
    x += 1

if ans < INF:
    print(ans)
else:
    print(-1)

### FIXED CODE ###

# -*- coding: utf-8 -*-
def inpl(): return map(int, input().split())

N, Ma, Mb = inpl()
INF = 4001

DP = [[INF]*(411) for _ in range(411)]
DP[0][0] = 0

for _ in range(N):
    DP2 = [[INF]*(411) for _ in range(411)]
    a, b, c = inpl()
    for i in range(400):
        for j in range(400):
            DP2[i][j] = min(DP[i][j], DP2[i][j])
            DP2[i+a][j+b] = min(DP[i+a][j+b], DP[i][j] + c)
    DP = DP2

x = 1
ans = INF
while Ma*x <= 400 and Mb*x <= 400:
    ans = min(ans, DP[Ma*x][Mb*x])
    
    x += 1

if ans < INF:
    print(ans)
else:
    print(-1)
a,b=input().split()
a_num,b_num=intinput().split()
c=input()

if c==a:
  a_num=int(a_num)-1
  return a_num,b_num
elif c==b:
  b_num=int(b_num)-1
  return a_num,b_num
  

### FIXED CODE ###

a,b=input().split()
a_num,b_num=input().split()
c=input()
 
if c==a:
  a_num=int(a_num)-1
elif c==b:
  b_num=int(b_num)-1
print(a_num,b_num)
n=list(map(input.split()))

count=0
for i in range(1,len(n)-1):
  if (n[i-1]<n[i] and n[i]<n[i+1]) or (n[i-1]>n[i] and n[i]>n[i+1]):
    count+=1
print(count)

### FIXED CODE ###

n=int(input())
li=list(map(int,input().split()))

count=0
for i in range(n-2):
  a=li[i]
  b=li[i+1]
  c=li[i+2]
  if (a<b and (b<c or b==c)) or (c<b and (b<a or b==a)):
    count+=1
print(count)
import sys

sys.setrecursionlimit(1000000)

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

visited = [0 for _ in range(N)]
graph = [[0] * M for _ in range(M)]
for _ in range(M):
    a, b = map(int, input().split())
    graph[a - 1][b - 1] = 1
    graph[b - 1][a - 1] = 1


def dfs(i, depth):
    if visited[i]:
        return 0
    if depth == N - 1:
        return 1

    visited[i] = 1
    ret = 0
    for j in range(0, N):
        if graph[i][j]:
            ret += dfs(j, depth + 1)

    visited[i] = 0

    return ret


print(dfs(0, 0))


### FIXED CODE ###

N, M = map(int, input().split())
graph = [[] for i in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    graph[a].append(b)
    graph[b].append(a)


def dfs(now, prev, visited):
    visited.append(now)
    if len(visited) == N:
        return 1

    ret = 0
    for edge in graph[now]:
        if edge == prev:
            continue
        if edge in visited:
            continue

        ret += dfs(edge, prev, visited[:])

    return ret


print(dfs(0, -1, []))
a,b,c,d = map(int, input().split())
li = list(range(a,b+1))
start1 = 0
start2 = 0
start3 = 0
for i in li:
    if i%c == 0:
        start1 = li.index(i)
        break
for j in li:
    if j%d == 0:
        start2 = li.index(j)
        break
for k in li:
    if k%(c*d)==0:
        start3 = li.index(k)
        break

print(b+1-a+len(li[start3::c*d])-len(li[start2::d])-len(li[start1::c]))

### FIXED CODE ###

import math
import fractions
a,b,c,d = map(int, input().split())
e = a-1
less_than_e = e - (e//c) - (e//d) + (e//(c*d//fractions.gcd(c,d)))
less_than_b = b - (b//c) - (b//d) + (b//(c*d//fractions.gcd(c,d)))
if less_than_e < 0:
    less_than_e = 0
print(less_than_b - less_than_e)
a = 0
b = 0

a = input()
b = input()


if (int(a)*int(b))%2 == 0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

str = input()
a = str.split(" ")
c = int(a[0])*int(a[1])
if c%2 == 0:
    print("Even")
else:
    print("Odd")
while 1:
  H,W=map(int,raw_input().split())
  if H==W==0:
    break
  elif H!=0 or W!=0:
    for i in range(0,H):
      if i%2 == 0:
         if W%2 == 1:
            print '#.'*(W/2)+'#'
          elif W%2 == 0:
            print '#.'*(W/2)
         else:
           if W%2 == 1:
             print '.#'*(W/2)+'.'
           elif W%2 == 0:
             print '.#'*(W/2)
    print ''

### FIXED CODE ###

while True:
   H,W=map(int,raw_input().split())
   if H==W==0:
       break
   elif H!=0 or W!=0:
     for i in range(0,H):
       if i%2 == 0:
         if W%2 == 1:
           print '#.'*(W/2)+'#'
         elif W%2 == 0:
           print '#.'*(W/2)
       else:
         if W%2 == 1:
           print '.#'*(W/2)+'.'
         elif W%2 == 0:
           print '.#'*(W/2)
     print ''
import sys
import math


def main():
    a, b, x = map(int, sys.stdin.readline().strip().split())

    s = x / a
    if s > a * b / 2:
        ans = math.atan(1 / (2 / a * (b - s / a)))
    else:
        ans = math.atan(2 * s / (b ** 2))
        
    print(90 - math.degrees(ans))


if __name__ == '__main__':
    main()

### FIXED CODE ###

# D
import sys
import math


# def main():
#     a, b, x = map(int, sys.stdin.readline().strip().split())
#
#     s = x / a
#     if s > a * b / 2:
#         ans = math.atan(a ** 2 / (2 * (a * b - s)))
#     else:
#         ans = math.atan(2 * s / (b ** 2))
#
#     print(90 - math.degrees(ans))

def main():
    a, b, x = map(int, sys.stdin.readline().strip().split())

    s = x / a
    if s > a * b / 2:
        ans = math.degrees(math.atan(2 * b / a - 2 * s / (a ** 2)))
        print(ans)
    else:
        ans = 90 - math.degrees(math.atan(2 * s / (b ** 2)))
        print(ans)


if __name__ == '__main__':
    main()
n,k = map(int,input().partition())
a = list(map(int,input().split()))
b = [0]*(n+1)

c=0
for i,d in enumerate(a):
    c += d-1
    c%= k
    b[i+1] = c

B = {}
count = 0
for i , d in enumerate(b):
    if i > k:
        B[b[i-k]] -= 1
        
    if d in B:
        count += B[d]
        B[d] += 1
    else:
        B[d] = 1
        
print(count)

### FIXED CODE ###

n, k = map(int, input().split())
m = list(map(int, input().split()))
T = [0] * (n + 1)

b = 0
for i, a in enumerate(m):
    b += a - 1
    b %= k
    T[i + 1] = b

tmp = {}
count = 0

for i, b in enumerate(T):
    if i >= k:
        tmp[T[i - k]] -= 1

    if b in tmp:
        count += tmp[b]
        tmp[b] += 1
    else:
        tmp[b] = 1

print(count)
def calc_exp(x:str)->float:
    return (int(x) + 1)/2

NK = input().split()
N, K = int(NK[0]), int(NK[1])
#lis_p = list(map(lambda x: int(x), input().split()))
lis_exp = list(map(calc_exp, input().split()))
dp=0
for i in range(N):
    dp = max(sum(lis_exp[i:i+K]), dp)
print(dp)

### FIXED CODE ###

N = int(input())
lisA = [int(i) for i in input().split()]
if len(set(lisA)) == len(lisA):
    print('YES')
else :
    print('NO')
N,K = map(int,input().split())
h = [0]*N
hmax = 0
hmin = 0
H = [0]*(N//K+2)
for i in range(N):
  h[i] = int(input())
h.sort()
for i in range(N//K+2):
  hmin = h[i]
  hmax = h[i+K-1]
  H[i] = hmax-hmin
print(min(H))

### FIXED CODE ###

N,K = map(int,input().split())
h = [0]*N
hmax = 0
hmin = 0
H = [0]*(N-K+1)
for i in range(N):
  h[i] = int(input())
h.sort()
for i in range(N-K+1):
  hmin = h[i]
  hmax = h[i+K-1]
  H[i] = hmax-hmin
print(min(H))