Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- long long a,b,c[100000];
- long long f,i,maxx;
- int main()
- {
- int f=1;
- int maxx=-100;
- while(cin>>a){
- if(a==0)break;
- else b++;
- c[b]=a;
- }
- for(i=1;i<=b-1;i++){
- if(c[i]==c[i+1])
- f++;
- else{
- if(maxx<f)
- maxx=f;
- }
- }
- cout<<maxx<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement