# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
654971 | berr | Aron (COCI17_aron) | C++17 | 1 ms | 212 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;
#define int long long
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
int n; cin>>n;
vector<char> a;
for(int i=0; i<n; i++)
{
char x; cin>>x;
if(!a.size()||a.back()!=x) a.push_back(x);
}
cout<<a.size()+1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |