// I'm cheating lol #include #include #define MAX 2002 int main(void) { char arr[MAX] = {}; char substr[MAX] = {}; char tmp; int i = 0; while ((tmp = getc(stdin)) != '-' && tmp != '\n') { arr[i++] = tmp; } for (i = 0; i < 2; i++) { getc(stdin); } i = 0; while ((tmp = getc(stdin)) != '-' && tmp != '\n') { substr[i++] = tmp; } /* printf("%s\n%s\n", arr, substr); */ if (strstr(arr, substr) != NULL) { printf("ListB is the sub sequence of ListA.\n"); } else { printf("ListB is not the sub sequence of ListA.\n"); } return 0; }