Submission #698245

# Submission time Handle Problem Language Result Execution time Memory
698245 2023-02-13T01:58:50 Z ancuber1031 Kaučuk (COCI21_kaucuk) C++14
20 / 50
1 ms 212 KB
#include <bits/stdc++.h>
using namespace std;

int main() {
    int n; cin>>n;
    int x = 0, y = 0, z = 0;
    while(n--) {
        string a, b;
        cin>>a>>b;
        if (a == "section") {
            x++, y =0, z = 0;
            cout<<x<<' ';
            cout<<b<<endl;
        } else if (a == "subsection") {
            y++, z = 0;
            cout<<x<<'.'<<y<<' '<<b<<endl;
        } else {
            z++;
            cout<<x<<'.'<<y<<','<<z<<' '<<b<<endl;
        }
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Incorrect 0 ms 212 KB Output isn't correct
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Incorrect 0 ms 212 KB Output isn't correct
7 Halted 0 ms 0 KB -