Potential bug in hidden test cases for MaxSubSum (even length alternating subarray)

I am working through the ‘Frequency Map’ module in the roadmap. The problem MaxSubSum asks to find an even-length contiguous subarray where the sum of alternating elements is equal.

My current approach uses O(N) prefix sums with frequency maps (separated by parity to ensure even length) and handles large integers with long long. While it passes all provided sample test cases, it consistently fails on hidden test cases with a ‘Wrong Answer’ status. I have attempted multiple implementations, including using std::set and std::sort to avoid hash collisions, but the issue persists

Screenshot

Additional info• Constraints handled: N \le 10^5, A[i] \le 10^8 (using 64-bit integers to prevent overflow).

Parity logic: Strictly enforcing (R - L + 1) \pmod 2 = 0 by comparing prefix sums of the same parity.

Problem Source: Roadmap to 3* (Paid Tier), Frequency Map module.

Possible Bug: There may be a discrepancy between the problem description (which requires an even-length subarray) and the hidden test case expected outputs, or the test cases might be sensitive to specific STL map overhead.