This problem statement is clearly broken. The example has typos and is missleading.
It tells you one job cannot start on same day another job ends, which doesn’t match the solution accepted.
This can be a very simple and well classified hard problem.
Plz fix it.
-edit-
Ok, eventually I figured my missinterpretation about the off by 1 situation here. A simple example can demonstrate this. On a job that starts at day 2 and has duration 3, it ends at day 4 instead of day 5. It runs on days 2, 3 and 4, for a total of 3 days.
Still, plz consider fixing the little typo on the problem statement on calculation C.