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 <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <deque>
#include <string>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
int main()
{
int N;
cin >> N;
vi ct(3, 0);
for(int t = 1; t <= N; t++)
{
string s, a;
cin >> s >> a;
int lvl = (int(s.size()) - 7)/3;
// cerr << lvl << ' ';
// cerr << '\n';
// for(int k = 0; k < 3; k++) cerr << ct[k] << ' ';
// cerr << '\n';
// cerr << "! \n";
// cerr << ct[lvl] << '\n';
ct[lvl]++;
// cerr << ct[lvl] << '\n';
for(int j = lvl+1; j <= 2; j++) ct[j] = 0;
// for(int k = 0; k < 3; k++) cerr << ct[k] << ' ';
// cerr << '\n';
// cerr << lvl << " \n";
cout << ct[0];
for(int k = 1; k <= lvl; k++)
cout << "." << ct[k];
cout << " ";
cout << a << '\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... |