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