seg tree to update element and get (max+second max) of a range