102980: [Atcoder]ABC298 A - Job Interview

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

Description

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, -, and x.

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.

Input

题意翻译

给定一个长度为 $N$,且仅由 `o`,`-`,`x` 组成的字符串,请你判断是否满足以下条件: - 存在至少一个 `o`; - 不存在 `x`。 如果同时满足两个条件,输出 `Yes`,否则输出 `No`。

Output

分数:100分

问题描述

高桥参加了面试。

给你面试官的数量 $N$,以及一个长度为 $N$ 的字符串 $S$,表示面试官对他的评价。

对于每个 $i=1,2,\ldots,N$,字符串 $S$ 的第 $i$ 个字符对应第 $i$ 个面试官的评价;o 表示好,- 表示一般,x 表示差。

如果满足以下两个条件,高桥就能通过面试,否则就会失败。

  • 至少有一个面试官的评价是好。
  • 没有面试官的评价是差。

确定高桥是否能通过面试。

约束

  • $1 \leq N \leq 100$
  • $S$ 是一个长度为 $N$ 的字符串,由 o-x 组成。

输入

输入数据通过标准输入给出,格式如下:

$N$
$S$

输出

如果高桥能通过面试,打印 Yes;否则,打印 No


样例输入 1

4
oo--

样例输出 1

Yes

第一位和第二位面试官的评价是好,没有面试官的评价是差,所以他能通过面试。


样例输入 2

3
---

样例输出 2

No

没有面试官的评价是好,所以他不能通过面试。


样例输入 3

1
o

样例输出 3

Yes

样例输入 4

100
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooox

样例输出 4

No

第 $100$ 位面试官的评价是差,所以他不能通过面试。

HINT

n个人评价,至少要有一个o,且不能有x才算通过,是否通过?

加入题单

算法标签: