| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56854 | 董承诺 | 排队买票 | C++ | Accepted | 100 | 0 MS | 248 KB | 216 | 2022-08-03 15:22:38 |
#include<bits/stdc++.h> using namespace std; int a,c; char b[35]; int main(){ cin>>a; for(int i=1;i<=a;i++){ cin>>b[i]; } for(int i=1;i<=a;i++){ if(b[i]!=b[i+1]) c++; } cout<<c+1; return 0; }