Submission #1329771

#TimeUsernameProblemLanguageResultExecution timeMemory
1329771secondaccountmaybeKaučuk (COCI21_kaucuk)C++20
50 / 50
1 ms344 KiB
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll n;
string t,s;
ll a,b,c;
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin>>n;
	for(ll i=0;i<n;i++)
	{
		cin>>t>>s;
		if(t=="section")
		{
			a++;
			b=0;
			c=0;
			cout<<a<<" "<<s<<endl;
		}
		if(t=="subsection")
		{
			b++;
			c=0;
			cout<<a<<"."<<b<<" "<<s<<endl;
		}
		if(t=="subsubsection")
		{
			c++;
			cout<<a<<"."<<b<<"."<<c<<" "<<s<<endl;
		}
	}
	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...