Function to print the count of Array elements greater than all elements on its left and next K elements on its right
int countElements ( int arr [ ] , int n , int k ) { stack < int > s ; vector < int > next_greater ( n , n + 1 ) ;