/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 16ms 3.07 MiB
#2 Accepted 16ms 3.066 MiB
#3 Accepted 16ms 3.133 MiB
#4 Accepted 15ms 3.035 MiB
#5 Accepted 16ms 3.031 MiB
#6 Accepted 16ms 3.117 MiB
#7 Accepted 16ms 2.969 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-11-11 03:46:18
Judged By
Score
100
Total Time
16ms
Peak Memory
3.133 MiB