Submission #89145

#TimeUsernameProblemLanguageResultExecution timeMemory
89145igziAron (COCI17_aron)C++17
50 / 50
3 ms744 KiB
#include <bits/stdc++.h> #define maxN 1100005 using namespace std; int n,ans,i; char c,last='c'; int main() { std::ios_base::sync_with_stdio(false); cin>>n; for(i=0;i<n;i++){ cin>>c; if(c!=last) ans++; last=c; } cout<<ans+1<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...