| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56829 | 董承诺 | 排队买票 | C++ | Wrong Answer | 22 | 0 MS | 252 KB | 228 | 2022-08-03 15:05:46 |
#include<bits/stdc++.h> using namespace std; int a,c; 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]&&b[i]!=b[i-1]) c++; } cout<<c+1; return 0; }