QOJ.ac

QOJ

Límite de tiempo: 1 s Límite de memoria: 512 MB Puntuación total: 100

#3774. Cool Words

Estadísticas

Input a set of words consisting only of lowercase letters. Your task is to count how many words are "cool," meaning that the frequency of each character appearing in the word is unique.

For example, ada is cool because a appears 2 times and d appears 1 time, and 1 and 2 are different. Similarly, banana is also cool because a appears 3 times, n appears 2 times, and b appears 1 time. However, bbacccd is not cool because a and d appear the same number of times (both 1 time).

Input

The input contains no more than 30 test cases. The first line of each test case contains the number of words $n$ ($1 \le n \le 10000$). The following $n$ lines each contain a word with a length of 1 to 30 characters.

Output

For each test case, output the test case number and the number of cool words.

Examples

Input 1

2
ada
bbacccd
2
illness
a

Output 1

Case 1: 1
Case 2: 0

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.