十五届蓝桥杯c组
#include <iostream>
using namespace std;
typedef long long LL;
const int N = 2005;
int n = 2000;//文档里面给的数据有2000行
char a[N], b[N];
LL c[N];
int f[N], ans;
int main()
{
// 请在此输入您的代码
for (int i = 1; i <= n; i ++ )
{
cin >> a[i] >> b[i] >> c[i];
if (a[i] != b[i]) f[i] = 0;
else
{
if (c[i] - c[i-1] <= 1000) f[i] = f[i-1] + 1;//c[i] - c[i-1] <= 1000新的击打与前一个的时间差小于1s
else f[i] = 1;//新的开始
}
ans = max(ans, f[i]);//最大的连击
}
cout << ans << endl;
// cout << 9 << endl;
return 0;
}