LFEB14B - Editorial

Used FOr Loop For Power Calculation and it Worked For all

for(ll i=1;i<=bounds.second-bounds.first;i++)
{
ans=(ans*2)%MOD;
}

@dhruvsinghal - The two questions are equivalent.

The editorialist is talking about the remaining elements and not the deleted elements. He means that you must delete all elements except the maximum of the array. If the question was find the maximum mean of the deleted elements, then we simply put the deleted elements into another set. And if the question is everything except the deleted elements, then we delete everything other than the elements that we want.