/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 15ms 2.969 MiB
#2 Accepted 14ms 2.926 MiB
#3 Accepted 14ms 3.004 MiB
#4 Accepted 14ms 2.992 MiB
#5 Accepted 14ms 3.121 MiB
#6 Accepted 14ms 3.094 MiB
#7 Accepted 14ms 2.984 MiB

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