# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
83750 | MatesV13 | Aron (COCI17_aron) | C++14 | 3 ms | 600 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
int n, x=1;
char str[27];
int main (){
cin >> n;
if (n>1)
for (int i=0;i<n;i++)
cin >> str[i];
for (int i=1 ; i < n ; i++){
if (str[i] == str[i-1]) continue;
else x++;
}
if (str[n-1] == str[n-2]) x++;
else if (n==1) x++;
cout << x;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |