Submission #499467

#TimeUsernameProblemLanguageResultExecution timeMemory
499467Alisaf9Kaučuk (COCI21_kaucuk)C++14
50 / 50
89 ms156896 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n,x=0,c=0,d=0,u; string s[5000000]; cin>>n; u=n+1; for(int i=0;i<n;i++) { cin>>s[i]>>s[u]; if(s[i]=="section") { x++; c=0; d=0; cout<<x<<" "<<s[u]<<endl; } else if(s[i]=="subsection") { c++; d=0; cout<<x<<"."<<c<<" "<<s[u]<<endl; } else if(s[i]=="subsubsection") { d++; cout<<x<<"."<<c<<"."<<d<<" "<<s[u]<<endl; } u++; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...