Problems > Row Coloring, 5 Colors > Editorial

Row Coloring, 5 Colors — Solution & Editorial

Back to the Problem

There are k choices for the first cell and (k−1) for each subsequent cell: k·(k−1)N−1.

Complexity: O(log N)