Submission #724501

#TimeUsernameProblemLanguageResultExecution timeMemory
724501TheSahibKaučuk (COCI21_kaucuk)C++14
50 / 50
1 ms300 KiB
#include <bits/stdc++.h> #pragma GCC optimize("O3") #define ll long long #define oo 1e9 + 9 #define pii pair<ll, ll> using namespace std; int main(){ int a = 0, b = 0, c = 0; int n; cin >> n; for (int i = 0; i < n; i++) { string q, s; cin >> q >> s; if(q == "section"){ a++; b = 0; c = 0; } else if(q == "subsection"){ b++; c = 0; } else{ c++; } cout << a; if(b) cout << '.' << b; if(c) cout << '.' << c; cout << ' '; cout << s << '\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...