Flow Free

From programming_contest
Revision as of 15:14, 9 December 2017 by imported>Kmk21 (Created page with "This problem asks us to solve "flow free," a fun mobile game. (or at least determine whether a given puzzle is solveable). The limiting to 4x4 is a giveaway that this is brut...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This problem asks us to solve "flow free," a fun mobile game. (or at least determine whether a given puzzle is solveable).

The limiting to 4x4 is a giveaway that this is brute force.

In the 4 color case, we have 8 uncolored cells, each which may take one of 4 colors. that leaves 4^8=65k combinations, each which we can trivially validate by BFS

In the 3 color case, we have 10 uncovered celles, each of which may take one of 3 colors. That leaves 3^10=59k.

Brute force is fast enough