# your code goes hereT=int(input())for t in range(T): l=list(map(int,input().split())) c=0 for i in range(1,len(l)): if l[0]<l[i]: c+=1 print(c)
4 2 3 4 1 10000 0 1 2 500 600 400 300 0 9999 10000 9998
2 0 1 3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!