Submission #165272

#TimeUsernameProblemLanguageResultExecution timeMemory
165272itiamAron (COCI17_aron)C++11
50 / 50
2 ms376 KiB
#include <iostream> #include <string> using namespace std; int main(){ int N; cin >> N; int M=N+1,br=0; string P="",S; for (int i=0;i<N;i++){ cin >> S; if (P!=S){ M-=br; br=0; P=S; } else br+=1; //cout << M << "\n"; } M-=br; br=0; cout << M; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...