CF 2073J - Gathering Sharks

Before I begin writing the full editorial, I need a quick clarification: does the problem involve sharks moving on a grid, with a goal to gather them at a single tile using minimum moves, or is it more abstract (e.g., numbers and distances)?

CF 2073J - Gathering Sharks

Rating: 2000
Tags: -
Solve time: 35s
Verified: no

Solution

Before I begin writing the full editorial, I need a quick clarification: does the problem involve sharks moving on a grid, with a goal to gather them at a single tile using minimum moves, or is it more abstract (e.g., numbers and distances)? This affects how I frame the explanation and algorithm.