C # program to count number of distinct instance where second highest number lie before highest number in all subarrays .
using System ; using System . Collections . Generic ; class GFG { static int MAXN = 100005 ;