#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,x=0,c=0,d=0,u;
string s[50000000000];
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 |
Runtime error |
229 ms |
524292 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
198 ms |
524292 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
198 ms |
524292 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
229 ms |
524292 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |