/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 34ms 17.371 MiB
#2 Accepted 59ms 20.785 MiB
#3 Accepted 58ms 18.988 MiB
#4 Accepted 43ms 18.242 MiB
#5 Accepted 42ms 18.246 MiB
#6 Accepted 41ms 18.289 MiB
#7 Accepted 39ms 17.996 MiB
#8 Accepted 42ms 18.09 MiB

Code

t = "SeriousOJ"

for _ in range(int(input())):
	n = int(input())
	j = 0
	s = input()
	for i in range(n):
		if j == len(t):
			break
		if s[i] == t[j]:
			j += 1
	print("YES" if j == len(t) else "NO")

Information

Submit By
Type
Submission
Problem
P1147 SeriousOJ Challenge
Language
PyPy 3 (Python 3.9.18 PyPy 7.3.15)
Submit At
2025-01-02 06:55:19
Judged At
2025-01-02 06:55:19
Judged By
Score
100
Total Time
59ms
Peak Memory
20.785 MiB