I have not given today's weekly contest 294. But when i saw hard problem of that it was same that of
https://leetcode.com/discuss/interview-question/1736639/solution-to-amazon-oa-2022-problem-sum-of-scores-of-subarray/1298722 posted here. It also contains code of that as well. Those who have seen from here might have solved. Dont you think leetcode should do regarding this?