首页 > 代码库 > markdown

markdown

```cpp

include

int a[100],ans ; int main() { int n , t = 0 ; while (scanf("%d",&n)!=EOF) { for (int i=1; i<=n; ++i) scanf("%d",a+i); ans = 0 ; for (int i=1; i<=n ; ++i) if (a[i]!=a[i-1]) ++ans ; ans = ans /3 + ( ans % 3>0) ; ++t ; printf("Case %d: %d\n",t,ans) ; } } ```