| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56947 | 季洁 | 排队买票 | C++ | Accepted | 100 | 0 MS | 248 KB | 192 | 2022-08-03 17:08:45 |
#include<bits/stdc++.h> using namespace std; int n,ans; char a,b='0'; int main(){ cin>>n; while(n--){ cin>>a; if(a!=b){ b=a; ans++; } } cout<<ans+1; return 0; }