Submission #879714

#TimeUsernameProblemLanguageResultExecution timeMemory
8797141075508020060209tcAron (COCI17_aron)C++14
50 / 50
0 ms436 KiB
//#pragma gcc optimize("O2") #include <bits/stdc++.h> //#include<complex> using namespace std; #define int long long int n; signed main(){ char c; char tmp; c='*'; int ans=1; cin>>n; for(int i=1;i<=n;i++){ cin>>tmp; if(tmp!=c){ ans++; } c=tmp; } cout<<ans<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...