#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
string t;
vector<string>s;
int i = 0;
int swt = 0;
int num = 0;
while (cin >> t)
{
++num;
s.push_back(t);
int size = s.size();
for (int a=0; a!=size-1; a++)
{
if (s[a] == t)
{
swt = 1;
break;
}
}
if (swt)
break;
if (num == 4)
break;
}
if (swt)
cout << "again word="<<t << endl;
else
cout << "no happen" << endl;
return 0;
}
cpp primer 5.20
最新推荐文章于 2024-04-22 16:46:46 发布