Topic: http: //codeforces.com/contest/237/problem/A
#include <iostream> using namespace std; int main() { int ans=1; int n; cin>>n; int ap,bp; int a,b; cin>>a>>b; ap=a; bp=b; int counter=1; for(int i=0;i<n-1;i++) { cin>>a>>b; if((a==ap)&&(b==bp)) { counter++; ans=max(ans,counter); } else counter=1; ap=a; bp=b; } cout << ans; return 0; }
Reproduced in: https: //www.cnblogs.com/danielqiu/archive/2013/01/20/2868490.html