| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56804 | 张弛 | 排队买票 | C++ | Accepted | 100 | 0 MS | 256 KB | 188 | 2022-08-03 14:52:22 |
#include<bits/stdc++.h> using namespace std; int n,ans=1; char a,b; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>a; if(a!=b) ans++; b=a; } cout<<ans; return 0; }