Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
57104 ‬朱宸瑜 排队买票 C++ Accepted 100 0 MS 252 KB 204 2022-08-03 18:58:18

Tests(9/9):


#include<iostream> using namespace std; int n,g=1; char c,co; int main(){ cin>>n; cin>>co; n--,g++; while(n--){ cin>>c; if(c!=co){ g++; co=c; } } cout<<g; return 0; }


Judgement Protocol: