Accepted
Code
#include <stdio.h>
#include <string.h>
#define TARGET "SeriousOJ"
int main() {
int T;
scanf("%d", &T);
while (T--) {
int N;
scanf("%d", &N);
char S[N+1];
scanf("%s", S);
int i = 0, j = 0;
while (S[i] != '\0' && TARGET[j] != '\0') {
if (S[i] == TARGET[j]) {
j++;
}
i++;
}
if (TARGET[j] == '\0') {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1147 SeriousOJ Challenge
- Contest
- LU IUJPC : Sylhet Division 2024 Replay Contest
- Language
- C11 (GCC 13.2.0)
- Submit At
- 2024-12-10 09:59:52
- Judged At
- 2024-12-10 09:59:52
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 516.0 KiB