P3087 [USACO13NOV] Farmer John has no Large Brown Cow S
题目描述
Farmer John likes to collect as many different types of cows as possible. In fact, he has collected almost every conceivable type of cow, except for a few, written on a short list of N lines (1
输入格式
\* Line 1: Two integers, N and K.
\* Lines 2..1+N: Each line is a sentence like "Farmer John has no large spotted noisy cow.". Each adjective in the sentence will be a string of at most 10 lowercase letters. You know you have reached the end of the sentence when you see the string "cow." ending with a period.
输出格式
\* Line 1: The description of the Kth cow on the farm.
说明/提示
The input matches the sample given in the problem statement above. Farmer John would like to know the 7th cow on his farm, when listed in alphabetical order.
Farmer john has cows matching the following descriptions, listed in alphabetical order:
large brown silent
large spotted silent
large white noisy
large white silent
small brown noisy
small brown silent
small spotted noisy
small spotted silent
small white noisy
The 7th cow in this list is described as "small spotted noisy".