Runtime Error
Code
#include <string.h>
int main() {
int t;
scanf("%d",&t);
while (t--) {
char s[1001],n[1001];
scanf("%s %s",s,n);
int s_len=strlen(s);
int n_len=strlen(n);
int i=0,j=0;
while (i<s_len && j<n_len){
if(s[i]==n[j]){
j++;
}
i++;
}
if (j==n_len) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1020 Favourite footballer
- Contest
- Brain booster - 1
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2023-12-31 17:02:18
- Judged At
- 2024-11-11 03:44:52
- Judged By
- Score
- 60
- Total Time
- 1ms
- Peak Memory
- 428.0 KiB