1 Star 0 Fork 0

JJustRight/ACM-ICPC-Algorithms

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Arya has 2 strings, s and t. She has been given a task to uncompress the string s and verify if string t can be constructed. While uncompressing the string s, she can repeat each letter in s any non-zero number of times, i.e for s="aab", possible uncompressed forms can be "aabbb", "aaabb" etc.

Determine if she is able to perform the task.

Input:

The first line contains an integer T, the number of test cases. For each test case, the first line contains the string s and second line contains the string t.

Sample:

2
aaa
aa
aa
aaa

Constraints:

1<=T<= 50, 1<=|s|<=200, 1<=|t|<=1000,

Output:

For each test case, print "Yes" if Arya is able to perform the task, else print "No" in a new line.

Sample

NO
YES
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/jjustright/ACM-ICPC-Algorithms.git
git@gitee.com:jjustright/ACM-ICPC-Algorithms.git
jjustright
ACM-ICPC-Algorithms
ACM-ICPC-Algorithms
master

搜索帮助