In this Google Code Jam 2021 Round 1C problem 1 the expected solution in my sense to the test case below is:
but the actual output is:
Could someone please explain why the actual output is not same as what i expect.
17 4 4 18 6
PS: This is my solution, which is also incorrect.