Let's start collecting test cases:
3 2 40 2 4 44 4 2 22 2 4 04 0 0 2
answer should be too bad
I assume that landing exactly on the property's border still counts as "jackpot"
Is it valid test case the landing on the property's border?
From the problem, in the last line it says: "(x_impact,y_impact) will never lie on a side or corner of the polygon."
Isn't it that case?
You're right, I removed the according test cases
FYI, the formula for the intersection point on the original presentation was wrong. They have subsequently corrected it and uploaded a corrected version to the site. If anyone is working on this using the formula from the presentation you should download again before implementing.
Cheers, that was causing a problem for me. THanks for pointing it out!