Function for push down operation on the segment tree
static void pushDown ( ArrayList sum , ArrayList add , int rt , int ln , int rn ) { if ( ( int ) add [ rt ] != 0 ) { add [ rt << 1 ] = ( int ) add [ rt << 1 ] + ( int ) add [ rt ] ; add [ rt << 1 1 ] = ( int ) add [ rt << 1 1 ] + ( int ) add [ rt ] ; sum [ rt << 1 ] = ( int ) sum [ rt << 1 ] + ( int ) add [ rt ] * ln ; sum [ rt << 1 1 ] = ( int ) sum [ rt << 1 1 ] + ( int ) add [ rt ] * rn ; add [ rt ] = 0 ; } }