Submission #654971

#TimeUsernameProblemLanguageResultExecution timeMemory
654971berrAron (COCI17_aron)C++17
50 / 50
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { ios_base::sync_with_stdio(false); cin.tie(0); int n; cin>>n; vector<char> a; for(int i=0; i<n; i++) { char x; cin>>x; if(!a.size()||a.back()!=x) a.push_back(x); } cout<<a.size()+1; }
#Verdict Execution timeMemoryGrader output
Fetching results...