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 main(){
int n;
cin >> n;
int sect = 0, ssect = 0, sssect = 0;
for (int i = 0; i < n; i ++){
string cmd, s;
cin >> cmd >> s;
if (cmd.size() <= 8){
sect++;
cout << sect << " " << s << endl;
ssect = sssect = 0;
}
else if (cmd.size() <= 11){
ssect++;
cout << sect << "." << ssect << " " << s << endl;
sssect = 0;
}
else{
sssect++;
cout << sect << "." << ssect << "." << sssect << " " << s << endl;
}
}
}
# | 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... |