2593. Find Score of an Array After Marking All Elements - JAVA (Biweekly Contest 100)