| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56977 | 石利伟 | 排队买票 | C++ | Accepted | 100 | 0 MS | 244 KB | 200 | 2022-08-03 17:21:05 |
#include <bits/stdc++.h> using namespace std; int n,s=1; char a[1145],oi,no; int main(){ cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; if(a[i]!=oi) s++,oi=a[i]; } cout<<s; return 0; }