# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
89145 |
2018-12-10T15:16:41 Z |
igzi |
Aron (COCI17_aron) |
C++17 |
|
3 ms |
744 KB |
#include <bits/stdc++.h>
#define maxN 1100005
using namespace std;
int n,ans,i;
char c,last='c';
int main() {
std::ios_base::sync_with_stdio(false);
cin>>n;
for(i=0;i<n;i++){
cin>>c;
if(c!=last) ans++;
last=c;
}
cout<<ans+1<<endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
420 KB |
Output is correct |
2 |
Correct |
2 ms |
516 KB |
Output is correct |
3 |
Correct |
2 ms |
608 KB |
Output is correct |
4 |
Correct |
2 ms |
608 KB |
Output is correct |
5 |
Correct |
2 ms |
608 KB |
Output is correct |
6 |
Correct |
2 ms |
608 KB |
Output is correct |
7 |
Correct |
2 ms |
608 KB |
Output is correct |
8 |
Correct |
3 ms |
632 KB |
Output is correct |
9 |
Correct |
2 ms |
632 KB |
Output is correct |
10 |
Correct |
2 ms |
744 KB |
Output is correct |