ACM finals Beijing "Getting a jump on a crime" WA

Hello,
I’m trying to solve the problem https://open.kattis.com/problems/gettingjump and my code is this one https://ideone.com/IpZBm8

I tried multiple implementation as you can see in the commented code.
The problem is pretty straight forward regarding the idea but somehow I’m failing at implementing it.

I’m always failing the test 27/80.
If anyone is willing to share some tests or maybe to give a hand in finding my bug I will be really grateful.

Thanks

anyone :-d ?

Its giving privacy error/unsafe link error on clicking. Thats why no one is checking it out. Can you please copy question and paste it in a tab? :slight_smile:

ty @vijju123 - corrected the link to a secure one - sorry for this

1 Like

Try this test case-

Input
4 4 100 30 1 2
0 1 1 1
1000 1000 1000 1000
1 1 1 1
1000 1000 1000 1000
Your Output
X X 1 1 
0 X X X 
X X 1 1 
X X X X 

I found it little weird that he cannot goto adjacent buildings but in a single jump can goto those corners. Perhaps this is the wrong case?

thanks for the test case - debugging

the test case and the result seems ok.
you cannot throw a rock from the center of that building (1,0) to (0,0) because the angle needed is either negative (through the building either it will hit the margin of the building (1,0) while going down to the center of building (0,0)

I will also investigate the rest of the connections.

going from building (1,0) to (0,0) is impossible because the max dist horizontally that can be is v ^ 2 / G = in this case is 91.77

I think you’re right. I will see if I can come up with another case :slight_smile:

did anyone active here solve this problem ?

//