[Atc349C]Airport Code
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Problem Statement
A string of length consisting of uppercase English letters is an airport code for a string of lowercase English letters if and only if can be derived from by one of the following methods:
- Take a subsequence of length from (not necessarily contiguous) and convert it to uppercase letters to form .
- Take a subsequence of length from (not necessarily contiguous), convert it to uppercase letters, and append to the end to form .
Given strings and , determine if is an airport code for .
Constraints
- is a string of lowercase English letters with a length between and , inclusive.
- is a string of uppercase English letters with a length of .
Input
The input is provided in the following format:
S
T
Output
Print Yes if is an airport code for , and No otherwise.
Example
narita
NRT
Yes
The subsequence nrt of narita, when converted to uppercase, forms the string NRT, which is an airport code for narita.
losangeles
LAX
Yes
The subsequence la of losangeles, when converted to uppercase and appended with X, forms the string LAX, which is an airport code for losangeles.
snuke
RNG
No
Programming exercise on 14 August
- 状态
- 已结束
- 规则
- XCPC
- 题目
- 3
- 开始于
- 2024-8-14 16:30
- 结束于
- 2024-8-14 18:30
- 持续时间
- 2 小时
- 主持人
- 参赛人数
- 2