Isn't the purpose of competitive challenges to show the extent of your knowledge?
If someone had trouble to even start, then they would be successful at showing what they know and can.
The OP description contains nonsense (probably intentional distraction). Talking about "position" is meaningless, if you ever adjust just one value.
x = h1; // no problem with this
each day can go to h1+a, h1+b or h1+c
Okay, now there are four values to have: {h1, h1+a, h1+b, h1+c}
That makes no sense, if the goal is to find "paths".
It would make more sense to say: "Each day one can
add a, b, or c
to the current value".
That way it would be possible to "advance" towards the final value h2.
There is still "one can". Not "has to". If I
can add something, then I'm at liberty to do nothing. In your first example: (0,3,3), (3,0,3), and (3,3,0) all advance by 6. Why work every day if you can get there with less effort?
I guess one
has to add something every time.
There can be multiple (or none) solutions (x,y,z) for:
1 2
|
h1 + x*a + y*b + z*c == h2
x+y+z == N
|
For each solution there are permutations.
The first example had two solutions: (1,1,1) and (0,3,0)
The (1,1,1) has six permutations.
The (0,3,0) has one permutation.
If (a=b or b=c or c=a or a=b=c), then you have less unknowns to solve. For example, if a=b=c, then (h1 + N*a == h2), or there is no path at all.
How to count permutations? Math has solution for that.