#K51562. Maximum Unique Word Count in a Contest
Maximum Unique Word Count in a Contest
Maximum Unique Word Count in a Contest
In this problem, you are given a contest scenario where participants shout words during each minute of the contest. The contest lasts for ( n ) minutes, and the valid words can be constructed using exactly ( m ) distinct lowercase letters, with a maximum word length of ( k ). The maximum number of unique valid words that can be generated is defined as ( m^k ). Although the number of words shouted in each minute is provided (shout_counts), this parameter does not affect the result. Your task is to compute ( m^k ) and output it.
inputFormat
The input is read from standard input (stdin) and consists of three parts:\
- The first line contains three integers ( n ), ( m ), and ( k ), where ( n ) is the duration (in minutes) of the contest, ( m ) is the number of distinct lowercase characters, and ( k ) is the maximum length of a valid word.\
- The second line contains a string of length ( m ) representing the unique lowercase characters.\
- The third line contains ( n ) space-separated integers representing the shout counts for each minute (these values are provided but not used in the computation).
outputFormat
Output a single integer which is the maximum number of unique valid words that can be generated, calculated as ( m^k ). The output should be written to standard output (stdout).## sample
5 3 4
abc
3 2 4 1 3
81
</p>