Insert it again into the multiset since it is within the k - size window
s . insert ( mp ( p [ i ] , dp [ i ] ) ) ; } for ( int i = k ; i < n ; i ++ ) { double l = ( s . begin ( ) ) -> first ; ll min = ( s . begin ( ) ) -> second ; p [ i ] = log ( arr [ i ] ) + l ; dp [ i ] = ( arr [ i ] * min ) % mod ;