SHENZHEN I/O

SHENZHEN I/O

Xem thông số:
Clarifying Harvest Time problem
This is about that requirement of harvesting if you are on a harvest location regardless if it's the one you're currently heading to.

Say I get a request for (7,3) followed by (6,2). The robot may or may not pass over (6,2) on the way to (7,3) depending on how it routes. In the first test block, it looks like the robot always starts moving diagonally if it should move diagonally at all on the way to its destination.

My question is: should I also move diagonally first? Or should I look to see if it's at all possible to harvest along the way without taking any extra time to get to the oldest request?
< >
Đang hiển thị 1-2 trong 2 bình luận
Aurelius 29 Thg05 @ 11:00am 
The simplest solution to move diagonally first works.
In the first test run, data points numbers 4,5,6 are respectively (7,6), (8,2), (7,3).
Moving from (7,6) to (8,2) diagonally first bypasses (7,3) which could be reached with no additional distance travelled (diagonally last in that case).
To be absolutely sure, we'd need to make a solution which went to (7,3) on the way to (8,2) and see if that is permitted or not. In an ideal world that would be a higher-rated solution but I suspect it would fail the test.
Let us know if you decide to try it. :-)
PeonyInk 29 Thg05 @ 10:08pm 
I am absolutely not going to try and overcomplicate my solution lol. Thank you!
< >
Đang hiển thị 1-2 trong 2 bình luận
Mỗi trang: 1530 50