题解.极致作秀版
2024-09-21 21:17:21
发布于:福建
13阅读
0回复
0点赞
#include <iostream>
#include <vector>
#include <sstream>
using namespace std;
vector<string> readWords() {
string line;
getline(cin, line);
stringstream ss(line);
vector<string> words;
string word;
while (ss >> word) {
words.push_back(word);
}
return words;
}
int main() {
vector<string> studentWords = readWords();
vector<string> correctWords = readWords();
int correctCount = 0;
for (size_t i = 0; i < studentWords.size(); i) {
if (studentWords[i] == correctWords[i]) {
correctCount;
}
}
cout << correctCount << endl;
return 0;
}
全部评论 1
包全网第一的好吧
2024-09-21 来自 福建
0
有帮助,赞一个