by aabbccdd
Last Updated October 12, 2018 14:20 PM

We have a **2xN matrix with all '0's** and we have **K no. of 1's**.

Now we need to count all the possible unique no of matrix so that we have used all of the '1's by changing the entry of matrix from 0 to 1 such that **no two '1's are adjacent** (diagonally opposite allowed)

eg.

N=3 : K=2

no of ways:8

[101][000]

[100][010]

[100][001]

[010][100]

[010][001]

[001][100]

[001][010]

[000][101]

Conflicts with an ongoing contest - https://www.codechef.com/OCT18B/problems/BBRICKS

- ServerfaultXchanger
- SuperuserXchanger
- UbuntuXchanger
- WebappsXchanger
- WebmastersXchanger
- ProgrammersXchanger
- DbaXchanger
- DrupalXchanger
- WordpressXchanger
- MagentoXchanger
- JoomlaXchanger
- AndroidXchanger
- AppleXchanger
- GameXchanger
- GamingXchanger
- BlenderXchanger
- UxXchanger
- CookingXchanger
- PhotoXchanger
- StatsXchanger
- MathXchanger
- DiyXchanger
- GisXchanger
- TexXchanger
- MetaXchanger
- ElectronicsXchanger
- StackoverflowXchanger
- BitcoinXchanger
- EthereumXcanger