/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 16ms 2.945 MiB
#2 Accepted 15ms 3.062 MiB
#3 Accepted 15ms 3.066 MiB
#4 Accepted 15ms 3.137 MiB
#5 Accepted 16ms 3.098 MiB
#6 Accepted 15ms 2.992 MiB
#7 Accepted 15ms 2.945 MiB

Code

T = int(input())
report = []
for _ in range(T):
    S = input()
    N = input()
    count = 0

    for i in N:
        if i in S:
            count += 1
            S = S[S.index(i)+1:]
        else:
            break

    if len(N) == count:
        report.append("YES")
    else:
        report.append("NO")

[print(i) for i in report]

Information

Submit By
Type
Submission
Problem
P1020 Favourite footballer
Contest
Brain booster - 1
Language
Python 3 (Python 3.12.3)
Submit At
2023-12-31 14:25:18
Judged At
2024-10-03 14:06:10
Judged By
Score
100
Total Time
16ms
Peak Memory
3.137 MiB