More is not always better? Enhancing Many-Shot In-Context Learning with Differentiated and Reweighting Objectives