/************************************************ * Author :Running_Time * Created Time :2015-8-20 15:29:43 * File Name :I.cpp ************************************************/
booljudge(void) { intlens=strlen (s +1); intlent=strlen (t+1); if (lens>lent || s[1]!=t[1])returnfalse; inti,j; for (j=2; j<=lent; ++j) { if (t[j]!=t[1])break; } for (i=1; i<j; ++i) { if (s[i]!=t[i])returnfalse; } while (i<=lens) { while (j<=lent&& s[i]!=t[j])++j; if (j>lent) returnfalse; i++; j++; } returntrue; }
intmain(void) {//HDOJ 5414 CRB and String intT; scanf ("%d",&T); while (T--) { scanf ("%s%s", s +1,t+1); puts (judge () ?"Yes":"No"); }