摘要:
看了答案之后,我表示我考虑多了,写复杂了,但是还是贴出来吧:the code in c++ primer :#include <iostream>#include<vector>#include<string>using namespace std;int main(){ string preword, currword,repword; int currCnt = 0, maxCnt =1; while (cin >> currword) { if (currword == preword) { ++currCnt; } else { if ( 阅读全文