Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Codeforces Round 344A
- #include <iostream>
- using namespace std;
- int main()
- {
- int n, nn[100001], answ=1;
- cin >> n;
- for(int i=0;i<n;i++)
- {
- cin >> nn[i];
- if(i!=0)
- {
- if(nn[i]!=nn[i-1])
- {
- answ++;
- }
- }
- }
- cout << answ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement