답안 #499434

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
499434 2021-12-28T12:07:20 Z Abito Kaučuk (COCI21_kaucuk) C++14
20 / 50
1 ms 204 KB
#include <bits/stdc++.h>

using namespace std;
int main()
{
    int n;
    cin>>n;
    int sec=0,subsec=0,subsubsec=0;
    string x,y;
    for (int i=0;i<n;i++)
    {
        cin>>x>>y;
        if (x=="section")
        {
            sec++;
            cout<<sec<<' '<<y<<"\n";
        }
        else if (x=="subsection")
        {
            subsec++;
            cout<<sec<<'.'<<subsec<<' '<<y<<"\n";
        }
        else
        {
            subsubsec++;
            cout<<sec<<'.'<<subsec<<'.'<<subsubsec<<' '<<y<<"\n";
        }
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Incorrect 0 ms 204 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Incorrect 0 ms 204 KB Output isn't correct
10 Halted 0 ms 0 KB -