| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56938 | 梅煦洋 | 排队买票 | C++ | Accepted | 100 | 0 MS | 248 KB | 227 | 2022-08-03 17:05:34 |
#include<bits/stdc++.h> using namespace std; char bi; char front='!'; int n; int num=1; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>bi; if(front!=bi) num++; front=bi; } cout<<num<<endl; return 0; }