1119_给点颜色我看看

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

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

Pro.ID

1119

Title

给点颜色我看看

Title链接

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

AC

343

Submit

630

Ratio

54.44%

时间&空间限制

  • Time Limit: 600/200 MS (Java/Others)     Memory Limit: 65536/5000 K (Java/Others)
  • 描述

    建立一个指针数组,存储n种颜色的单词,然后把它们按字典序排序后输出。

    Create an array of pointer to store n words corresponding to n colors, then output them after being sorted in lexicographical. (酱紫翻译准不准确?)

    输入

    第一行是单词的个数n ( 0 < n ≤ 100 ),然后是n种颜色的英文单词,一个单词一行。

    每个单词不超过100个字符,且中间不含空格。

    输出

    Description

    建立一个指针数组,存储n种颜色的单词,然后把它们按字典序排序后输出。

    Create an array of pointer to store n words corresponding to n colors, then output them after being sorted in lexicographical. (酱紫翻译准不准确?)

    Input

    第一行是单词的个数n ( 0 < n ≤ 100 ),然后是n种颜色的英文单词,一个单词一行。

    每个单词不超过100个字符,且中间不含空格。

    Output

    对这10个单词排序后输出,一个单词一行。

    Sample Input

    5
    red
    blue
    yellow
    green
    purple

    Sample Output

    blue
    green
    purple
    red
    yellow

    Hint

    本题用于练习“指针数组”。

    Author

    样例输入

    5
    red
    blue
    yellow
    green
    purple

    样例输出

    blue
    green
    purple
    red
    yellow

    提示

    本题用于练习“指针数组”。

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部