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;
int n, sec, subsec, subsubsec;
string str, veri;
int main(){
cin >> n;
while(n--){
cin >> str >> veri;
switch (str.length())
{
case 7:
sec++;
cout << sec << " " << veri << "\n";
subsec = 0;
subsubsec = 0;
break;
case 10:
subsec++;
cout << sec << "." << subsec << " " << veri << "\n";
subsubsec = 0;
break;
case 13:
subsubsec++;
cout << sec << "." << subsec << "." << subsubsec << " " << veri << "\n";
break;
default:
break;
}
}
}
# | 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... |