/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Accepted 0ms 324.0 KiB
#2 Accepted 0ms 324.0 KiB
#3 Accepted 0ms 284.0 KiB
#4 Accepted 0ms 284.0 KiB
#5 Runtime Error 1ms 420.0 KiB
#6 Runtime Error 1ms 320.0 KiB
#7 Accepted 0ms 324.0 KiB

Code

#include <stdio.h>
#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:13:09
Judged At
2024-10-03 14:04:16
Judged By
Score
60
Total Time
1ms
Peak Memory
420.0 KiB