Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 100 点
問題文
高橋君はある会社の採用面接を受けました。
面接官の人数 N と、各面接官の高橋君への評価を表す長さ N の文字列 S が与えられます。
i=1,2,\ldots,N に対し S の i 文字目が i 番目の面接官の評価に対応し、o
は「良」、-
は「可」、x
は 「不可」を表します。
高橋君は以下の 2 つの条件を両方満たすならば合格、そうでなければ不合格です。
- 「良」と評価した面接官が少なくとも 1 人いる
- 「不可」と評価した面接官がいない
高橋君が合格かどうかを判定してください。
制約
- 1 \leq N \leq 100
- S は
o
,-
,x
のみからなる長さが N の文字列
入力
入力は以下の形式で標準入力から与えられる。
N S
出力
高橋君が合格ならば Yes
と、そうでなければ No
と出力せよ。
入力例 1
4 oo--
出力例 1
Yes
1, 2 番目の面接官が「良」と評価していて、さらに「不可」と評価した面接官がいないため合格です。
入力例 2
3 ---
出力例 2
No
「良」と評価した面接官が 1 人もいないため不合格です。
入力例 3
1 o
出力例 3
Yes
入力例 4
100 ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooox
出力例 4
No
100 番目の面接官が「不可」と評価しているため不合格です。
Score : 100 points
Problem Statement
Takahashi had a job interview.
You are given the number of interviewers, N, and a string S of length N representing the interviewers' evaluations of him.
For each i=1,2,\ldots,N, the i-th character of S corresponds to the i-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
- 1 \leq N \leq 100
- S is a string of length N consisting of
o
,-
, andx
.
Input
The input is given from Standard Input in the following format:
N S
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 100-th interviewer's evaluation is Poor, so he fails.