Problem: Takahashi has decided to hold fastest-finger-fast quiz games. Kizahashi, who is in charge of making the scoreboard, is struggling to write the program that manages the players' scores in a game, which proceeds as follows.  A game is played by N players, numbered 1 to N. At the beginning of a game, each player has K points.  When a player correctly answers a question, each of the other N-1 players receives minus one (-1) point. There is no other factor that affects the players' scores.  At the end of a game, the players with 0 points or lower are eliminated, and the remaining players survive.  In the last game, the players gave a total of Q correct answers, the i-th of which was given by Player A_i. For Kizahashi, write a program that determines whether each of the N players survived this game.

Submission attempts (in order):
import sys
import numpy as np


def main(stdin):
    N, K, Q = stdin[:3]
    ans = np.full(N + 1, K - Q, dtype=np.int64)
    for i in stdin[3:]:
        ans[i] += 1
    return ans


if sys.argv[-1] == 'ONLINE_JUDGE':
    import numba
    from numba.pycc import CC
    cc = CC('my_module')
    cc.export('main', 'i8[:](i8[:],)')(main)
    
    cc.compile()
else:
    from my_module import main
    stdin = np.array([int(_) for _ in open(0).read().split()])
    ans = main(stdin)
    print(np.where(ans > 0, 'Yes', 'No'), sep='\n')


import sys
import numpy as np

I = np.array([int(_) for _ in open(0).read().split()])
N, K, Q = I[:3]
ans = I[3:] + K - Q
print(*np.where(ans > 0, 'Yes', 'No')[1:], sep='\n')


import sys
import numpy as np


def main(stdin):
    N, K, Q = stdin[:3]
    ans = np.full(N + 1, K - Q, dtype=np.int64)
    for i in stdin[3:]:
        ans[i] += 1
    ans = np.where(ans > 0, 'Yes', 'No')
    return ans[1:]


if sys.argv[-1] == 'ONLINE_JUDGE':
    import numba
    from numba.pycc import CC
    cc = CC('my_module')
    cc.export('main', '(i8[:],)')(main)
    
    cc.compile()
else:
    from my_module import main
    stdin = np.array([int(_) for _ in open(0).read().split()])
    print(*main(stdin), sep='\n')


import sys
import numpy as np


def main(stdin):
    N, K, Q = stdin[:3]
    ans = np.full(N + 1, K - Q, dtype=np.int64)
    for i in stdin[3:]:
        ans[i] += 1
    return ans


if sys.argv[-1] == 'ONLINE_JUDGE':
    import numba
    from numba.pycc import CC
    cc = CC('my_module')
    cc.export('main', 'i8[:](i8[:],)')(main)
    
    cc.compile()
else:
    from my_module import main
    stdin = np.array([int(_) for _ in open(0).read().split()])
    ans = main(stdin)
    print(np.where(ans > 0, 'Yes', 'No')[1:], sep='\n')


import numpy as np
I = np.array([int(_) for _ in open(0).read().split()])
N, K, Q = I[:3]
ans = I[3:] + K - Q
print(np.where(ans > 0, 'Yes', 'No')[1:], sep='\n')


import sys
import numpy as np


def main(stdin):
    N, K, Q = stdin[:3]
    ans = np.full(N + 1, K - Q, dtype=np.int64)
    for i in stdin[3:]:
        ans[i] += 1
    ans = np.where(ans > 0, 'Yes', 'No')
    return ans[1:]


if sys.argv[-1] == 'ONLINE_JUDGE':
    import numba
    from numba.pycc import CC
    cc = CC('my_module')
    cc.export('main', 'i8[:](i8[:],)')(main)
    
    cc.compile()
else:
    from my_module import main
    stdin = np.array([int(_) for _ in open(0).read().split()])
    print(*main(stdin), sep='\n')


import sys
import numpy as np


def main(stdin):
    N, K, Q = stdin[:3]
    ans = np.full(N + 1, K - Q, dtype=np.int64)
    for i in stdin[3:]:
        ans[i] += 1
    ans = np.where(ans > 0, 'Yes', 'No')
    print(*ans[1:], sep='\n')


if sys.argv[-1] == 'ONLINE_JUDGE':
    import numba
    from numba.pycc import CC
    cc = CC('my_module')
    cc.export('main', '(i8[:],)')(main)
    
    cc.compile()
else:
    from my_module import main
    stdin = np.array([int(_) for _ in open(0).read().split()])
    main(stdin)


import sys
import numpy as np


def main(stdin):
    N, K, Q = stdin[:3]
    ans = np.full(N + 1, K - Q, dtype=np.int64)
    for i in stdin[3:]:
        ans[i] += 1
    return ans


if sys.argv[-1] == 'ONLINE_JUDGE':
    import numba
    from numba.pycc import CC
    cc = CC('my_module')
    cc.export('main', 'i8[:](i8[:],)')(main)
    
    cc.compile()
else:
    #from my_module import main
    stdin = np.array([int(_) for _ in open(0).read().split()])
    ans = main(stdin)
    print(*np.where(ans > 0, 'Yes', 'No')[1:], sep='\n')


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted