#abc381a. A - 11/22 String
A - 11/22 String
当前没有测试数据。
Score : points
问题陈述
这个问题中11/22字符串的定义与问题C和E中的定义相同。
如果一个字符串满足以下所有条件,则称其为11/22字符串:
- 是奇数。这里,表示的长度。
- 第1个到第个字符都是
1
。 - 第个字符是
/
。 - 第个到第个字符都是
2
。
例如,11/22
、111/222
和/
是11/22字符串,但1122
、1/22
、11/2222
、22/11
和//2/2/211
不是。
给定一个由1
、2
和/
组成的长度为的字符串,确定是否是一个11/22字符串。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
The definition of an 11/22 string in this problem is the same as in Problems C and E.
A string is called an 11/22 string when it satisfies all of the following conditions:
- is odd. Here, denotes the length of .
- The -st through -th characters are all
1
. - The -th character is
/
. - The -th through -th characters are all
2
.
For example, 11/22
, 111/222
, and /
are 11/22 strings, but 1122
, 1/22
, 11/2222
, 22/11
, and //2/2/211
are not.
Given a string of length consisting of 1
, 2
, and /
, determine whether is an 11/22 string.
Constraints
- is a string of length consisting of
1
,2
, and/
.
Input
The input is given from Standard Input in the following format:
Output
If is an 11/22 string, print Yes
; otherwise, print No
.
Sample Input 1
5
11/22
Sample Output 1
Yes
11/22
satisfies the conditions for an 11/22 string in the problem statement.
Sample Input 2
1
/
Sample Output 2
Yes
/
satisfies the conditions for an 11/22 string.
Sample Input 3
4
1/22
Sample Output 3
No
1/22
does not satisfy the conditions for an 11/22 string.
Sample Input 4
5
22/11
Sample Output 4
No