淘汰回放提交记录
#include <cstdio>
#include <cstring>
char str[10086];
char t[10000000086];
int count;
int first = -1;
int cnt;
int len, len1;
char ch;
int main(){
scanf("%s", str);
len = strlen(str);
scanf("\n");
while (true) {
if (scanf("%c", &ch) == EOF) break;
t[len1++] = ch;
}
for (int i = 0; i < len; ++i) {
if (str[i] >= 'A' && str[i] <= 'Z') str[i] = str[i] - 'A' +'a';
}
for (int i = 0; i < len1; ++i) {
if (t[i] >= 'A' && t[i] <= 'Z') t[i] = t[i] - 'A' +'a';
}
for (int i = 0; i < len1; ++i) {
if (i + len - 1 >= len1) break;
bool flag = true;
for (int j = 0; j < len; ++j) {
if (t[i + j] != str[j]) {
flag= false;
break;
}
}
if (i != 0 && t[i - 1] != ' ') flag = false;
if (i + len < len1 && t[i + len] != ' ') {flag = false;}
if (flag) {
count++;
if (first == -1) {
first = i;
}
}
}
if (count == 0) {
printf("-1\n");
} else {
printf("%d %d\n", count, first);
}
return 0;
}