ZOJ Problem Set - 2131
Input contains multiple test cases. Each test case has 8 lines, each line consists of 8 capital letters. Different letters specify different sorts of gems. Every test case will be followed by a blank line.
There is one line for each test case, which is the maximum number of gems one swapping can make disappear at most.
AABBAABB AABBAABB BBAABBAA BBAABBAA AABBAABB AABBAABB BBAABBAA BBAABBAA AABBAABB BBAABBAA AABBAABB BBAABBAA AABBAABB BBAABBAA AABBAABB BBAABBAA
Each spirit has a own psychic world. The world we share is just a rule. Substance and soul are the same thing essentially.
Author: CHEN, Shixi
Source: Online Contest of Fantastic Game