Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

10
  • $\begingroup$ TOO FAST:) could use an approach you draw cubes around the origin as a visual to do the same. $\endgroup$ Commented Nov 8, 2019 at 3:06
  • $\begingroup$ Since the submarines continue "if not interrupted", and I assume that includes when they have to stop for a submarine that is blocking them, couldn't you miss a submarine if it has to stop and becomes a "different" submarine (in particular, one that you already checked for)? I agree that this is the correct and intended answer but it seems like the question isn't precise enough to exclude this. $\endgroup$ Commented Nov 8, 2019 at 3:42
  • $\begingroup$ You are "correct" that I could be more precise and allow submarines share a grid-point and if they do so, both are killed if hit. $\endgroup$ Commented Nov 8, 2019 at 4:26
  • $\begingroup$ @Deusovi Actually you did not respond fully/accurately - you should use 5 elements in your "ordering" of shots. $\endgroup$ Commented Nov 13, 2019 at 3:44
  • 1
    $\begingroup$ @Moti What do you mean by "you miss the two dimension for a direction"? There are four coordinates here: the $x,y$ of the starting position and the $u,v$ of the movement per time-step (the "direction"). These four coordinates uniquely specify the starting state of a ship. $\endgroup$ Commented Nov 13, 2019 at 5:31