Accepted
Code
for _ in range(int(input())):
s = input()
n = input()
m = len(n)
flag = 1
for i in range(m):
if n[i] in s:
s = s[s.index(n[i])+1:]
continue
else:
flag = 0
if flag == 0:
print("NO")
else:
print("YES")
Information
- Submit By
- Type
- Submission
- Problem
- P1020 Favourite footballer
- Language
- Python 3 (Python 3.12.3)
- Submit At
- 2023-12-31 20:45:53
- Judged At
- 2024-11-11 03:44:47
- Judged By
- Score
- 100
- Total Time
- 15ms
- Peak Memory
- 3.121 MiB