Problem

Source: Baltic Way 1997

Tags: combinatorics proposed, combinatorics



Twelve cards lie in a row. The cards are of three kinds: with both sides white, both sides black, or with a white and a black side. Initially, nine of the twelve cards have a black side up. The cards $1-6$ are turned, and subsequently four of the twelve cards have a black side up. Now cards $4-9$ are turned, and six cards have a black side up. Finally, the cards $1-3$ and $10-12$ are turned, after which five cards have a black side up. How many cards of each kind were there?