# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
703996 | Pacybwoah | Kaučuk (COCI21_kaucuk) | C++14 | 1 ms | 324 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<iostream>
#include<vector>
#include<string>
#define ll long long
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin>>n;
string a,b;
int cnt=0,scnt=0,sscnt=0;
for(int i=0;i<n;i++){
cin>>a>>b;
if(a=="section"){
cnt++;
cout<<cnt<<" "<<b<<"\n";
scnt=0;
sscnt=0;
}
else if(a=="subsection"){
scnt++;
cout<<cnt<<"."<<scnt<<" "<<b<<"\n";
sscnt=0;
}
else{
sscnt++;
cout<<cnt<<"."<<scnt<<"."<<sscnt<<" "<<b<<"\n";
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |