Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
6006 | 季洁 | 珠子计算 | C++ | Accepted | 100 | 0 MS | 248 KB | 189 | 2020-08-23 18:41:07 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,sum=0; cin>>n; int b[n]; for(int i=0;i<=n-1;i++){ cin>>b[i]; if(i>=1&&b[i]!=b[i-1]) sum++; } cout<<sum; }