Submission #293387

#TimeUsernameProblemLanguageResultExecution timeMemory
2933877_7_7Aron (COCI17_aron)C++17
50 / 50
1 ms384 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); int n; cin >> n; int cnt = 1; char last = '#'; for(int i = 1; i <= n; i ++){ char c; cin >> c; if(last != c){ cnt ++; last = c; } } cout << cnt << "\n"; }
#Verdict Execution timeMemoryGrader output
Fetching results...