Submission #536072

# Submission time Handle Problem Language Result Execution time Memory
536072 2022-03-12T09:26:43 Z l3nl3 Kaučuk (COCI21_kaucuk) C++14
0 / 50
1 ms 212 KB
/*#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 time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -