Submission #536074

#TimeUsernameProblemLanguageResultExecution timeMemory
536074l3nl3Kaučuk (COCI21_kaucuk)C++14
50 / 50
1 ms328 KiB
/*#pragma GCC optimize("O3") #pragma GCC target ("avx2") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops")*/ #include <bits/stdc++.h> #define int long long using namespace std; int n, a1, a2, a3; signed main () { // freopen("visitfj.in", "r", stdin); // freopen("visitfj.out", "w", stdout); ios_base::sync_with_stdio(0); cin.tie(0), cout.tie(0); cin >> n; for (int i = 1; i <= n; i++) { string x, y; cin >> x >> y; if (x == "section") { cout << ++a1 << ' ' << y << '\n'; a2 = a3 = 0; } else if (x == "subsection") { cout << a1 << '.' << ++a2 << ' ' << y << '\n'; a3 = 0; } else if (x == "subsubsection") { cout << a1 << '.' << a2 << '.' << ++a3 << ' ' << y << '\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...