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