Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n,k,q = [int(x) for x in input().split()]
    a = []
    for i in range(q):
        a.append(int(input()))

    for i in range(n):
        count = a.count(i+1)
        point = k + count - q
        if point > 0:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()


Fixed submission:
import collections

def main():
    n,k,q = [int(x) for x in input().split()]
    a = []
    for i in range(q):
        a.append(int(input()))

    c = collections.Counter(a)

    for i in range(n):
        index = int('{}'.format(i+1))
        point = k + c[index] - q
        if point > 0:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

def main():
    n,k,q = [int(x) for x in input().split()]
    life = [k]*n
    a = []
    for i in range(q):
        a.append(int(input()))

    life = np.array(life)
    for i in range(q):
        temp = [1]*n
        temp[a[i]-1] = 0
        life -= temp

    for i in range(n):
        if life[i] <= 0:
            print('No')
        else:
            print('Yes')


if __name__ == '__main__':
    main()


Fixed submission:
import collections

def main():
    n,k,q = [int(x) for x in input().split()]
    a = []
    for i in range(q):
        a.append(int(input()))

    c = collections.Counter(a)

    for i in range(n):
        index = int('{}'.format(i+1))
        point = k + c[index] - q
        if point > 0:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n,k,q = [int(x) for x in input().split()]
    life = [k]*n
    a = []
    for i in range(q):
        a.append(int(input()))

    for i in range(q):
        for j in range(n):
            if a[i] != j+1:
                life[j] -= 1

    for i in range(n):
        if life[i] <= 0:
            print('No')
        else:
            print('Yes')


if __name__ == '__main__':
    main()


Fixed submission:
import collections

def main():
    n,k,q = [int(x) for x in input().split()]
    a = []
    for i in range(q):
        a.append(int(input()))

    c = collections.Counter(a)

    for i in range(n):
        index = int('{}'.format(i+1))
        point = k + c[index] - q
        if point > 0:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n,k,q = [int(x) for x in input().split()]
    life = [k]*n
    a = []
    for i in range(q):
        a.append(int(input()))
    result = ['Yes']*n
    for i in range(q):
        for j in range(n):
            if result[j] == 'No':
                continue
            if a[i] != j+1:
                life[j] -= 1
                if life[j] <= 0:
                    result[j] = 'No'
    for i in range(n):
        print(result[i])

if __name__ == '__main__':
    main()


Fixed submission:
import collections

def main():
    n,k,q = [int(x) for x in input().split()]
    a = []
    for i in range(q):
        a.append(int(input()))

    c = collections.Counter(a)

    for i in range(n):
        index = int('{}'.format(i+1))
        point = k + c[index] - q
        if point > 0:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n,k,q = [int(x) for x in input().split()]
    life = [k]*n
    a = []
    for i in range(q):
        a.append(int(input()))

    result = ['Yes']*n
    for i in range(q):
        for j in range(n):
            if a[i] == j+1:
                continue
            life[j] -= 1
            if life[j] <= 0:
                result[j] = 'No'
    for i in range(n):
        print(result[i])

if __name__ == '__main__':
    main()


Fixed submission:
import collections

def main():
    n,k,q = [int(x) for x in input().split()]
    a = []
    for i in range(q):
        a.append(int(input()))

    c = collections.Counter(a)

    for i in range(n):
        index = int('{}'.format(i+1))
        point = k + c[index] - q
        if point > 0:
            print('Yes')
        else:
            print('No')


if __name__ == '__main__':
    main()