ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1225. Flags

Graph
Posted by zhnzhang61 11 Jan 2024 07:56
n =   1        2         3         4           5
      R        RW       RWR        RWRW        RWRWR
      W        WR       WRW        WRWR        WRWRW
                        RBW        RBWR        RBWRW
                        WBR        WBRW        WBRWR
                                   RWBR        RWBRW
                                   WRBW        WRBWR
                                               RWRBW
                                               WRWBR
                                               RBWBR
                                               WBRBW

Each column can be derived from:
1. the column on its left + R or W
and
2. the column on its left's left + BR or BW