시간 제한
메모리 제한
When writing articles, there is usually an abstract section which summarizes the entire article. We are experimenting with an automatic abstract generation algorithm. The algorithm reads in an article and prepares an abstract that summarizes the entire article. The abstract is formed by combining the “topic sentences” extracted from consecutive paragraphs.
For the purposes of this problem,
The term maximal in the definitions above is intended to convey the idea that we are only interested in the longest sequences that match the definition, not in any of their subsequences. For example, the sentence “How now, brown cow?” contains four words. “now” is a word in this sentence, but “no”, “ow”, etc., are not words because they are not maximal – they are subsequences of a larger sequence of alphabetic characters.
A topic sentence for a paragraph is the single sentence in the paragraph that best describes the paragraph’s content. For our purposes, we will select the earliest sentence in the paragraph that maximizes the number of distinct words in S that also occur in any following sentence within the same paragraph.
Paragraphs with fewer than three sentences are ignored and will not contribute to the abstract.
When comparing words for distinctness, changes in upper/lower case are ignored. For example, the sentence “See what I see.” contains three distinct words, not four.
Input will consist of one or more articles. Each article is terminated by a line containing only “***” or “******”. The latter string (“******”) indicates the end of the entire input set.
For each document, print the abstract followed by a line containing “======” (six equal signs).
Each abstract will be formed from the sequence of topic sentences, selected as described above, in the order that they occur in the input document. Each sentence shall be printed exactly as it appears in the input and should be followed by a line break.