#abc287a. A - Majority
A - Majority
Score : points
问题描述
有 名人员。他们每个人对一项提议表示同意或不同意。这里, 是一个奇数。
第 ()个人的观点通过字符串 表示:如果 For
,则表示此人同意;如果 Against
,则表示此人不同意。
确定大多数人是否同意该提议。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
There are people. Each of them agrees or disagrees with a proposal. Here, is an odd number.
The -th person's opinion is represented by a string : the person agrees if For
and disagrees if Against
.
Determine whether the majority agrees with the proposal.
Constraints
- is an odd number between and , inclusive.
-
For
orAgainst
, for all .
Input
The input is given from Standard Input in the following format:
Output
Print Yes
if the majority of the 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
update @ 2024/3/10 11:59:13