United in Stormwind
题号:NC223864
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 1024 M,其他语言2048 M
64bit IO Format: %lld

题目描述

The adventurers gather together in the majestic capital city, Stormwind, for a referendum about the future of their alliance. The referendum contains questions, and each question has two options, and .

After collecting the results of the referendum, the alliance received survey results. When sorting out the results, Alice comes up with a special idea. She thinks that a nonempty subset of questions is if there are at least pairs of results different in at least one of the questions in the set.

She wants to know the number of different discriminative subsets of questions. Can you help Alice solve this problem?

输入描述:

The first line contains three integers  , as specified in the problem statement.

Each of the following lines contains a string of length , which contains only and , indicating the answer to each question in the referendum results.

输出描述:

Output a single integer that represents the number of different discriminative subsets of questions.
示例1

输入

复制
2 2 1
AA
BB

输出

复制
3
示例2

输入

复制
2 2 1
AA
AB

输出

复制
2