Submission #83749

#TimeUsernameProblemLanguageResultExecution timeMemory
83749MatesV13Aron (COCI17_aron)C++11
15 / 50
2 ms652 KiB
#include<bits/stdc++.h> using namespace std; int n, x=1; string str[25]; int main (){ cin >> n; 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++; cout << x; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...