F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

CRB and String

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 5387    Accepted Submission(s): 1412


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".
 

Sample Input
4 a b cat cats do do apple aapple
 

Sample Output
No Yes Yes No
 

Author
KUT£¨DPRK£©
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-21 18:22:40, Gzip enabled