문제
Problem 2: First! [Mark Gordon, 2012]
Bessie has been playing with strings again. She found that by changing the order of the alphabet she could make some strings come before all the others lexicographically (dictionary ordering).
For instance Bessie found that for the strings
Help Bessie by computing which strings in the input could be lexicographically first by rearranging the order of the alphabet. To compute if string X is lexicographically before string Y find the index of the first character in which they differ, j. If no such index exists then X is lexicographically before Y if X is shorter than Y. Otherwise X is lexicographically before Y if
PROBLEM NAME: first
입력
* Line 1: A single line containing N
* Lines
출력
* Line 1: A single line containing K, the number of strings that could be lexicographically first.
* Lines
예제1
4
omm
moo
mom
ommnom
2
omm
mom
INPUT DETAILS:
The example from the problem statement.
OUTPUT DETAILS:
Only "