next up previous
Next: Sample Input Up: Beehives Previous: Input

Output

The output of each instance consists of a line of numbers. The first number x is the total number of cells that are exactly c cells away from cell b, and the rest of the x numbers are the cell numbers, in increasing order and separated by a space, that are exactly c cells away from cell b.

For example, for a size-5 beehive (Figure gif right), cell tex2html_wrap_inline193 is exactly 3 cells away from cell tex2html_wrap_inline195 (tex2html_wrap_inline197) but cell tex2html_wrap_inline199 is not exactly 3 cells away from cell tex2html_wrap_inline195: although one can do tex2html_wrap_inline203 that looks like 3 cells away, one can also do tex2html_wrap_inline205 which is actually 2 cells away.



ACM Programming Contest Account
Mon Feb 5 17:30:22 EST 2001