Submission #745178

#TimeUsernameProblemLanguageResultExecution timeMemory
745178Ahmed57Kaučuk (COCI21_kaucuk)C++17
50 / 50
1 ms296 KiB
//LCA #include <bits/stdc++.h> using namespace std; int main(){ int a = 0 , b = 0 , c = 0; int n; cin>>n; while(n--){ string s,t;cin>>s>>t; if(s=="section"){ cout<<++a<<" "<<t<<"\n"; b = 0, c = 0; }if(s=="subsection"){ cout<<a<<"."<<++b<<" "<<t<<"\n"; c = 0; }if(s=="subsubsection"){ cout<<a<<"."<<b<<"."<<++c<<" "<<t<<"\n"; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...