Vertical Reading
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Problem Statement
You are given two strings and consisting of lowercase English letters.
Determine if there exists a pair of integers and such that and the following condition is satisfied. Here, denotes the length of the string . Note that must be less than .
- If is split at every characters from the beginning, the concatenation of the -th characters of the substrings of length at least in order equals .
Constraints
- and are strings consisting of lowercase English letters.
Input
The input is given from Standard Input in the following format:
S T
Output
Print Yes if there exists a pair of integers and such that and the condition is satisfied, and No otherwise.
Sample
atcoder toe
Yes
If is split at every two characters, it looks like this:
at
co
de
r
Then, the concatenation of the 2nd characters of the substrings of length at least is toe, which equals . Thus, print Yes.
beginner r
No
is not allowed, and no pair of integers satisfies the condition. Thus, print No.
verticalreading agh
No
Programming exercise on 11 August
- 状态
- 已结束
- 规则
- IOI
- 题目
- 4
- 开始于
- 2024-8-11 16:30
- 结束于
- 2024-8-11 17:30
- 持续时间
- 1 小时
- 主持人
- 参赛人数
- 2