Given two list of integers 'a' and 'b' of same length 'n'. Find the count of strictly increasing sequences of integers l[0] < l[1] < .... l[n-1] so that min(a[i], b[i]) <= l[i] <= max(a[i], b[i]) for each 'i'.
Example :
a = [6,3,4,4]
b = [1,5,1,6]
4 possible solutions are there :
1, 3, 4 ,5
1, 3, 4, 6
2, 3, 4, 5
2, 3, 4, 6
Execution limit : 1 sec
len(a) , len(b) <= 100
values of a,b between 1 and 10000