Angry Professor Problem
Lancelot03
Posted on August 22, 2022
import math
import os
import random
import re
import sys
def angryProfessor(k, a):
return 'YES' if sum(map(lambda x: x <= 0, a)) < k else 'NO'
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
t = int(input().strip())
for t_itr in range(t):
first_multiple_input = input().rstrip().split()
n = int(first_multiple_input[0])
k = int(first_multiple_input[1])
a = list(map(int, input().rstrip().split()))
result = angryProfessor(k, a)
fptr.write(result + '\n')
fptr.close()
💖 💪 🙅 🚩
Lancelot03
Posted on August 22, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
beginners "🚀 From Algorithms to Applications: My Journey as a Machine Learning Developer 🤖"
June 19, 2024