답안 #499466

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
499466 2021-12-28T13:11:14 Z Alisaf9 Kaučuk (COCI21_kaucuk) C++14
20 / 50
87 ms 156816 KB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,x=0,c=0,d=0,u;
    string s[5000000];


cin>>n;
u=n+1;
for(int i=0;i<n;i++)
{

    cin>>s[i]>>s[u];
    if(s[i]=="section")
    {
        x++;
        cout<<x<<" "<<s[u]<<endl;
    }
    else if(s[i]=="subsection")
    {
        c++;
        cout<<x<<"."<<c<<" "<<s[u]<<endl;
    }
    else if(s[i]=="subsubsection")
    {
        d++;
        cout<<x<<"."<<c<<"."<<d<<" "<<s[u]<<endl;
    }
    u++;
}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 84 ms 156712 KB Output is correct
2 Correct 84 ms 156736 KB Output is correct
3 Correct 83 ms 156796 KB Output is correct
4 Correct 84 ms 156748 KB Output is correct
5 Correct 87 ms 156812 KB Output is correct
6 Correct 87 ms 156736 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 86 ms 156740 KB Output is correct
2 Correct 84 ms 156796 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 86 ms 156740 KB Output is correct
2 Correct 84 ms 156796 KB Output is correct
3 Incorrect 84 ms 156816 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 84 ms 156712 KB Output is correct
2 Correct 84 ms 156736 KB Output is correct
3 Correct 83 ms 156796 KB Output is correct
4 Correct 84 ms 156748 KB Output is correct
5 Correct 87 ms 156812 KB Output is correct
6 Correct 87 ms 156736 KB Output is correct
7 Correct 86 ms 156740 KB Output is correct
8 Correct 84 ms 156796 KB Output is correct
9 Incorrect 84 ms 156816 KB Output isn't correct
10 Halted 0 ms 0 KB -