时间限制:C/C++/Rust/Pascal 3秒,其他语言6秒 空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M 64bit IO Format: %lld
题目描述
Given strings . Now define as the maximum that satisfy , and if such doesn't exist, . The Problem is to calculate:
输入描述:
The first line contains one integer , denoting the number of given strings. The following lines each contains a string . It's guaranteed that and all strings only contain lowercase letters.
输出描述:
Only one line containing one integer, denoting the answer.