Submission #738506

#TimeUsernameProblemLanguageResultExecution timeMemory
738506mzvAron (COCI17_aron)C++17
50 / 50
1 ms324 KiB
#include <bits/stdc++.h> #define ccd ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define ll long long #define endl '\n' using namespace std; /* ------------------------ hi lol ------------------------ */ int n,ans=0; char prevs='x',c; int main() { ccd cin >> n; while (n--) { cin >> c; if (c==prevs) continue; prevs=c; ans++; } cout << ans+1 << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...