Google OA 2021
Anonymous User
1926

image
image
What will be an efficient way to solve this?
Constraints:

1<=N<=10^5
1<=A,B,C<=10^9
1<=H[i]<=10^9
Comments (5)