Problem G
Unique Dice
You are about to leave home for your weekly game of Pumpkins and Flagons (P&F) when a text comes in asking you to bring a large collection of identical P&F dice. They have asked the right person, for you have a very large collection of P&F dice which, unfortunately, is currently unsorted.
These dice are ordinary cubes with a number on each of the
six faces. The numbers are in the range 1–6, but they do not
need to be distinct. For example,
Input
The first line contains an integer
Output
Print a single integer giving the size of the largest set of identical dice that can be made from given collection.
Sample Input 1 | Sample Output 1 |
---|---|
2 1 6 2 5 4 3 1 6 3 4 2 5 |
2 |
Sample Input 2 | Sample Output 2 |
---|---|
2 1 6 2 5 3 4 1 6 3 4 2 5 |
1 |
Sample Input 3 | Sample Output 3 |
---|---|
5 1 1 2 2 2 2 1 2 1 2 2 2 1 2 2 1 2 2 1 2 2 2 1 2 1 2 2 2 2 1 |
4 |