Toggle navigation
CGOJ
F.A.Qs
ProblemSet
Source/Category
Status
Ranklist
Contest
Login
Language
中文
ئۇيغۇرچە
English
فارسی
ไทย
한국어
Problem C: 子列的判定
Problem C: 子列的判定
[Creator :
]
Time Limit :
1.000
sec
Memory Limit :
128 MiB
Submit
ProblemList
Solved: 8
Submit Num: 9
Statistics
ShowOff!
Description
给定一个字符串
lns="http://www.w3.org/1998/Math/MathML">
p
p
及另一个字符串
lns="http://www.w3.org/1998/Math/MathML">
t
t
,请判断
lns="http://www.w3.org/1998/Math/MathML">
p
p
是否是
lns="http://www.w3.org/1998/Math/MathML">
t
t
的一个子序列。子序列就是字符串中保持顺序但不一定连续的字符序列。
Input
第一行:单个字符串表示
lns="http://www.w3.org/1998/Math/MathML">
p
p
第二行:单个字符串表示
lns="http://www.w3.org/1998/Math/MathML">
t
t
3
0
%
的数据,
lns="http://www.w3.org/1998/Math/MathML">
1
≤
∣
t
∣
≤
100
1
≤
∣
t
∣
≤
1
0
0
lns="http://www.w3.org/1998/Math/MathML">
60
%
6
0
%
的数据,
lns="http://www.w3.org/1998/Math/MathML">
1
≤
∣
t
∣
≤
10000
1
≤
∣
t
∣
≤
1
0
0
0
0
lns="http://www.w3.org/1998/Math/MathML">
100
%
1
0
0
%
的数据,
lns="http://www.w3.org/1998/Math/MathML">
1
≤
∣
p
∣
≤
∣
t
∣
≤
300
,
000
1
≤
∣
p
∣
≤
∣
t
∣
≤
3
0
0
,
0
0
0
保证
lns="http://www.w3.org/1998/Math/MathML">
p
p
与
lns="http://www.w3.org/1998/Math/MathML">
t
t
仅由小写字母构成。
Output
如果
lns="http://www.w3.org/1998/Math/MathML">
p
p
是
lns="http://www.w3.org/1998/Math/MathML">
t
t
的子序列,输出
Yes
否则输出
No
Sample Input
Copy
aaa ababc
Sample Output
Copy
No