logo AlgoBeat OnlineJudge
登录 注册

#215345. [SWERC 2019] Biodiversity

内存限制:2048 MiB 时间限制:3000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Alicia has a huge garden which is the habitat of many animals that she really cares about. After listening to a podcast about biodiversity, she becomes very concerned about the balance between species in her garden. She wants to know if there is a species that could overtake the others. In order to do so, she decides to carry out a census of all animals in the garden, writing down the species of each of them. Can you help her checking if there is strictly more animals from one species than the animals from all others species together?

输入格式

The input consists of the following lines:

  • on the first line: an integer ;
  • on each of the next lines: the species of an animal as a string of length at most 20, containing only ASCII alphanumeric characters.

输出格式

A string that appears a number of times that is greater than the sum of the others, if there is any, or the string "NONE" otherwise.

样例

样例输入 1

3
frog
fish
frog

样例输出 1

frog

样例输入 2

4
cat
mouse
mouse
cat

样例输出 2

NONE

数据范围与提示

Limits

  • .