lai代码世界吃火锅~
#include<iostream>
#include<string>
using namespace std;
int main()
{
string str[1000];
string s = "chi1 huo3 guo1";
string::size_type idx;
int i,n=0,t;
for (i = 0;; i++)
{
getline(cin, str[i]);
if (str[i] == ".")
break;
}
t= i;
cout << t<<endl;
for (i = 0; i < t; i++)
{
idx=str[i].find(s);
if (idx != string::npos)
if (n == 0)
{
cout << i + 1 << ' '; n++;
}
else
n++;
}
if (n != 0)
cout << n;
else
cout << "-_-#";
}