Submission #920612

#TimeUsernameProblemLanguageResultExecution timeMemory
920612SuPythonyKaučuk (COCI21_kaucuk)C++17
50 / 50
1 ms436 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin>>n; int sec=0, subsec=0, subsubsec=0; while (n--) { string s, t; cin>>s>>t; if (s=="section") { sec++; subsec=0; subsubsec=0; } else if (s=="subsection") { subsec++; subsubsec=0; } else { subsubsec++; } cout<<sec; if (subsec!=0) { cout<<"."<<subsec; if (subsubsec!=0) cout<<"."<<subsubsec; } cout<<" "<<t<<"\n"; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...