Submission #115706

#TimeUsernameProblemLanguageResultExecution timeMemory
115706Breno_XDAron (COCI17_aron)C++14
50 / 50
2 ms384 KiB
#include <bits/stdc++.h> using namespace std; int N; char ch; char ant = '1'; int groups; int main(){ ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0); cin >> N; for(int i=1; i<=N; i++){ cin >> ch; if(ch != ant){ groups++; } ant = ch; } cout << groups+1 << "\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...