Submission #522234

# Submission time Handle Problem Language Result Execution time Memory
522234 2022-02-04T08:47:29 Z blue Kaučuk (COCI21_kaucuk) C++17
50 / 50
1 ms 292 KB
#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
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 292 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 1 ms 292 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 288 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 288 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 292 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 292 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 1 ms 292 KB Output is correct
7 Correct 1 ms 288 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 292 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 1 ms 288 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 1 ms 288 KB Output is correct
15 Correct 1 ms 288 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 292 KB Output is correct
18 Correct 1 ms 204 KB Output is correct