LA 3527

LA 3527 - Find the Clones

 * [Problem Link]

Summary
You are given a set of DNA sequences. The task is to find duplicates and make some statistics about them.

Explanation
The optimal solution is to build a trie containing all DNA sequences from the input. However, hashing or efficient sorting of the strings will work, too.

Input
9 6 AAAAAA ACACAC GTTTTG ACACAC GTTTTG ACACAC ACACAC TCCCCC TCCCCC

Output
1 2 0 1 0 0 0 0 0