Javelin Qualification

Can anybody tell me what is wrong with this solution.

Problem link::

from heapq import heappop, heappush, heapify
t=int(input())

for _ in range(t):
n,m,x=map(int,input().split())
arr=list(map(int,input().split()))
res=[]
cnt=0

heap=[]

for i,j in enumerate(arr):
    heap.append((-1*j,i+1))
heapify(heap)
# print(heap)
for i,j in heap:
    
    if (i*-1)>=m or cnt<x:
        res.append(j)
        cnt+=1
    
res.sort()
print(len(res),*res)

@anaya_035 - hope this helps.

thank you

I’m still not able to resolve though:(

Hope this help

i resolved and understood why it was not working thank you @ly12 and @hrishik85