#abc298a. A - Job Interview
A - Job Interview
Score : points
问题描述
Takahashi 参加了一次面试。
已知面试官的人数 ,以及一个长度为 的字符串 ,表示面试官对他的评价。对于每个 , 中的第 个字符代表第 位面试官的评价;其中 o
表示好,-
表示一般,x
表示差。
Takahashi 通过面试的条件是同时满足以下两个条件,否则将失败:
- 至少有一位面试官给出的好评(Good)。
- 没有任何一位面试官给出差评(Poor)。
请确定 Takahashi 是否通过了面试。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
Takahashi had a job interview.
You are given the number of interviewers, , and a string of length representing the interviewers' evaluations of him.
For each , the -th character of corresponds to the -th interviewer's evaluation; o
means Good, -
means Fair, and x
means Poor.
Takahashi will pass if both of the following conditions are satisfied, and fail otherwise.
- At least one interviewer's evaluation is Good.
- No interviewer's evaluation is Poor.
Determine whether Takahashi passes.
Constraints
- is a string of length consisting of
o
,-
, andx
.
Input
The input is given from Standard Input in the following format:
Output
If Takahashi passes, print Yes
; otherwise, print No
.
Sample Input 1
4
oo--
Sample Output 1
Yes
The first and second interviewers' evaluations are Good, and no interviewer's evaluation is Poor, so he passes.
Sample Input 2
3
---
Sample Output 2
No
No interviewer's evaluation is Good, so he fails.
Sample Input 3
1
o
Sample Output 3
Yes
Sample Input 4
100
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooox
Sample Output 4
No
The -th interviewer's evaluation is Poor, so he fails.
update @ 2024/3/10 12:21:25