CRB and String

TimeLimit: 2000/1000 MS (Java/Others)  MemoryLimit: 65536/65536 K (Java/Others)
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description
CRB has two strings s and t.
In each step, CRB can select arbitrary character c of s and insert any character d (d ≠ c) just after it.
CRB wants to convert s to t. But is it possible?
Input
There are multiple test cases. The first line of input contains an integer T, indicating the number of test cases. For each test case there are two strings s and t, one per line.
1 ≤ T ≤ 10^5
1 ≤ |s| ≤ |t| ≤ 10^5
All strings consist only of lowercase English letters.
The size of each input file will be less than 5MB.
Output
For each test case, output "Yes" if CRB can convert s to t, otherwise output "No".
SampleInput
4
a
b
cat
cats
do
do
apple
aapple
SampleOutput
No
Yes
Yes
No
Submit
题目统计信息详细
总AC数18
通过人数16
尝试人数22
总提交量72
AC率22.22%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: