| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56844 | 董承诺 | 排队买票 | C++ | Time Limit Exceeded | 55 | 1000 MS | 248 KB | 214 | 2022-08-03 15:15:12 |
#include<bits/stdc++.h> using namespace std; int a,c=1; string b; int main(){ cin>>a; for(int i=1;i<=a;i++){ cin>>b[i]; } for(int i=1;i<=a;i++){ if(b[i]!=b[i+1]) c++; } cout<<c; return 0; }