Codechef problem 5:
Ashishgup and Interviews
import math
for _ in range(int(input())):
n,k=input().split()
n=int(n)
k=int(k)
arr=[int(i) for i in input().split()]
count=0
count1=0
flag1=0
for i in range(n):
if arr[i]>k:
flag1=1
if arr[i]>-1:
count+=1
if arr[i]==0 or arr[i]==1:
count1+=1
if count<math.ceil(n/2):
print("Rejected")
elif flag1==1:
print("Too Slow")
elif count1 == n:
print("Bot")
elif (flag1==0 or count>math.ceil(n/2)):
print("Accepted")
else:
pass
Comments
Post a Comment