Here the problem says that the impact points must be distinct
If i give the input for a testcase as: 5 1 5 10 , i.e. Total impact 5 , base = 1, no of impact points = 5, the only solution should be 1^1 + 1^ 1 + 1^1 + 1^1 + 1^1 = 5, i.e. there has to be same impact points(not distinct) as Xi = X0 + 1 or X0 - 1. But the problem clearly states impact points must be distinct.
I tried putting this testcase in this correct solution(not mine):
but it gives the output “yes” i.e. there exists 5 distinct impact points, which is incorrect.
Plz tell me if im right or wrong.