Http://uva.onlinejudge.org/external/2/211.html
Http://uva.onlinejudge.org/external/2/211.pdf
Test Instructions : each domino (Bone) corresponds to two balls (PIP).
The value of the ball from 0-6. Dominoes since 1-28.
Then give you a matrix (7*8) that includes the value of the ball. Ask you what kind of dominoes will form this matrix of balls.
Attention. The topic has a message that is not clear, that is, each domino can only take one, and to take all the 28 kinds of dominoes. 7*8/28 = 2.
idea : For each domino. First, look for the ball pair that can form the domino from the Matrix.
Some dominoes can be formed in many ways,
Some dominoes may only have a way of forming, so consider a domino that is less formed. Sort.
After. Enumerate the ways in which each domino is formed by violence. If there is a conflict, pass.
Uva-211-the Domino Effect