Harryxun/stf_run huggingface dataset:
k = 31
K = 1<<k
nu = lambda L: int("".join([bin(K+a)[-k:] for a in L[::-1]]), 2)
st = lambda n: bin(n)[2:] + "0"
li = lambda s: [int(a, 2) if len(a) else 0 for a in [s[-(i+1)*k-1:-i*k-1] for i in range(1001)]]

N = int(input())
A = [int(a) for a in input().split()]
C = [0] * 1001
for a in A:
    C[a] += 1
B = li(st(nu(C) ** 2))
for a in A:
    if a <= 500: B[2*a] -= 1
for i in range(1001):
    B[i] //= 2
for i in range(1, 1001):
    C[i] += C[i-1]
for i in range(N):
    B[i] += B[i-1]
ans = N*(N-1)*(N-2)//6
for i in range(1001):
    ans -= (N-C[i-1]) * B[i]
print(ans)


### FIXED CODE ###

N = int(input())
A = sorted([int(a) for a in input().split()])
X = [0] * 1001
for a in A:
    X[a] += 1
for i in range(1, 1001):
    X[i] += X[i-1]

ans = 0
for i in range(N):
    for j in range(i+1, N):
        ans += X[min(A[i]+A[j]-1, 1000)] - (j+1)
print(ans)
a, b, c, d = map(int,list(input().strip()))

b_case = [b, -b]
c_case = [c, -c]
d_case = [d, -d]

for i in b_case:
    for j in c_case:
        for k in d_case:
            if a + i + j + k == 7:
                print('{}{:+}{:+}{:+}{}'.format(a, i, j, k, '=7'))
                flag = True
                break
        
        if flag == True:
            break
    if flag == True:
        break

### FIXED CODE ###

a, b, c, d = list(map(int, list(input())))
if a + b + c + d == 7:
    print("{0}+{1}+{2}+{3}=7".format(a, b, c, d))
elif a + b + c - d == 7:
    print("{0}+{1}+{2}-{3}=7".format(a, b, c, d))
elif a + b - c + d == 7:
    print("{0}+{1}-{2}+{3}=7".format(a, b, c, d))
elif a - b + c + d == 7:
    print("{0}-{1}+{2}+{3}=7".format(a, b, c, d))
elif a - b - c + d == 7:
    print("{0}-{1}-{2}+{3}=7".format(a, b, c, d))
elif a - b + c - d == 7:
    print("{0}-{1}+{2}-{3}=7".format(a, b, c, d))
elif a + b - c - d == 7:
    print("{0}+{1}-{2}-{3}=7".format(a, b, c, d))
elif a - b - c - d == 7:
    print("{0}-{1}-{2}-{3}=7".format(a, b, c, d))
import math


n, x = map(int,input().split())
li_x = list(map(int,input().split()))

for i in range(len(li_x)):
  if li_x[i] - x < 0:
    li_x[i] =x - li_x[i]
  else:
    li_x[i] = li_x[i] -x

if len(li_x)==1:
  print(li_x[0])

elif len(li_x)==2:
  print(gcd(li_x[0],li_x[1]))

else:
  g =gcd(li_x[0],li_x[1])
  k=2
  while k<len(li_x):
    g=gcd(g,li_x[k])
    k+=1
  print(g)

def gcd(x, y):
  if y == 0:
    return x
  else:
    return gcd(y, x % y)


### FIXED CODE ###

import math

def gcd(x, y):
  if y == 0:
    return x
  else:
    return gcd(y, x % y)

n, x = map(int,input().split())
li_x = list(map(int,input().split()))

for i in range(len(li_x)):
  if li_x[i] - x < 0:
    li_x[i] =x - li_x[i]
  else:
    li_x[i] = li_x[i] -x

if len(li_x)==1:
  print(li_x[0])

elif len(li_x)==2:
  print(gcd(li_x[0],li_x[1]))

else:
  g =gcd(li_x[0],li_x[1])
  k=2
  while k<len(li_x):
    g=gcd(g,li_x[k])
    k+=1
  print(g)
# -*- coding: utf-8 -*-
from collections import deque
n=int(raw_input())
que = deque()
for i in xrange(n):
    o = raw_input()
    if o == 'deleteFirst':
        del que[0]
    elif o == 'deleteLast':
        del que[-1]
    else:
        c,p = o.split()
        p = int(p)
        if c == 'insert':
            que.appendleft(p)
        elif c == 'delete':
            que.remove(p)
print ' '.join(map(str,que))

### FIXED CODE ###

from collections import deque
n=int(raw_input())
q = deque()
for i in xrange(n):
    o = raw_input()
    if o == 'deleteFirst':  q.popleft()
    elif o == 'deleteLast': q.pop()
    else:
        c,p = o.split(); p = int(p)
        if c == 'insert': q.appendleft(p)
        elif c == 'delete':
            try: q.remove(p)
            except: pass
print ' '.join(map(str,q))
x,y,z,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))

ab_list = []
for a_i in range(x):
    for b_i in range(y):
        ab_list.append(a[a_i]+b[b_i])
ab_list.sort().reverse()
sum_list = []
for ab_i in range(k):
    for c_i in range(z):
        sum_list.append(ab_list[ab_i]+c[c_i])
sum_list.sort().reverse()
#sum_list = []
#for a_i in range(x):
#    for b_i in range(y):
#        for c_i in range(z):
#            sum_list.append(a[a_i]+b[b_i]+c[c_i])
#sum_list.sort()
for i in range(k):
    print(sum_list[i])

### FIXED CODE ###

x,y,z,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)
sum_list = []
for a_i in range(x):
    for b_i in range(y):
        if a_i*b_i > k:
            break
        for c_i in range(z):
            if a_i*b_i*c_i > k:
                break
            sum_list.append(a[a_i]+b[b_i]+c[c_i])
sum_list.sort(reverse=True)
for i in range(k):
    print(sum_list[i])
import collections
n = int(input())
s=[input() for i in range(n)]

c = collections.Counter(s)

ans = list()
ans.append(c.most_common()[0][0])

for i in range(1,n):
    if c.most_common()[0][1] == c.most_common()[i][1]:
        ans.append(c.most_common()[i][0])
    else:
        break

ans = sorted(ans)
[print(i) for i in ans]

### FIXED CODE ###

import collections
n = int(input())
s=[input() for i in range(n)]
ans = list()

c = collections.Counter(s)

m = max(c.values())
for k,v in c.items():
    if v ==m:
        ans.append(k)
ans.sort()
print(*ans,sep="\n")
def insertion_sort(arr):
    for i in range(1,len(arr)):
        j = i
        while arr[j] < arr[j-1] and j > 0:
            arr[j-1], arr[j] = arr[j], arr[j-1]
            j -= 1
        print(" ".join(arr))

input()
arr = list(map(int, input().split()))
insertion_sort(arr)




### FIXED CODE ###

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

for i in range(len(arr)):
    for j in range(i,0,-1):
        if(arr[j] < arr[j-1]):
            temp = arr[j]
            arr[j] = arr[j-1]
            arr[j-1] = temp
        else:
            continue
    print(' '.join(map(str,arr)))
N = int(input())
d = [int(input()) for k in range(N)]
sum = 0
for i in range(N):
    for j in range range(i):
        sum = sum + d[i+1] * d[j+1]
print(sum)

### FIXED CODE ###

N = int(input())
d = list(map(int,input().split()))
sum = 0
for i in range(N):
    if i > 0:
        for j in range(i):
            sum = sum + d[i] * d[j]
print(sum)
t = float(input())
x = float(input())

print(t / x)

### FIXED CODE ###

num = input().split()

print(float(num[0]) / float(num[1]))
import math
N, M = map(int, input().split())
mx = 0
for i in range(1, math.floor(math.sqrt(M))+1):
    if M % i == 0:
        if M // i >= N:
            mx = max(mx, i)
    	else:
            mx = max(mx, M//i)
print(mx)

### FIXED CODE ###

N, M = map(int, input().split())
ceil = M // N
for i in range(1,ceil+1)[::-1]:
    tmp = M - i * (N - 1)
    if tmp > 0 and tmp % i == 0:
        print(i)
        break
A, B = map(input().split())
print(B + A)

### FIXED CODE ###

A, B = input().split()
print(B + A)
import numpy as np

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

flag = 0
for i in range(n + 1):
    for j in range(m + 1): 
        if(i * n - i * j + j * m - i * j == k):
            flag = 1

if(flag == 1):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s = input()

txt = "YAKI"

for i in range(4):
    if(len(s) < 4):
        flag = 0
        break
    if(s[i] == txt[i]):
        flag = 1
    else:
        flag = 0
        break

if(flag == 1):
    print("Yes")
else:
    print("No")
import math
a,b = map(int,input().split())
print(int(a*b//math.gcd(a,b)))

### FIXED CODE ###


def gcd(a,b):
    ma = max(a,b)
    mi = min(a,b)
    while(True):
        los = ma % mi
        ma = mi
        mi = los
        if los == 0:
            result = ma
            break
    return result

a,b = map(int,input().split())
print(a*b//gcd(a,b))
N, K = map(int, input().split())
A = tuple(map(int, input().split()))

costs = [0] * (N + 1)

loc = 1
for i in range(1, K+1):
    loc = A[loc - 1]

    if costs[loc] > 0:
        break

    costs[loc] = i

offset = costs[loc]
loop = i - offset

K -= offset
K %= loop

for _ in range(K):
    loc = A[loc - 1]
print(loc)

### FIXED CODE ###

N, K = map(int, input().split())
A = tuple(map(lambda n: int(n) - 1, input().split()))

costs = [-1] * N
loc = 0

if K <= N:
    for i in range(K):
        loc = A[loc]
    print(loc + 1)

else:
    costs[loc] = 0
    for i in range(1, K):
        loc = A[loc]

        if costs[loc] >= 0:
            break

        costs[loc] = i

    offset = costs[loc]
    loop = i - offset

    K -= i
    K %= loop

    for _ in range(K):
        loc = A[loc]
    print(loc + 1)
from collections import defaultdict
p_y = defaultdict(set)

N,M = map(int,input().split())
PY = [[int(x) for x in input().split()] for _ in range(M)]
for p,y in PY:
        p_y[p].add(y)

def set_rank(retu):
        return {x:i for i,x in enumerate(sorted(retu), 1)}

p_y = {p:set_rank(retu) for p,retu in p_y.items()}
for p,y in PY:
        print('{:06g}{:06g}'.format(p,p_y[p][y]))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)

def stgsn(N, maked_num, now_num):
    if now_num != '':
        if int(now_num) > N:
            return

        maked_num.append(now_num)

    stgsn(N, maked_num, now_num + '7')

    stgsn(N, maked_num, now_num + '5')

    stgsn(N, maked_num, now_num + '3')

    return maked_num


def main():
    N = int(input())


    maked_num = []
    now_num = ''

    maked_num = stgsn(N, maked_num, now_num)

    ans = [s for s in maked_num if '3' in s and '5' in s and '7' in s]
    print(len(ans))


main()
l = input()
string = l
num = input()
print(string)

### FIXED CODE ###

l = input().split()
if int(l[0])+int(l[1])==15:
    print('+')
elif int(l[0])*int(l[1]) ==15:
    print('*')
else:
    print('x')
H, W = map(int,input().split())
S = []
for _ in range(H):
    S.append(list(input()))

C = [[1 for i in range(W)] for j in range(H)]
L = ['.', '#']
D = {'.':0, '#':1}
tx = [1, 0, -1, 0]
ty = [0, 1, 0, -1]

def dfs(x, y, c, l):
    C[x][y] = 0
    l[c] += 1
    for i in range(4):
        nx = x + tx[i]
        ny = y + ty[i]
        if 0 <= nx < H and 0 <= ny < W and C[nx][ny] and L[c] != S[nx][ny]:
            l = dfs(nx, ny, 1 - c, l)
    return l

ans = 0
for i in range(H):
    for j in range(W):
        l = dfs(i, j, D[S[i][j]], [0, 0])
        ans += l[0] * l[1]

print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(4100000)

H, W = map(int,input().split())
S = []
for _ in range(H):
    S.append(list(input()))

C = [[1 for i in range(W)] for j in range(H)]
L = ['.', '#']
D = {'.':0, '#':1}
tx = [1, 0, -1, 0]
ty = [0, 1, 0, -1]

def dfs(x, y, c, l):
    C[x][y] = 0
    l[c] += 1
    for i in range(4):
        nx = x + tx[i]
        ny = y + ty[i]
        if 0 <= nx < H and 0 <= ny < W and C[nx][ny] and L[c] != S[nx][ny]:
            l = dfs(nx, ny, 1 - c, l)
    return l

ans = 0
for i in range(H):
    for j in range(W):
        l = dfs(i, j, D[S[i][j]], [0, 0])
        ans += l[0] * l[1]

print(ans)
a = map(int,input().split())
b = map(int,input().split())
c = map(int,input().split())

d = max(b)- min(b)
e = max(c)- min(c)

f = sum(range(a[0]))
g = sum(range(a[1]))

ans = (d * e * f * g) % (10**9 + 7)

print(ans)

### FIXED CODE ###

a = list(map(int,input().split(" ")))
b = list(map(int,input().split(" ")))
c = list(map(int,input().split(" ")))

x = 0
y = 0

for i in range(1,a[0]):
    x = x + b[i] - b[0]
    
xx = x
for i in range(1,a[0]-1):
    xx = xx - ((b[i] - b[i - 1]) * (a[0] - i))
    x = x + xx

for i in range(1,a[1]):
    y = y + c[i] - c[0]
    
yy = y
for i in range(1,a[1]-1):
    yy = yy - ((c[i] - c[i - 1]) * (a[1] - i))
    y = y + yy

ans = x * y
ans = ans % (10**9 + 7)

print(ans)
def lcs(x, y, pre_lcs, pre_lcs_len):
    rec = []
    idx = []
    for c in y:
        s = 0
        for i, k in enumerate(idx):
            t = x.find(c, s) + 1
            if t < 1:
                break
            if t < k:
                idx[i] = t
            s = k
        else:
            t = x.find(c, s) + 1
            if t:
                idx.append(t)
        rec.append(idx.copy())
    
    lcs_len = len(idx)
    if lcs_len > pre_lcs_len:
        lcs = ''
        pos = len(idx) - 1
        for line, yc in zip(rec[::-1], y[::-1]):
            i = line[pos] - 1
            xc = x[i]
            if xc == yc:
                lcs += xc
                if pos == 0:
                    return (lcs[::-1], lcs_len)
                pos -= 1
    else:
        return (pre_lcs, pre_lcs_len)

def lrs(s):
    s = s.rstrip()
    s_len = len(s)
    sep = s_len // 2
    ans, ans_len = lcs(s[:sep], s[sep:], '', 0)
    while sep > ans_len:
        ans, ans_len = lcs(s[:-sep], s[-sep:], ans, ans_len)
        sep -= 1
        ans, ans_len = lcs(s[:sep], s[sep:], ans, ans_len)
    return ans

import sys

input_lines = sys.stdin.readlines()

print('\n'.join(map(lrs, input_lines[:-1])))


### FIXED CODE ###

def lcs(x, y, pre_lcs, pre_lcs_len):
    pm = dict((zip('ABCDEFGHIJKLMNOPQRSTUVWXYZ', [0] * 26)))
    for c in pm:
        for i, xc in enumerate(x):
            if c == xc:
                pm[c] |= (1 << i)
    
    V = (1 << len(x)) - 1
    rec = []
    
    for yc in y:
        V = ((V + (V & pm[yc])) | (V & ~pm[yc]))
        rec.append(bin(V)[-len(x):])
    
    lcs_len = bin(V)[-len(x):].count('0')
    
    if lcs_len > pre_lcs_len:
        rx = x[::-1]
        lcs = ''
        idx = 0
        for v, yc in zip(rec[::-1], reversed(y)):
            idx = v.find('0', idx)
            if yc == rx[idx]:
                lcs += yc
                if len(lcs) == lcs_len:
                    return (lcs[::-1], lcs_len)
                idx += 1
    else:
        return (pre_lcs, pre_lcs_len)

from sys import stdin

def solve():
    file_input = stdin
    ans_out = []
    for s in file_input:
        s = s.rstrip()
        if s[0] == '#':
            break
        s_len = len(s)
        sep = s_len // 2
        ans, ans_len = lcs(s[:sep], s[sep:], '', 0)
        while sep > ans_len:
            ans, ans_len = lcs(s[:-sep], s[-sep:], ans, ans_len)
            sep -= 1
            ans, ans_len = lcs(s[:sep], s[sep:], ans, ans_len)
        ans_out.append(ans)
    print(*ans_out, sep='\n')

solve()
from typing import List
from functools import reduce
from operator import add


def create_hole(A: List, b:List):

    N = len(A)
    Hole = [[0 for i in range(N)] for j in range(N)]
    for i in range(3):
        for j in range(3):
            for value in b:
                if A[i][j] == value: Hole[i][j] = 1

    return Hole


def check_bingo(H: List):

    N = len(H)
    rowsum = sum([sum(row) == N for row in H])
    colsum = sum([sum(row) == N for row in map(list, zip(*H))])
    digsum = sum([H[i][i] for i in range(N)]) == N
    tdigsum = sum([H[i][N-i-1] for i in range(N)]) == N

    return rowsum + colsum + digsum + tdigsum > 0


def resolve():

    A = [list(map(int, input().split())) for i in range(3)]
    N = int(input())
    b = [int(input()) for i in range(N)]
    print('Yes' if check_bingo(create_hole(A, b)) else 'No')
    
resolve()

### FIXED CODE ###

def create_hole(A: list, b:list):

    N = len(A)
    Hole = [[0 for i in range(N)] for j in range(N)]
    for i in range(3):
        for j in range(3):
            for value in b:
                if A[i][j] == value: Hole[i][j] = 1

    return Hole


def check_bingo(H: list):

    N = len(H)
    rowsum = sum([sum(row) == N for row in H])
    colsum = sum([sum(row) == N for row in map(list, zip(*H))])
    digsum = sum([H[i][i] for i in range(N)]) == N
    tdigsum = sum([H[i][N-i-1] for i in range(N)]) == N

    return rowsum + colsum + digsum + tdigsum > 0


def resolve():

    A = [list(map(int, input().split())) for i in range(3)]
    N = int(input())
    b = [int(input()) for i in range(N)]
    print('Yes' if check_bingo(create_hole(A, b)) else 'No')
    
resolve()
import.math
a,b = map(int, input().split())
print(int(math.ceil((a+b)/2)))

### FIXED CODE ###

import math
a,b = map(int, input().split())
print(int(math.ceil((a+b)/2)))
S = input().strip()	 # novel
T = input().strip()  # substring

x = len(T)
ans = len(S)
for i in range(len(S) - x):
  U = S[i:i+x]
  cost = sum(1 if U[k] != T[k] for k in range(x))
  ans = min(ans, cost)
print(ans)

### FIXED CODE ###

S = input().strip()	 # novel
T = input().strip()  # substring

x = len(T)
ans = len(S)
for i in range(len(S) - x + 1):
  U = S[i:i+x]
  cost = sum(1 if U[k] != T[k] else 0 for k in range(x))
  ans = min(ans, cost)
print(ans)
N,M=map(int, input().split())
List=[0]*M

for i in range(N):
  K=input().split()
  for k in range(K):
    List[int(k[K])-1]+=1
    
print(List.count(N))

### FIXED CODE ###

N,M = map(int,input().split())
list_a = [0]*M
for i in range(N):
    k = input().split()
    for K in range(1,int(k[0])+1):
        list_a[int(k[K])-1] += 1
 
print(list_a.count(N))
N, K, *A = map(int, open(0).read().split())
MOD = 10 ** 9 + 7

if sum(v == 0 for v in A) > N - K:
    print(0)
    exit()


if all(v <= 0 for v in A):
    x = sorted([v for v in A if v < 0])
    ans = 1
    if K % 2 == 0:
        for i in range(K):
            ans = ans * x[i] % MOD
    else:
        for i in range(N - K, N):
            ans = ans * x[i] % MOD
            
    print(ans)
    exit()


x = sorted([(abs(v), v // abs(v)) for v in A if v != 0])
plus = []
minus = []
for i in range(K):
    v, s = x.pop()
    if s == 1:
        plus.append(v)
    else:
        minus.append(v)


if len(minus) % 2 != 0:
    p_cand = MOD
    m_cand = MOD
    while x:
        v, s = x.pop()
        if s == 1 and p_cand == MOD:
            p_cand = v
        elif s == -1 and m_cand == MOD:
            m_cand = v
    
    if p_cand == MOD and m_cand != MOD and plus:
        plus.pop()
        minus.append(m_cand)
    elif m_cand == MOD and p_cand != MOD and minus:
        minus.pop()
        plus.append(p_cand)
    elif p_cand != MOD and m_cand != MOD and plus and minus:
        p_val = plus.pop() * p_cand
        m_val = minus.pop() * m_cand
        
        if p_val > m_val:
            plus.append(p_val)
        else:
            minus.append(m_val)
            
ans = 1
for v in plus:
    ans = ans * v % MOD
for v in minus:
    ans = ans * (-v) % MOD
print(ans)


### FIXED CODE ###

N, K, *A = map(int, open(0).read().split())

MOD = 10 ** 9 + 7
s = []  # v >= 0
t = []  # v < 0
for i in range(N):
    if A[i] < 0:
        t.append(A[i])
    else:
        s.append(A[i])
        
ok = False  # ans > 0
if len(s) > 0:
    if N == K:
        ok = len(t) % 2 == 0
    else:
        ok = True
else:
    ok = K % 2 == 0

ans = 1
if not ok:
    x = sorted(A, key=lambda x: abs(x))
    for i in range(K):
        ans = ans * x[i] % MOD
else:
    s.sort()
    t.sort(key=lambda x: abs(x))
    if K % 2 == 1:
        ans = ans * s.pop() % MOD
        
    p = []
    while len(s) >= 2:
        x = s.pop() * s.pop()
        p.append(x)
    
    while len(t) >= 2:
        x = t.pop() * t.pop()
        p.append(x)

    p.sort(reverse=True)
    for i in range(K // 2):
        ans = ans * p[i] % MOD
    
print(ans)
W, H, N = [int(i) for i in input().split(" ")]

a1 = [0,0]
a2 = [W,0]
a3 = [0,0]
a4 = [0,H]

for i in range(0,N):
  lst = [int(i) for i in input().split(" ")]
  if lst[2] == 1:
    a1[0] = max(a1[0],lst[0])
  elif lst[2] == 2:
    a2[0] = max(a2[0],lst[0])
  elif lst[2] == 3:
    a3[1] = max(a3[1],lst[1])
  elif lst[2] == 4:
    a4[1] = max(a4[1]1,lst[1])

print(max(0,a2[0]-a1[0])*max(0,(a4[1]-a3[1]))


### FIXED CODE ###

W, H, N = [int(i) for i in input().split(" ")]

a1 = [0,0]
a2 = [W,0]
a3 = [0,0]
a4 = [0,H]

for i in range(0,N):
  lst = [int(i) for i in input().split(" ")]
  if lst[2] == 1 and lst[0] > a1[0]:
    a1[0] = lst[0]
  elif lst[2] == 2 and lst[0] < a2[0]:
    a2[0] = lst[0]
  elif lst[2] == 3 and lst[1] > a3[1]:
    a3[1] = lst[1]
  elif lst[2] == 4 and lst[1] < a4[1]:
    a4[1] = lst[1]

if (a2[0]-a1[0])<0 or (a4[1]-a3[1])<0:
    print(0)
else:
    print((a2[0]-a1[0])*(a4[1]-a3[1]))
import math
n = int(input())

highest = int(math.sqrt(n))
l = [0]*n
cal = 0

for x in range(1, highest+1):
  for y in range(1, highest+1):
    for z in range(1, highest+1):
      cal = x**2 + y**2 + z**2 + x*y + y*z + z*x
      if cal > n+1:
        continue
      else:
        l[cal-1] += 1
        
for i in range(len(l)):
  print(l[i])

### FIXED CODE ###

import math
n = int(input())

highest = int(math.sqrt(n))
l = [0]*n
cal = 0

for x in range(1, highest+1):
  for y in range(1, highest+1):
    for z in range(1, highest+1):
      cal = x**2 + y**2 + z**2 + x*y + y*z + z*x
      if cal > n:
        continue
      else:
        l[cal-1] += 1
        
for i in range(len(l)):
  print(l[i])
A, B, C = map(int, input().split())
print("YES" if A+B>X else "NO")

### FIXED CODE ###

A, B, X= map(int, input().split())
print("YES" if A<=X and A+B>=X else "NO")
s = input()
if s[0] == s[1] or s[1] == s[2] 0r s[2] == s[3]:
  print('Bad')
else:
  print('Good')

### FIXED CODE ###

s = input()
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
  print('Bad')
else:
  print('Good')
N, C, K = map(int, input().split())
T = [int(input()) for _ in range(N)]
T.sort()

bus = 0
member = 1
time = T[0] + K

for i in range(1, N):
    member += 1
    if time < T[i]:
        bus += 1
        member = 1
        time = T[i] + K
    elif time > T[i] and member >= C:
        if C % member == 0:
            bus += C // member
        else:
            bus += C // member + 1
        member = 0
        time = T[i+1] + K
    else:
        pass

if member > 0:
    bus += 1

print(bus)

### FIXED CODE ###

N, C, K = map(int, input().split())
T = [int(input()) for _ in range(N)]
T.sort()

bus = [T[0]]
count = 1

for i in range(1, N):
    if T[i] <= bus[0] + K and len(bus) < C:
        bus.append(T[i])
    else:
        count += 1
        bus = []
        bus.append(T[i])

print(count)
import sys

def input():
    return sys.stdin.readline().strip()


n,k=map(int,input().split())
cst=list(map(int,input().split()))
arr=[0]*n
arr[1]=abs(cst[1]-cst[0])
for i in range(2, n):
    arr[i]=min(abs(cst[j]-cst[i])+arr[j] for j in  range(max(i-k,0),i))
print(arr[n-1])

#print(arr)

### FIXED CODE ###

n=int(input())
cst=list(map(int,input().split()))
arr=[0]*10**5
arr[0]=0
arr[1]=abs(cst[1]-cst[0])
if n==2:
    print(arr[1])
else:
    for i in range(2, n):
        arr[i] = min(abs(cst[i - 1] - cst[i]) + arr[i - 1], abs(cst[i - 2] - cst[i]) + arr[i - 2])
    print(arr[i])
n, m = map(int, input().split())
 
nums = sorted([int(i) for i in input().split()])[::-1]
 
ms = []
for _ in range(m):
    a, b = map(int, input().split())
    ms += [b] * a
ms = sorted(ms)[::-1]
 
ans = i = j = 0
for _ in range(n):
    if nums[i] >= ms[j]:
        ans += nums[i]
        i += 1
    else:
        ans += ms[j]
        j += 1
print(ans)

### FIXED CODE ###

# from collections import defaultdict
# n, m = map(int, input().split())
# nums = [int(i) for i in input().split()]
#
# num_freq = defaultdict(int)
#
# for _ in range(m):
#     b, c = map(int, input().split())
#     num_freq[c] += b
#
#
# new_list = []
# for num, freq in sorted(num_freq.items(), key=lambda x: -x[0]):
#     new_list += [num] * freq
#     if len(new_list) >= n:
#         break
# tmp = sorted(nums + new_list)[::-1]
# print(sum(tmp[:n]))

# ↑と同じ処理なのに↑のはREになる
n, m = map(int, input().split())
nums = list(map(int, input().split()))
exc = []

for i in range(m):
    exc.append(list(map(int, input().split())))
exc.sort(key=lambda x: x[1], reverse=True)
e = []
count = 0
for i in range(m):
    freq = exc[i][0]
    e += [exc[i][1]] * freq
    count += freq
    if count >= n:
        break
cards = sorted(nums + e, reverse=True)
print(sum(cards[:n]))
import fractions
from functools import reduce
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
N,K = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
x = gcd_list(A)
if(K%x==0 and max(A)>=K):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')


### FIXED CODE ###

import fractions as math
from functools import reduce
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
N,K = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
x = gcd_list(A)
if(K%x==0 and max(A)>=K):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')