
https://www.luogu.com.cn/fe/api/problem/downloadAttachment/jhqdki17
cpp
#include<iostream>
#include<vector>
using namespace std;
int main() {
char S, A;
unsigned long long T;
vector<char> s;
vector<char> a;
vector<unsigned long long> t;
while (cin >> S >> A >> T) {
s.push_back(S);
a.push_back(A);
t.push_back(T);
}
int maxc = 0;
int sum = 1;
for (int i = 1; i < s.size(); i++) {
if (s[i] == a[i] && (t[i] - t[i - 1]) <= 1000) {
sum++;
}
else {
if (sum > maxc)maxc = sum;
sum = 1;
}
}
if (sum > maxc)maxc = sum;
cout << maxc << endl;
return 0;
}


