21405_CompoundWords

2022-5-16 18:19| 发布者: Hocassian| 查看: 37| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505237200800-Problem List-采集的数据-后羿采集器.html

Pro.ID

21405

Title

Compound Words

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21405

AC

58

Submit

158

Ratio

36.71%

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    You are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.

    输入

    Standard input consists of a number of lowercase words, one per line, in alphabetical order. There will be no more than 120,000 words.

    输出

    Description

    You are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.

    Input

    Standard input consists of a number of lowercase words, one per line, in alphabetical order. There will be no more than 120,000 words.

    Output

    Your output should contain all the compound words, one per line, in alphabetical order.

    Sample Input

    a
    alien
    born
    less
    lien
    never
    nevertheless
    new
    newborn
    the
    zebra

    Sample Output

    alien
    newborn

    Source

    样例输入

    a
    alien
    born
    less
    lien
    never
    nevertheless
    new
    newborn
    the
    zebra

    样例输出

    alien
    newborn

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部