102870: [AtCoder]ABC287 A - Majority

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:2 Solved:0

Description

Score : $100$ points

Problem Statement

There are $N$ people. Each of them agrees or disagrees with a proposal. Here, $N$ is an odd number.

The $i$-th $(i = 1, 2, \dots, N)$ person's opinion is represented by a string $S_i$: the person agrees if $S_i = $ For and disagrees if $S_i = $ Against.

Determine whether the majority agrees with the proposal.

Constraints

  • $N$ is an odd number between $1$ and $99$, inclusive.
  • $S_i = $ For or $S_i = $ Against, for all $i = 1, 2, \dots, N$.

Input

The input is given from Standard Input in the following format:

$N$
$S_1$
$S_2$
$\vdots$
$S_N$

Output

Print Yes if the majority of the $N$ people agree with the proposal; print No otherwise.


Sample Input 1

3
For
Against
For

Sample Output 1

Yes

The proposal is supported by two people, which is the majority, so Yes should be printed.


Sample Input 2

5
Against
Against
For
Against
For

Sample Output 2

No

The proposal is supported by two people, which is not the majority, so No should be printed.


Sample Input 3

1
For

Sample Output 3

Yes

Input

题意翻译

输入 $N$ 个字符串(`Against`或`For`),其中 $N$ 为奇数。 当`Against`的个数大于`For`的个数时,输出`No`,否则输出`Yes`。

Output

分数:100分

问题描述

有$N$个人。他们每个人要么同意,要么反对一项提案。其中,$N$是一个奇数。

第$i$个($i = 1, 2, \dots, N$)人的意见用字符串$S_i$表示:如果$S_i = $ For,则表示同意;如果$S_i = $ Against,则表示反对。

确定大多数人是否同意这项提案。

限制条件

  • $N$是一个在$1$到$99$之间的奇数
  • 对于所有$i = 1, 2, \dots, N$,$S_i = $ For 或 $S_i = $ Against

输入

输入以标准输入的以下格式给出:

$N$
$S_1$
$S_2$
$\vdots$
$S_N$

输出

如果$N$个人中的大多数同意提案,打印Yes;否则打印No


样例输入1

3
For
Against
For

样例输出1

Yes

提案得到了两个人的支持,这是大多数,所以应该打印Yes


样例输入2

5
Against
Against
For
Against
For

样例输出2

No

提案得到了两个人的支持,这不是大多数,所以应该打印No


样例输入3

1
For

样例输出3

Yes

加入题单

算法标签: