Company: NIKE_10thjuly
Difficulty: medium
Mystical Array You are given a non-decreasing integer array nums . You may repeatedly choose two current indices i < j such that nums[i] < nums[j] , then delete both elements. The remaining elements keep their relative order and are re-indexed. Find the minimum possible length after any number of operations. Input Format The first line contains n . The second line contains n integers, the elements of nums . Output Format Print the minimum possible remaining length. Constraints 1 <= n <= 200000 (inferred judge-safe bound) nums is sorted in non-decreasing order. Each value is a signed 32-bit integer (inferred from the stored legacy cases). Examples Input: 5 1 1 1 2 2 Output: 1 One 1 can be paired with one 2 twice. The remaining 1 has no larger element left. Notes The comparison is strict; equal values cannot be paired. An operation may use any two remaining positions; it is not restricted to adjacent elements.