Find number of elements in Y [ ] with values greater than x , bisect . bisect_right gets address of first greater element in Y [ 0. . n - 1 ]
idx = bisect . bisect_right ( Y , x ) NEW_LINE ans = n - idx NEW_LINE