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],h,i,maximym;
- int main()
- {
- h=1;
- maximym=-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])h++;
- else{
- if(maximym<h)maximym=h;
- h=1;
- }
- }
- cout << maximym << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement