Number of subarrays with maximum values in given range || C++ || GFG Daily Problem