Submission #238163

#TimeUsernameProblemLanguageResultExecution timeMemory
238163MrRobot_28Aron (COCI17_aron)C++17
50 / 50
5 ms384 KiB
#include<bits/stdc++.h> using namespace std; signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; vector <char> s(n); int cnt = n + 1; for(int i = 0; i < n; i++) { cin >> s[i]; if(i > 0 && s[i - 1] == s[i]) { cnt--; } } cout << cnt; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...