| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56826 | 安一宸 | 排队买票 | C++ | Wrong Answer | 22 | 0 MS | 248 KB | 222 | 2022-08-03 15:02:26 |
#include<bits/stdc++.h> using namespace std; int n,ans; char a[30]; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; if(a[i]==a[i+1]||a[i-1]==a[i]) ans--; else ans++; } cout<<ans+1; return 0; }