[GESP202503 三级] 词频统计

Luogu
IDLGB4262
Time1000ms
Memory512MB
DifficultyP2
字符串2025GESP
在文本处理中,统计单词出现的频率是一个常见的任务。现在,给定 $n$ 个单词,你需要找出其中出现次数最多的单词。在本题中,忽略单词中字母的大小写(即 `Apple`、`apple`、`APPLE`、`aPPle` 等均视为同一个单词)。 请你编写一个程序,输入 $n$ 个单词,输出其中出现次数最多的单词。 ## Input 第一行,一个整数 $n$,表示单词的个数; 接下来 $n$ 行,每行包含一个单词,单词由大小写英文字母组成。 输入保证,出现次数最多的单词只会有一个。 ## Output 输出一行,包含出现次数最多的单词(输出单词为小写形式)。 [samples] ## Background 对应的选择、判断题:<https://ti.luogu.com.cn/problemset/1175> ## Note 对于所有测试点,$1\leq n\leq 100$,每个单词的长度不超过 $30$,且仅由大小写字母组成。
Samples
Input #1
6
Apple
banana
apple
Orange
banana
apple
Output #1
apple
API Response (JSON)
{
  "problem": {
    "name": "[GESP202503 三级] 词频统计",
    "description": {
      "content": "在文本处理中,统计单词出现的频率是一个常见的任务。现在,给定 $n$ 个单词,你需要找出其中出现次数最多的单词。在本题中,忽略单词中字母的大小写(即 `Apple`、`apple`、`APPLE`、`aPPle` 等均视为同一个单词)。 请你编写一个程序,输入 $n$ 个单词,输出其中出现次数最多的单词。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P2"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB4262"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "在文本处理中,统计单词出现的频率是一个常见的任务。现在,给定 $n$ 个单词,你需要找出其中出现次数最多的单词。在本题中,忽略单词中字母的大小写(即 `Apple`、`apple`、`APPLE`、`aPPle` 等均视为同一个单词)。\n\n请你编写一个程序,输入 $n$ 个单词,输出其中出现次数最多的单词。\n\n## Input\n\n第一行,一个整数 $n$,表示单词的个数;\n\n接下来 $n$ 行,每...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments