Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Darkness
- */
- #include <iostream>
- using namespace std;
- int main ()
- {
- // In;
- int N;
- cin>>N;
- int Arr[N+1];
- for (int i=1; i<=N; i++)
- {
- cin>>Arr[i];
- }
- // Out
- int count=0;
- for (int i=1; i<N; i++)
- {
- if (Arr[i]!=Arr[i+1])
- {
- count++;
- }
- }
- cout<<count;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment