Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
56940 张志鹏 排队买票 C++ Accepted 100 0 MS 252 KB 216 2022-08-03 17:07:05

Tests(9/9):


#include<bits/stdc++.h> using namespace std; int ans; char front='1'; int n; int main(){ cin>>n; while(n--){ char a; cin>>a; if(front!=a) ans++; front=a; } ans++; cout<<ans; return 0; }


Judgement Protocol: