#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main()
{
string read, tmp;
int flag = 0;
while (cin >> read)
{
if (read == tmp)
{
flag = 1;
break;
}
else tmp = read;
}
if (flag)
cout << read << " occurs twice in succession" << endl;
else cout << "no word was repeated" << endl;
return 0;
}
5.20
最新推荐文章于 2025-05-21 10:52:48 发布
