Project Euler #189: Tri-colouring a triangular grid

Sort by

recency

|

10 Discussions

|

  • + 0 comments

    This can be solved by using chromatic polynomials and using deletion contraction algorithm. Memoization is necessary as we count polynomial for the same graph many times. In order it to work I had to represent graph in a very consice way as string is used as a key to cache and must as short as possible. By no means this is an easy task. Should be at least marked as hard.

  • + 0 comments

    It looks like the main issue here is to account of symmetry

  • + 0 comments

    Pls some1 tell me what is modulo 10^9+7 I

  • + 0 comments

    For this, if we're given 3 colors, are we allowed to use any 3! color choices? I.e. if we're given three colors, can we include just one, two of the three, and all three, or does it just need to be all three colors?

  • + 0 comments

    Why do I get wrong answer for some test cases while others are correct?