XIN GE和他的女神(5)

TimeLimit:1000MS  MemoryLimit:30MB
64-bit integer IO format:%lld
未提交 | 登录后收藏 | 已有4人收藏了本题
Problem Description
女神花花和XIN GE有个约定,只要今天有(XUE)人(ZHANG)能AK就答应和XIN GE交往,那么最后一题压(YING)轴(YU)题来了:

You have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will not discuss in detail how the strings are generated and inserted into the original message. To validate your method, however, it is necessary to write a program that checks if the message is really encoded in the final string.

Given two strings s and t, you have to decide whether s is a subsequence of t, i.e. if you can remove characters from t such that the concatenation of the remaining characters is s.
Input
The input contains several testcases. Each is specified by two strings s, t of alphanumeric ASCII characters separated by whitespace.The length of s and t will no more than 100000.
Output
For each test case output "Yes", if s is a subsequence of t,otherwise output "No".
SampleInput
sequence subsequence
person compression
VERDI vivaVittorioEmanueleReDiItalia
caseDoesMatter CaseDoesMatter
SampleOutput
Yes
No
Yes
No
Submit
题目统计信息详细
总AC数301
通过人数273
尝试人数291
总提交量662
AC率41.24%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

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