Push the element to container and hash the L and R
for ( let i = 0 ; i < n ; i ++ ) { v . push ( a [ i ] [ 0 ] ) ; mpp . set ( a [ i ] [ 0 ] , 1 ) ; v . push ( a [ i ] [ 1 ] ) ; mpp . set ( a [ i ] [ 1 ] , 2 ) ; }