1 #include <iostream>
2 using namespace std;
3 int main()
4 {
5 ios::sync_with_stdio(
false);
6 cin.tie(
0);
7
8 int n;
9 cin >>
n;
10 int pre;
11 cin >>
pre;
12 int ans =
1;
13 for (
int i =
1; i < n; i++
) {
14 int x;
15 cin >>
x;
16 if (x !=
pre) {
17 ans++
;
18 pre =
x;
19 }
20 }
21 cout << ans <<
endl;
22 return 0;
23 }
转载于:https://www.cnblogs.com/AntonLiu/p/11165508.html
相关资源:各显卡算力对照表!
转载请注明原文地址: https://win8.8miu.com/read-20135.html