# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
499433 | Ibraheem | Kaučuk (COCI21_kaucuk) | C++14 | 2 ms | 3416 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<bits/stdc++.h>
using namespace std;
string a[100005];
int main(){
int n , m = 0 , l = 0 , r = 0 , t , e , i = 1;
string s = "section" , f = "subsection" , d = "subsubsection" , o , p;
cin >> n;
while(n > 0){
cin >> o >> p;
if(o == s){
m++;
}else if(o == f){
l++;
}
if(o == d){
r++;
}
if(l == 0 ){
cout << m << ' ' << p << endl;
}
if(l > 0 && m !=0 && r == 0){
cout << m << '.' << l << ' ' << p << endl;
}
if(m == 0 && l > 0){
cout << l << " " << p << endl;
}
if(m > 0 && l > 0 && r > 0){
cout << m << "." << l << "." << r << " " << p << endl;
}
a[i] = p;
i++;
n--;
}
}
Compilation message (stderr)
# | 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... |