Submission #579116

#TimeUsernameProblemLanguageResultExecution timeMemory
579116Trisanu_DasKaučuk (COCI21_kaucuk)C++17
20 / 50
1 ms300 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int s = 0, ss = 0, sss = 0; for(int i = 0; i < n; i++){ string op, name; cin >> op >> name; if(op == "section"){ s++; cout << s << ' ' << name << '\n'; }else if(op == "subsection"){ ss++; cout << s << '.' << ss << ' ' << name << '\n'; }else{ sss++; cout << s << '.' << ss << '.' << sss << ' ' << name << '\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...