| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56949 | 孙喻桐 | 排队买票 | C++ | Accepted | 100 | 0 MS | 248 KB | 203 | 2022-08-03 17:08:55 |
#include<bits/stdc++.h> using namespace std; int ans,t; char a,b='0'; int main(){ cin>>ans; for(int i=1;i<=ans;i++){ cin>>a; if(a!=b){ b=a; t++; } } cout<<t+1; return 0; }