One of our sponsors wanted a problem which is related to viruses or antivirus software. We actually had a hard time designing such a problem, but at the end we came up with the virus problem.
The task description might be a bit complicated, the real task is to generalize binary search to trees. After coming up with this idea we even found an article about how to solve it very efficiently.
First add direction to the edges so all the nodes can be reached from a root node following the edges. Then the solution is a kind of dynamic programming, in which you assign the numbers starting from the leafs.
Assign zero to the leafs. To each node assign the smallest number that is not visible in the direction of its children, but is greater than any number that is visible in the direction of at least two children. Visible means that following the edges in a direction a number hides a smaller one behind it. It is not easy to see, but this numbering gives a solution to the problem.
The assignment can be done with a single depth first search. It can be shown that the greatest number is always less than log(N), where N is the number of nodes, so bit masks can be used to assign the numbers very efficiently (see our solution).