QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#100880#1812. Interesting Coloringckiseki#AC ✓26ms6612kbC++204.2kb2023-04-28 15:53:392023-04-28 15:53:41

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-28 15:53:41]
  • 评测
  • 测评结果:AC
  • 用时:26ms
  • 内存:6612kb
  • [2023-04-28 15:53:39]
  • 提交

answer

#include <bits/stdc++.h>
#ifdef CKISEKI
#define safe cerr<<__PRETTY_FUNCTION__<<" line "<<__LINE__<<" safe\n"
#define debug(a...) debug_(#a, a)
#define orange(a...) orange_(#a, a)
using std::cerr;
template <typename ...T>
void debug_(const char *s, T ...a) {
    cerr << "\e[1;32m(" << s << ") = (";
    int cnt = sizeof...(T);
    (..., (cerr << a << (--cnt ? ", " : ")\e[0m\n")));
}
template <typename Iter>
void orange_(const char *s, Iter L, Iter R) {
    cerr << "\e[1;32m[ " << s << " ] = [ ";
    for (int f = 0; L != R; ++L)
        cerr << (f++ ? ", " : "") << *L;
    cerr << " ]\e[0m\n";
}
#else
#define safe ((void)0)
#define debug(...) safe
#define orange(...) safe
#endif
#define all(v) begin(v), end(v)

using namespace std;

struct Dsu {
    vector<int> pa;
    Dsu(int n) : pa(n) { iota(pa.begin(), pa.end(), 0); }
    int anc(int x) {
        return x==pa[x] ? x : pa[x]=anc(pa[x]);
    }
    bool join(int x, int y) {
        x = anc(x);
        y = anc(y);
        if (x == y) return false;
        pa[x] = y;
        return true;
    }
};


int main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    int N, M;
    cin >> N >> M;
    Dsu dsu(N);
    vector<vector<pair<int,int>>> g(N);

    vector<tuple<int,int,int>> edges;

    for (int i = 0; i < M; i++) {
        int u, v;
        cin >> u >> v;
        --u, --v;
        if (dsu.join(u, v)) {
            g[u].emplace_back(v, i);
            g[v].emplace_back(u, i);
        } else {
            edges.emplace_back(u, v, i);
        }
    }

    vector<int> vis(N), sz(N), mx(N);
    vector<int> dep(N), fa(N);
    vector<int> fa_eid(N);

    const auto dfs_size = [&](auto self, int x) -> void {
        vis[x] = true;
        sz[x] = 1;
        mx[x] = 0;
        for (auto [u, eid]: g[x]) if (not vis[u]) {
            debug(x, u);

            dep[u] = dep[x] + 1;
            fa[u] = x;
            fa_eid[u] = eid;
            self(self, u);
            sz[x] += sz[u];
            mx[x] = max(mx[x], sz[u]);
        }
    };

    dfs_size(dfs_size, 0);

    int C = -1;
    for (int u = 0; u < N; u++) {
        if (max(N - sz[u], mx[u]) * 2 <= N) {
            C = u;
        }
    }

    debug(C);
    vis.assign(N, false);
    dep[C] = 0;
    fa[C] = -1;
    fa_eid[C] = -1;
    dfs_size(dfs_size, C);

    vector<int> fa_color(N);

    const auto dfs = [&](auto self,
            int i, int fc, set<int> colors) -> void {
        vis[i] = true;

        fa_color[i] = fc;

        vector<int> child;
        for (auto [j, _]: g[i]) {
            if (vis[j]) continue;
            child.push_back(j);
        }
        
        sort(child.begin(), child.end(), [&](int x, int y) {
            return sz[x] > sz[y];
        });

        auto uc = colors;
        uc.erase(fc);
        auto it = uc.begin();
        int cur = 1;
        for (size_t t = 0; t < child.size(); t++) {
            int color;
            if (it != uc.end()) {
                color = *it++;
            } else {
                while (colors.find(cur) != colors.end() || cur == fc) {
                    ++cur;
                }
                color = cur++;
            }

            auto cs = colors;
            if (fc != -1)
                cs.insert(fc);
            self(self, child[t], color, cs);
        }
    };

    vis.assign(N, false);
    dfs(dfs, C, -1, {});

    vector<set<int>> ans(M);
    int tot = M;

    vector<int> edge_color(M);
    for (auto [u, v, eid]: edges) {
        set<int> cs;
        vector<int> path_eid;
        while (u != v) {
            if (dep[u] < dep[v])
                swap(u, v);
            cs.insert(fa_color[u]);
            debug(u, v);
            path_eid.push_back(fa_eid[u]);
            u = fa[u];
        }
        int cur = tot--;

        cs.insert(cur);
        edge_color[eid] = cur;

        ans[eid] = cs;
        for (int z: path_eid)
            if (ans[z].empty())
                ans[z] = cs;
    }

    for (int i = 0; i < N; i++)
        if (fa[i] != -1)
            edge_color[fa_eid[i]] = fa_color[i];

    for (int i = 0; i < M; i++) {
        cout << edge_color[i] << (i+1==M ? '\n' : ' ');
    }

    for (int i = 0; i < M; i++) {
        cout << ans[i].size();
        for (int x: ans[i])
            cout << ' ' << x;
        cout << '\n';
    }

    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3424kb

input:

10 11
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
1 10
1 4

output:

1 2 1 2 1 2 1 2 1 11 10
3 1 2 11
3 1 2 11
3 1 2 11
3 1 2 11
3 1 2 11
3 1 2 11
3 1 2 11
3 1 2 11
3 1 2 11
3 1 2 11
3 1 2 10

result:

ok accepted

Test #2:

score: 0
Accepted
time: 0ms
memory: 3360kb

input:

10 15
3 6
2 10
3 7
6 8
1 6
2 6
4 5
6 10
4 9
5 9
4 8
5 6
6 7
4 6
1 10

output:

2 1 1 1 4 3 1 15 3 14 2 13 12 11 10
3 1 2 12
3 1 3 15
3 1 2 12
3 1 2 13
4 1 3 4 10
3 1 3 15
3 1 3 14
3 1 3 15
3 1 3 14
3 1 3 14
3 1 2 13
3 1 2 13
3 1 2 12
3 1 2 11
4 1 3 4 10

result:

ok accepted

Test #3:

score: 0
Accepted
time: 2ms
memory: 3412kb

input:

10 15
4 10
4 8
4 7
9 10
2 5
3 6
5 8
8 10
3 4
7 10
2 7
1 2
1 7
8 9
6 10

output:

2 1 4 1 1 1 2 15 3 14 13 2 12 11 10
3 1 2 15
3 1 2 15
3 2 4 14
3 1 2 11
4 1 2 4 13
4 1 2 3 10
4 1 2 4 13
3 1 2 15
4 1 2 3 10
3 2 4 14
4 1 2 4 13
4 1 2 4 12
4 1 2 4 12
3 1 2 11
4 1 2 3 10

result:

ok accepted

Test #4:

score: 0
Accepted
time: 0ms
memory: 3340kb

input:

10 15
1 7
2 4
1 10
6 10
1 5
1 2
1 9
8 9
8 10
5 8
1 3
4 7
1 6
3 6
4 8

output:

4 1 1 2 5 2 3 1 15 14 6 13 12 11 10
4 1 2 4 13
4 1 2 4 13
3 1 3 15
3 1 2 12
4 1 3 5 14
4 1 2 4 13
3 1 3 15
3 1 3 15
3 1 3 15
4 1 3 5 14
4 1 2 6 11
4 1 2 4 13
3 1 2 12
4 1 2 6 11
4 1 2 3 10

result:

ok accepted

Test #5:

score: 0
Accepted
time: 2ms
memory: 3400kb

input:

30 50
16 24
13 30
22 27
6 12
26 30
23 25
19 22
8 24
11 22
5 21
1 5
5 19
5 8
5 6
2 14
7 17
20 22
2 30
5 14
3 21
21 30
20 25
6 9
16 23
25 28
4 22
10 18
5 15
12 26
22 30
11 17
1 3
4 20
2 21
20 28
6 29
12 22
7 30
2 26
13 15
18 22
10 22
5 23
5 24
12 29
9 16
9 24
5 22
3 5
25 27

output:

4 1 5 1 3 1 2 1 3 5 6 1 4 3 1 2 1 2 2 1 50 2 2 49 3 6 1 7 48 47 1 46 45 44 43 4 42 41 40 39 4 38 37 36 35 34 33 32 31 30
4 1 2 4 49
4 1 2 7 39
4 1 2 5 30
4 1 2 3 48
4 1 2 3 48
4 1 2 4 49
4 1 2 4 49
4 1 2 4 49
4 1 2 3 41
4 1 2 5 50
4 1 5 6 46
4 1 2 4 49
4 1 2 4 49
4 1 2 3 48
4 1 2 5 50
4 1 2 3 41
4 1...

result:

ok accepted

Test #6:

score: 0
Accepted
time: 0ms
memory: 3324kb

input:

30 50
14 24
8 11
6 16
22 23
20 28
24 30
13 15
4 30
2 25
3 24
10 16
11 18
4 27
21 22
11 22
4 15
11 29
12 13
4 11
11 26
6 22
1 16
13 24
2 24
10 22
13 17
13 29
2 12
11 30
1 21
15 17
4 22
7 15
5 21
1 20
11 27
1 11
9 25
16 18
9 17
19 24
13 14
11 12
3 30
7 30
22 26
19 30
23 27
8 28
5 11

output:

3 3 2 4 1 1 1 2 1 4 3 4 4 3 2 3 5 3 1 6 1 1 50 2 49 2 48 47 46 45 44 43 2 2 2 42 41 2 40 39 5 38 37 36 35 34 33 32 31 30
4 1 2 3 38
4 1 2 3 31
4 1 2 3 49
4 1 2 4 32
4 1 2 3 31
4 1 2 3 50
4 1 2 3 50
4 1 2 3 50
4 1 2 3 39
3 1 4 36
4 1 2 3 49
4 1 2 4 40
3 1 4 42
4 1 2 3 45
3 1 2 43
4 1 2 3 50
4 1 3 5 4...

result:

ok accepted

Test #7:

score: 0
Accepted
time: 2ms
memory: 3428kb

input:

30 50
25 30
15 21
3 26
10 11
13 27
4 11
15 20
14 29
15 28
9 16
10 24
8 27
18 28
12 29
13 20
5 11
22 27
17 20
4 16
25 27
7 27
6 9
2 27
21 27
1 19
10 14
20 25
3 27
5 27
3 29
6 8
12 13
10 16
9 25
18 27
13 18
1 27
27 30
2 11
7 14
19 27
27 29
23 27
17 22
6 28
24 27
12 20
2 3
16 23
26 27

output:

1 3 1 1 2 3 2 1 1 2 3 6 2 2 1 2 7 3 1 3 8 1 9 50 1 2 49 4 1 48 47 46 45 44 43 42 5 41 40 39 38 37 10 36 35 34 33 32 31 30
3 1 3 41
4 1 2 3 50
3 1 4 30
4 1 2 4 48
4 1 2 3 50
5 1 2 3 6 47
4 1 2 3 50
4 1 2 4 48
3 1 2 43
5 1 2 3 6 47
4 1 2 3 34
5 1 2 3 6 47
3 1 2 43
3 1 2 46
4 1 2 3 50
4 1 2 4 48
5 1 2 ...

result:

ok accepted

Test #8:

score: 0
Accepted
time: 2ms
memory: 3376kb

input:

100 180
2 53
55 72
52 58
72 88
53 70
1 89
14 94
42 67
72 85
39 77
79 96
58 75
34 40
75 77
45 88
76 85
61 80
11 28
48 68
68 94
38 47
32 45
30 72
1 99
26 83
72 98
24 31
10 27
7 80
62 72
75 87
70 96
1 82
37 41
2 88
20 35
35 90
9 19
29 69
29 30
22 83
13 18
72 94
28 80
14 27
56 79
11 88
5 94
27 68
34 81
...

output:

2 9 2 2 1 2 2 3 1 4 1 1 3 2 4 2 1 2 3 1 3 2 4 1 1 10 3 2 2 7 3 2 4 1 1 1 3 1 4 1 5 1 3 3 3 2 3 4 180 1 4 3 1 4 11 1 179 178 3 5 3 1 2 3 1 4 4 5 3 3 2 3 4 3 177 3 12 3 176 2 1 175 1 174 173 2 172 1 171 1 5 6 170 13 4 1 169 1 168 167 166 165 164 163 5 2 1 162 14 6 2 161 160 1 159 158 157 6 156 155 154...

result:

ok accepted

Test #9:

score: 0
Accepted
time: 1ms
memory: 3448kb

input:

100 180
34 61
21 95
49 92
52 62
19 27
50 76
35 94
50 78
21 28
20 48
58 85
4 36
47 93
26 50
55 63
41 71
53 94
82 94
37 49
53 82
50 58
29 97
50 67
68 78
1 75
58 84
15 79
66 91
14 59
40 99
9 12
67 98
37 50
26 35
15 84
15 80
24 70
4 64
29 70
24 93
46 83
38 97
13 89
41 54
50 74
51 86
30 61
68 96
18 35
46...

output:

4 2 1 1 2 6 3 4 4 1 3 2 1 3 2 4 1 2 2 180 2 2 5 2 3 1 5 3 1 3 1 1 1 1 2 1 1 3 3 2 1 1 1 1 7 2 1 4 2 2 3 3 2 1 1 4 1 2 3 1 4 3 179 2 3 3 178 177 1 3 176 2 2 2 1 2 175 1 5 5 2 2 3 3 3 4 174 8 9 173 172 6 1 171 170 169 3 168 167 7 1 1 166 165 2 164 1 163 2 162 161 160 1 159 158 157 156 155 154 153 152 ...

result:

ok accepted

Test #10:

score: 0
Accepted
time: 2ms
memory: 3360kb

input:

100 180
14 98
15 79
65 97
25 85
2 65
15 99
16 94
47 87
38 55
10 44
43 98
15 36
41 89
46 76
38 59
15 26
14 85
39 98
67 80
6 14
33 35
11 41
15 69
2 64
15 54
6 40
6 74
20 89
5 15
12 68
19 89
15 96
30 57
15 53
10 81
12 53
15 27
45 98
20 78
22 31
5 9
51 95
42 91
62 86
75 81
17 82
81 85
43 46
20 29
68 99
...

output:

1 18 1 3 6 23 1 1 4 1 3 5 3 2 2 22 2 4 3 3 5 1 21 1 20 1 2 1 4 7 2 19 1 7 3 1 8 2 2 1 1 3 1 1 5 1 1 1 4 180 2 2 2 1 1 3 10 3 1 3 1 1 2 2 2 2 1 1 4 1 1 2 9 3 1 1 4 3 179 1 17 3 3 178 1 2 177 176 2 1 175 174 173 172 6 171 16 170 169 15 168 167 4 1 14 166 2 165 164 163 162 161 2 160 159 158 157 156 155...

result:

ok accepted

Test #11:

score: 0
Accepted
time: 2ms
memory: 3352kb

input:

100 180
43 90
40 89
36 37
37 66
5 100
37 70
23 73
28 95
37 50
1 37
26 40
47 77
18 37
15 81
23 25
20 37
32 54
67 99
94 99
28 29
5 37
28 37
29 72
35 41
71 77
39 100
48 54
21 40
69 95
15 37
11 89
71 90
17 96
37 41
1 11
24 96
81 83
31 58
52 89
27 94
14 38
27 84
57 71
55 78
59 75
29 38
57 91
37 85
66 67
...

output:

2 2 14 3 1 8 6 4 13 1 1 1 11 1 2 12 2 3 1 1 6 2 3 2 2 6 1 3 1 5 1 1 1 4 2 2 2 1 4 3 1 1 3 1 3 2 1 15 1 3 3 1 8 1 2 1 1 2 180 179 1 9 1 2 178 16 4 2 177 176 5 3 1 2 175 17 1 2 174 173 4 4 7 5 2 10 172 171 170 169 168 167 7 3 4 6 166 18 4 1 165 164 163 19 162 161 160 159 2 20 158 157 5 156 155 2 154 4...

result:

ok accepted

Test #12:

score: 0
Accepted
time: 2ms
memory: 3380kb

input:

111 222
1 60
7 55
60 110
42 79
58 61
100 109
30 85
17 59
52 84
30 111
23 87
51 62
17 30
34 55
71 104
65 67
46 99
89 108
1 90
60 99
39 58
101 103
48 84
23 71
88 92
16 97
25 34
11 30
30 60
3 43
16 100
70 110
42 56
9 106
14 84
58 80
82 93
30 86
21 69
36 107
29 95
10 109
26 74
109 110
71 83
24 73
12 48
...

output:

6 1 2 1 1 2 2 1 2 8 2 1 6 2 1 1 1 1 1 7 3 2 3 3 2 1 1 9 1 3 3 5 2 2 1 4 1 10 1 1 3 4 2 1 2 2 1 2 11 5 5 3 4 1 1 1 4 222 3 3 2 2 3 221 1 3 4 2 3 4 5 1 8 220 219 3 6 6 2 1 1 1 2 1 7 218 1 1 3 4 4 217 3 216 1 215 214 213 3 212 211 2 2 1 210 209 208 207 206 1 205 204 12 4 13 7 1 2 203 202 201 200 199 8 ...

result:

ok accepted

Test #13:

score: 0
Accepted
time: 2ms
memory: 3412kb

input:

111 222
15 50
35 76
12 37
27 30
72 96
6 79
42 77
5 6
49 92
8 26
28 107
10 65
36 52
52 80
14 110
78 96
11 96
6 80
87 96
16 89
1 90
1 74
11 63
41 85
59 81
21 35
66 86
48 49
22 79
21 34
17 103
2 31
109 110
30 98
31 76
85 108
28 39
19 69
68 81
23 70
12 25
45 88
74 110
48 66
40 72
69 96
33 44
96 100
64 8...

output:

1 4 3 2 2 2 1 1 2 2 1 2 2 1 2 5 3 3 6 2 1 2 1 2 2 1 3 1 3 5 2 4 4 1 1 3 3 1 1 1 1 1 1 2 3 4 4 7 1 1 1 1 2 3 2 4 2 3 4 3 1 1 3 2 4 3 1 2 2 1 1 2 3 2 3 1 1 3 1 2 1 8 3 1 3 222 221 1 2 220 2 219 3 218 217 216 5 215 214 213 212 211 210 209 208 207 5 5 206 205 4 204 203 202 201 200 9 199 198 197 4 3 196 ...

result:

ok accepted

Test #14:

score: 0
Accepted
time: 2ms
memory: 3392kb

input:

111 222
1 12
1 99
6 80
20 45
11 56
14 31
3 26
13 94
14 65
42 70
12 14
20 111
14 44
46 87
14 63
88 103
40 77
48 102
24 54
58 93
55 70
68 102
46 61
2 56
27 93
63 95
50 105
45 111
42 63
15 84
17 56
1 101
34 93
25 65
13 39
4 71
39 49
12 37
14 62
9 56
29 104
52 86
45 74
14 49
43 45
14 15
19 60
31 55
37 8...

output:

5 1 2 5 3 10 1 1 2 3 1 1 8 4 3 1 1 2 6 4 4 1 1 4 1 2 1 222 1 1 1 2 2 4 4 2 1 4 11 5 2 3 2 4 1 6 4 221 2 3 2 2 3 2 1 1 3 3 1 2 2 12 6 1 5 4 1 5 2 1 220 219 218 217 1 216 4 3 2 1 1 6 215 214 213 3 2 1 1 13 212 3 6 3 211 210 3 209 2 2 208 207 206 4 205 7 204 1 4 1 9 203 1 202 14 3 201 200 199 1 1 198 1...

result:

ok accepted

Test #15:

score: 0
Accepted
time: 2ms
memory: 3372kb

input:

111 222
13 110
10 58
13 68
29 101
61 96
43 76
40 55
19 43
73 106
34 89
13 79
13 16
21 56
83 88
3 70
24 94
59 88
69 86
72 88
9 11
24 51
66 93
39 99
30 103
32 91
50 66
21 100
20 48
31 45
5 36
99 101
21 97
13 72
67 76
13 37
31 83
42 81
61 87
81 99
20 66
46 95
1 22
107 111
12 77
13 74
49 65
54 73
75 96
...

output:

4 1 8 1 2 3 1 4 2 2 5 6 2 3 5 1 2 1 1 3 2 4 3 1 1 5 4 3 2 3 2 1 2 1 7 1 2 1 1 1 2 2 6 1 1 1 1 1 3 2 1 3 3 3 1 2 1 1 2 1 2 3 1 1 3 1 3 222 9 221 2 3 2 1 2 2 1 1 2 4 220 1 1 219 218 4 5 217 216 1 215 214 213 212 211 2 3 2 10 2 210 209 208 4 2 207 1 4 206 205 5 3 204 1 1 203 202 201 3 3 2 200 199 198 1...

result:

ok accepted

Test #16:

score: 0
Accepted
time: 2ms
memory: 3432kb

input:

111 222
58 79
60 64
46 108
9 68
1 47
13 40
2 52
43 106
22 92
43 86
22 73
87 94
25 44
13 95
2 99
44 83
29 100
6 8
75 101
70 88
22 71
3 62
55 108
69 72
53 98
25 38
5 101
20 42
18 79
14 81
26 79
89 108
23 44
14 44
6 108
33 105
42 56
21 86
50 102
22 106
48 98
1 10
22 35
58 69
46 73
8 35
23 38
23 62
13 9...

output:

3 1 1 3 2 4 1 1 3 2 1 2 3 2 2 4 3 1 3 2 4 1 4 2 1 1 2 1 5 3 2 5 1 2 3 2 2 1 1 2 3 1 5 1 2 222 221 2 3 1 2 1 1 1 4 3 7 2 6 2 5 3 4 1 2 1 1 3 2 2 6 3 1 2 3 2 3 220 1 2 3 219 2 3 3 1 3 4 4 1 1 218 217 216 1 1 215 2 5 214 1 213 212 1 4 1 211 210 1 2 209 208 207 1 206 3 205 204 203 202 1 201 200 2 199 4 ...

result:

ok accepted

Test #17:

score: 0
Accepted
time: 2ms
memory: 3384kb

input:

111 222
42 57
29 90
18 68
48 81
45 81
2 47
6 9
81 85
81 86
89 101
34 98
17 20
52 101
20 97
28 96
53 81
51 108
5 65
27 64
62 101
27 89
8 97
77 91
32 102
35 76
31 81
39 65
73 78
22 66
68 91
40 83
47 81
71 91
12 81
21 25
100 103
7 26
79 97
69 101
16 109
35 58
72 88
33 73
95 103
6 92
64 101
17 81
43 81
...

output:

1 1 1 9 10 1 1 6 11 3 2 3 5 1 3 7 2 1 2 6 1 4 1 1 2 5 2 3 1 2 7 3 3 8 1 1 2 3 1 5 3 6 1 2 3 222 1 12 3 2 7 13 2 1 3 2 221 2 1 2 1 220 2 2 1 2 1 3 4 1 1 1 1 219 4 4 218 4 217 216 5 3 215 2 1 3 14 1 214 213 212 2 2 1 1 4 2 15 1 1 211 1 3 2 3 210 2 3 2 209 3 1 208 207 3 206 2 205 204 8 203 16 3 202 201...

result:

ok accepted

Test #18:

score: 0
Accepted
time: 2ms
memory: 3384kb

input:

111 222
20 33
7 107
73 76
36 96
44 104
5 28
83 85
46 72
5 109
68 98
2 38
60 73
1 13
44 57
33 49
13 39
18 29
42 73
69 76
37 45
4 51
29 111
5 84
83 111
38 62
26 31
14 73
61 70
26 103
30 73
81 85
73 110
73 102
52 73
44 105
17 81
11 29
44 95
5 100
51 60
46 74
43 53
63 107
29 100
27 65
31 92
3 64
44 109
...

output:

1 2 8 1 6 3 1 2 2 2 2 4 1 4 2 3 5 9 1 1 2 1 4 2 1 3 5 2 1 10 3 11 12 13 7 1 4 8 1 1 1 1 1 2 2 1 1 1 2 3 2 2 1 222 5 1 2 5 1 6 2 3 4 2 2 3 7 3 1 14 2 1 2 1 1 221 6 3 6 3 3 220 3 1 2 2 2 1 219 218 217 3 216 215 1 214 1 1 6 213 2 212 3 211 1 210 5 3 1 209 1 208 1 4 4 207 206 3 205 204 203 202 201 200 1...

result:

ok accepted

Test #19:

score: 0
Accepted
time: 2ms
memory: 3448kb

input:

111 222
80 86
61 86
10 86
55 73
39 105
21 96
13 39
74 106
15 20
10 17
46 88
7 86
37 106
47 76
44 106
9 41
8 86
105 110
86 92
100 101
102 107
77 81
97 105
29 78
59 86
13 31
24 53
1 49
21 90
86 89
25 96
3 30
21 103
89 98
86 102
4 76
86 98
6 18
56 67
38 43
45 51
71 105
42 95
11 77
10 36
72 86
75 92
41 ...

output:

19 25 3 2 4 4 1 1 1 2 1 24 3 2 4 1 2 6 1 1 1 2 7 2 23 2 1 1 1 9 1 3 2 1 8 1 222 1 1 1 1 2 1 1 1 22 2 3 3 2 3 21 20 2 5 1 1 3 11 3 4 2 2 2 3 1 1 18 1 4 4 5 3 1 221 3 8 2 2 5 220 1 2 219 218 1 217 216 1 3 3 215 2 6 2 214 15 1 5 213 3 212 14 211 1 210 13 6 2 209 5 208 207 7 206 205 2 204 203 7 202 201 ...

result:

ok accepted

Test #20:

score: 0
Accepted
time: 1ms
memory: 3412kb

input:

111 222
66 107
38 107
17 106
8 65
74 89
46 76
25 33
55 74
10 101
6 70
50 94
5 106
74 77
43 83
74 90
81 103
42 72
66 94
63 82
21 49
12 96
99 101
40 74
13 95
70 76
12 33
4 16
38 45
13 67
17 46
16 66
12 92
98 100
1 78
48 92
35 62
27 44
32 54
85 95
37 74
69 103
52 94
61 105
27 80
47 106
74 94
52 62
49 6...

output:

2 1 4 1 9 2 3 4 3 2 4 1 18 2 5 4 1 1 1 1 2 1 17 2 1 1 1 3 1 1 3 3 1 2 1 3 1 2 1 16 1 3 4 2 2 2 2 2 3 1 1 1 2 2 1 3 1 1 15 1 1 6 4 2 2 4 222 1 1 3 1 14 2 3 1 221 3 3 2 220 219 3 2 7 2 218 2 1 2 3 217 216 1 5 13 12 215 2 214 1 11 213 212 211 3 210 209 10 3 208 207 206 205 204 203 202 201 5 4 200 3 199...

result:

ok accepted

Test #21:

score: 0
Accepted
time: 0ms
memory: 3480kb

input:

111 222
28 63
77 84
57 76
16 51
9 38
46 64
85 95
30 48
21 22
82 96
80 111
16 73
26 51
63 100
19 108
1 108
76 88
62 75
38 80
15 90
49 58
35 54
16 65
15 107
70 107
55 87
16 57
14 19
38 77
43 49
16 53
64 111
16 87
108 109
30 80
1 16
32 68
74 98
42 65
11 16
16 105
16 82
14 85
68 104
82 98
12 28
21 69
86...

output:

1 1 1 10 4 1 1 1 6 3 2 20 1 4 3 1 8 1 1 1 1 1 2 4 2 1 8 1 2 2 19 3 6 2 3 3 1 4 1 18 17 4 3 7 2 2 1 1 2 1 2 9 1 1 1 5 1 1 4 2 2 3 5 222 221 2 13 3 1 220 219 218 7 2 3 5 9 1 1 1 1 217 7 4 6 2 216 215 16 2 214 213 212 2 2 5 1 7 211 12 210 6 2 2 209 4 208 207 11 3 206 205 1 7 5 204 15 203 3 202 201 200 ...

result:

ok accepted

Test #22:

score: 0
Accepted
time: 1ms
memory: 3380kb

input:

111 222
94 103
29 74
23 42
57 62
33 67
55 57
8 57
56 90
23 57
16 39
1 80
25 33
57 83
25 102
57 102
35 76
36 102
19 87
50 84
57 111
62 84
32 57
15 68
73 110
11 69
69 76
62 105
13 42
57 78
32 62
11 22
99 104
49 73
47 57
1 40
26 57
60 104
42 45
15 17
37 63
82 93
22 60
61 67
51 86
29 57
69 103
88 95
18 ...

output:

1 1 1 1 1 28 11 1 4 7 1 2 27 1 2 1 3 1 1 26 3 25 1 4 1 2 5 2 9 222 2 1 1 24 6 23 3 4 2 1 1 1 2 9 12 3 1 1 1 2 2 22 221 1 220 21 16 6 4 2 20 219 19 2 4 3 1 3 7 3 6 2 1 5 18 218 10 7 1 217 216 2 215 214 2 213 1 3 3 3 3 1 17 212 211 210 3 209 2 208 207 206 205 2 204 3 2 1 3 2 3 1 203 2 202 5 201 200 19...

result:

ok accepted

Test #23:

score: 0
Accepted
time: 2ms
memory: 3384kb

input:

111 222
35 93
39 107
18 87
35 84
35 73
29 57
91 96
99 103
31 35
30 96
28 48
35 87
51 60
33 40
66 103
35 41
35 74
11 44
15 27
65 66
6 35
9 108
48 95
73 102
7 35
34 35
28 35
54 70
19 60
74 81
19 73
9 35
35 85
21 98
37 74
81 85
80 85
32 71
8 63
23 97
16 30
33 35
48 84
35 67
46 69
35 100
17 102
72 91
35...

output:

13 1 1 31 5 1 1 5 30 2 4 15 1 1 4 14 4 1 1 1 7 1 2 2 29 28 2 3 5 2 1 8 11 1 3 222 1 2 4 3 1 10 221 12 1 21 5 2 27 10 1 26 25 16 220 219 2 1 2 1 17 3 1 4 3 2 2 218 24 1 4 1 1 217 216 6 215 1 1 1 214 2 1 1 9 5 1 213 1 2 1 3 1 3 212 2 7 23 6 211 210 2 2 2 1 2 3 209 208 207 2 2 206 205 204 203 202 201 2...

result:

ok accepted

Test #24:

score: 0
Accepted
time: 2ms
memory: 3480kb

input:

111 222
44 88
10 26
46 53
35 64
13 97
18 100
44 46
33 45
6 75
6 15
31 84
31 68
59 83
4 104
5 91
35 90
29 44
44 74
33 110
30 96
44 60
92 103
71 86
6 44
44 98
27 98
41 109
79 108
19 22
47 54
32 101
13 41
25 40
40 44
72 93
44 80
18 55
62 89
71 95
44 61
44 87
66 83
23 111
35 63
41 101
47 56
1 90
23 58
3...

output:

17 3 2 2 2 1 6 4 3 6 2 1 1 1 1 1 24 23 2 1 13 1 2 1 3 1 1 2 1 2 1 3 1 10 1 7 11 1 1 8 9 3 8 4 2 1 2 1 1 2 1 1 3 6 2 1 12 3 4 22 222 11 2 1 1 1 2 2 7 2 1 3 221 1 2 3 1 5 1 4 5 3 220 1 5 1 219 5 4 2 9 218 4 217 216 215 1 214 213 212 211 210 1 4 3 1 21 209 208 207 2 206 205 204 203 202 20 7 201 200 199...

result:

ok accepted

Test #25:

score: 0
Accepted
time: 0ms
memory: 3440kb

input:

111 222
48 79
13 101
17 88
1 104
49 101
13 87
13 71
57 58
25 32
52 78
13 50
36 84
26 69
78 100
21 107
31 66
46 71
14 67
13 45
5 26
13 89
13 107
78 79
44 58
13 73
13 38
13 68
13 55
47 74
35 61
63 73
42 111
29 102
8 29
1 13
38 45
34 95
33 84
29 104
13 86
42 82
18 37
13 59
13 29
21 82
2 13
66 93
50 68
...

output:

4 13 1 1 1 5 10 5 6 4 21 1 1 2 2 2 1 7 22 7 31 1 1 1 9 25 33 32 6 1 1 1 1 2 3 222 8 3 3 4 2 3 12 221 1 30 1 220 3 29 8 3 28 2 2 27 26 1 14 219 1 24 11 2 3 1 3 1 23 7 1 3 218 1 3 217 2 9 1 1 216 10 1 1 215 1 214 5 2 1 2 11 3 213 20 2 2 3 212 6 3 4 211 3 2 2 2 210 209 208 5 207 19 18 1 1 206 17 205 20...

result:

ok accepted

Test #26:

score: 0
Accepted
time: 1ms
memory: 3380kb

input:

111 222
88 100
54 108
56 76
1 89
24 100
19 52
17 57
19 86
15 64
74 85
28 68
31 108
13 83
33 34
28 100
20 65
30 100
37 60
57 71
38 97
44 100
26 72
11 58
90 109
2 37
46 100
24 109
10 100
8 70
71 100
48 50
3 31
40 102
46 80
56 82
13 80
86 100
50 95
33 79
28 96
80 100
34 100
4 26
82 100
58 96
7 81
60 10...

output:

19 2 7 3 1 11 2 1 1 1 1 1 1 1 2 3 13 1 1 1 28 4 2 1 2 5 2 27 2 3 2 3 2 1 1 5 11 3 2 3 222 6 1 7 1 1 2 10 221 26 2 4 25 3 2 6 2 3 220 219 3 2 218 217 2 3 2 1 1 1 3 2 216 1 215 2 5 214 3 4 213 4 212 1 1 3 211 2 210 3 3 1 24 2 1 209 2 208 8 207 206 205 204 1 203 23 202 22 2 201 200 199 198 21 197 14 1 ...

result:

ok accepted

Test #27:

score: 0
Accepted
time: 2ms
memory: 3452kb

input:

50 60
11 43
8 38
16 29
10 16
29 37
16 28
15 23
16 32
26 38
43 44
5 36
3 4
17 36
22 38
47 49
25 38
23 42
41 45
24 43
10 24
5 11
12 43
7 19
9 50
9 49
12 39
8 47
2 14
33 40
27 32
37 40
1 40
23 27
28 30
19 48
13 36
13 15
20 41
2 31
30 45
35 46
34 48
39 49
4 23
20 49
35 43
34 40
6 22
6 36
31 44
2 18
23 5...

output:

3 1 2 1 1 4 3 3 3 4 3 2 1 2 1 4 4 1 1 2 1 2 2 1 3 1 2 1 3 1 2 4 2 1 1 2 60 2 4 2 1 2 2 1 59 5 1 1 58 1 2 57 56 55 54 3 53 52 51 50
4 1 2 3 60
4 1 2 3 58
4 1 2 4 56
4 1 2 3 60
4 1 2 4 56
4 1 2 4 59
4 1 2 3 60
4 1 2 3 60
5 1 2 3 4 55
4 1 2 4 56
4 1 2 3 60
5 1 2 3 4 50
4 1 2 3 52
4 1 2 3 58
4 1 2 3 58
...

result:

ok accepted

Test #28:

score: 0
Accepted
time: 1ms
memory: 3416kb

input:

50 60
10 33
8 18
42 44
7 38
6 29
15 33
39 48
10 20
16 31
12 13
4 31
25 34
6 37
11 46
36 42
3 8
17 19
34 43
4 17
11 24
9 15
12 27
22 49
25 36
21 35
18 41
4 28
27 43
23 29
23 50
14 41
28 30
26 46
22 29
36 50
5 33
43 48
13 49
5 35
21 32
13 40
14 32
24 41
3 19
2 4
21 30
21 37
33 45
38 43
39 46
26 47
3 2...

output:

1 2 1 1 1 2 1 3 2 2 1 2 2 2 3 1 1 1 2 1 1 1 1 1 3 1 3 2 2 1 2 1 1 3 2 3 3 60 1 2 1 1 3 2 4 59 1 4 4 58 2 57 1 56 55 54 53 52 51 50
4 1 2 3 57
4 1 2 3 59
4 1 2 3 50
4 1 2 4 51
4 1 2 3 58
4 1 2 3 55
4 1 2 3 58
4 1 2 3 57
3 1 2 56
4 1 2 3 60
3 1 2 56
4 1 2 3 60
4 1 2 3 58
4 1 2 3 58
4 1 2 3 50
4 1 2 3 ...

result:

ok accepted

Test #29:

score: 0
Accepted
time: 2ms
memory: 3348kb

input:

58 72
12 40
1 6
6 16
11 12
2 5
17 22
17 53
14 33
21 53
23 31
42 54
3 35
28 56
16 35
43 45
49 52
57 58
10 15
7 55
13 42
7 43
12 36
30 37
3 33
18 48
36 50
38 41
10 56
51 53
12 20
14 52
34 45
31 52
2 10
12 26
9 42
12 29
49 54
27 43
3 32
28 41
1 40
21 29
32 38
6 25
10 34
43 44
18 57
24 43
19 25
19 42
8 ...

output:

1 1 2 5 1 2 1 1 2 1 1 2 1 1 1 1 3 3 1 3 2 3 1 3 2 1 1 2 3 4 3 2 2 4 6 2 2 3 3 1 2 2 1 2 3 1 4 1 5 1 72 1 71 70 1 69 68 2 3 4 67 4 66 65 64 4 63 62 61 60 59 58
4 1 2 3 71
4 1 2 3 71
4 1 2 3 72
5 1 2 4 5 67
4 1 2 4 59
3 1 2 63
3 1 2 63
4 1 2 3 72
4 1 2 3 71
4 1 2 3 70
4 1 2 3 72
4 1 2 3 72
4 1 2 3 70
...

result:

ok accepted

Test #30:

score: 0
Accepted
time: 2ms
memory: 3404kb

input:

60 75
50 53
15 43
31 36
46 55
5 48
3 52
19 25
10 56
4 39
40 43
42 58
6 18
23 54
33 60
13 32
38 40
36 46
25 30
22 54
9 12
47 57
54 57
17 29
30 35
44 52
24 36
52 56
11 45
33 53
36 60
20 54
7 40
10 29
22 51
5 55
26 30
4 54
20 45
11 21
15 53
28 49
12 29
27 53
29 47
28 44
5 37
8 49
32 49
6 53
16 21
52 58...

output:

3 1 3 1 1 4 2 1 1 2 1 1 3 2 1 3 2 1 4 1 1 2 1 3 1 4 3 1 1 1 1 1 3 1 2 2 5 2 3 2 1 4 5 2 3 3 3 2 4 1 2 1 2 4 1 2 75 74 73 72 71 1 70 69 68 67 66 1 65 64 1 63 62 61 60
4 1 2 3 62
4 1 2 3 73
4 1 2 3 63
4 1 2 3 73
4 1 2 3 64
6 1 2 3 4 5 70
3 1 2 60
4 1 2 3 75
4 1 2 5 68
4 1 2 3 73
4 1 2 3 73
4 1 2 4 69
...

result:

ok accepted

Test #31:

score: 0
Accepted
time: 2ms
memory: 3336kb

input:

62 78
4 15
56 60
21 22
54 58
32 58
7 50
31 32
3 54
34 57
14 16
18 39
31 41
25 48
10 40
38 54
21 54
5 57
12 31
26 54
19 29
31 47
27 51
24 61
24 56
27 49
59 62
17 52
40 55
6 7
33 60
2 57
36 49
10 19
34 35
49 53
37 49
8 61
10 44
1 57
4 18
18 48
12 28
10 25
29 31
11 31
35 45
7 13
45 52
42 47
9 33
9 45
4...

output:

1 1 1 2 1 2 2 1 2 1 2 6 3 2 4 3 3 5 5 1 1 4 1 2 1 1 1 1 3 2 4 3 3 1 5 4 2 5 1 3 1 1 1 3 4 3 4 4 2 1 2 1 4 1 2 78 5 77 2 76 1 75 6 74 2 73 72 71 3 70 69 68 67 66 65 64 63 62
4 1 2 3 73
4 1 2 5 78
4 1 2 3 64
4 1 2 4 75
4 1 2 4 75
5 1 2 4 5 74
4 1 2 4 75
4 1 2 4 75
6 1 2 3 4 5 76
5 1 2 3 4 70
5 1 2 3 4...

result:

ok accepted

Test #32:

score: 0
Accepted
time: 0ms
memory: 3468kb

input:

108 141
27 103
36 83
20 81
18 106
79 92
87 95
23 69
50 67
32 85
50 53
50 86
13 52
13 104
20 38
46 89
24 94
12 18
33 98
17 41
14 106
47 96
27 84
30 68
50 98
45 70
45 74
13 16
99 101
41 89
3 35
13 44
51 54
45 82
48 97
69 82
22 101
23 76
4 20
5 83
18 80
41 73
14 27
19 34
44 67
20 90
47 66
10 100
7 75
1...

output:

1 2 2 3 1 1 2 3 1 4 5 2 4 3 1 1 5 3 4 1 3 4 1 1 2 1 1 4 2 5 3 1 3 4 1 3 1 1 3 2 5 2 1 1 4 2 2 1 5 1 1 6 4 4 5 3 2 2 2 1 5 5 1 7 1 6 1 1 4 2 4 2 4 2 1 2 1 1 1 2 4 1 6 5 141 2 2 3 140 3 4 1 139 6 138 137 5 1 136 3 1 4 2 135 3 134 133 2 1 6 1 132 131 130 7 129 128 127 126 125 124 123 122 121 1 120 119 ...

result:

ok accepted

Test #33:

score: 0
Accepted
time: 0ms
memory: 3344kb

input:

94 114
14 86
45 79
67 81
30 63
24 93
60 93
40 69
41 88
25 42
6 13
3 87
35 91
85 93
59 79
51 84
43 75
31 57
3 86
48 77
53 82
44 47
33 77
73 81
51 67
1 52
38 71
28 63
7 68
7 18
79 88
40 71
30 70
6 83
66 78
4 31
25 84
10 94
62 89
43 56
9 93
15 57
22 53
50 93
13 91
26 32
66 90
18 78
14 19
58 80
33 41
61...

output:

2 1 2 3 2 4 2 1 1 3 1 1 1 2 1 4 1 3 3 1 1 1 1 3 3 4 4 1 2 3 1 1 1 2 2 2 2 2 3 5 2 2 3 2 1 3 1 1 1 3 1 1 2 4 5 4 2 1 2 3 1 1 2 1 3 2 3 1 1 2 1 4 4 1 2 3 2 2 1 2 1 1 114 3 1 113 2 112 111 4 3 1 4 110 109 108 1 5 107 1 106 105 104 1 103 102 101 100 99 98 97 96 95 94
5 1 2 3 4 110
5 1 2 3 4 108
4 1 2 3 ...

result:

ok accepted

Test #34:

score: 0
Accepted
time: 2ms
memory: 3332kb

input:

50 60
5 6
1 16
8 15
24 39
11 45
30 44
10 25
22 41
19 39
7 29
3 33
21 28
7 30
6 7
10 17
9 38
35 45
1 46
19 20
7 15
28 31
18 21
11 12
32 37
24 45
23 27
2 3
16 38
14 38
25 27
4 37
20 31
22 25
8 45
40 47
3 42
5 25
4 14
43 46
38 47
36 48
12 13
2 32
34 42
23 37
28 44
33 43
13 17
26 49
41 46
28 48
18 46
46...

output:

2 1 1 2 3 1 3 1 1 4 3 1 3 1 1 4 4 2 2 2 2 2 1 3 1 1 2 2 1 2 1 1 4 2 1 1 1 2 1 3 1 2 1 2 2 60 59 58 2 57 3 56 3 55 54 53 1 52 51 50
4 1 2 3 58
4 1 2 3 59
4 1 2 3 60
4 1 2 3 60
4 1 2 3 58
4 1 2 3 60
4 1 2 3 58
4 1 2 4 57
4 1 2 3 60
4 1 2 4 54
4 1 2 3 59
3 1 2 56
4 1 2 3 60
4 1 2 3 58
4 1 2 3 58
4 1 2 ...

result:

ok accepted

Test #35:

score: 0
Accepted
time: 2ms
memory: 3416kb

input:

94 120
43 81
79 82
53 76
65 87
3 66
10 51
3 9
10 53
34 77
63 94
43 50
46 72
13 94
11 32
71 76
72 75
56 88
8 60
17 45
31 57
61 77
14 22
49 50
29 65
2 90
4 51
38 45
8 56
23 44
18 61
21 55
45 69
15 74
22 43
21 44
40 44
1 3
25 94
33 94
37 90
58 77
65 79
60 75
36 54
28 86
16 56
75 85
86 88
32 75
20 90
41...

output:

2 1 3 5 2 2 3 1 2 4 1 1 1 1 5 4 1 1 1 2 1 1 2 2 2 1 5 2 4 2 1 6 4 3 3 2 1 2 3 3 3 3 3 1 1 3 5 2 2 1 4 1 1 3 5 2 4 5 1 4 2 1 1 1 4 3 4 1 120 119 2 1 1 1 1 1 6 5 2 3 6 1 1 118 117 116 4 115 1 4 1 114 113 1 1 112 111 110 1 1 4 109 1 108 107 4 106 105 104 103 6 102 101 100 99 98 97 96 95 94
4 1 2 4 119
...

result:

ok accepted

Test #36:

score: 0
Accepted
time: 2ms
memory: 3392kb

input:

108 135
11 99
32 68
19 22
1 108
29 54
68 91
44 75
17 57
21 50
33 50
15 33
34 97
18 36
40 78
52 73
26 104
3 102
54 103
10 100
43 88
25 63
59 69
58 61
90 106
70 92
73 107
8 57
68 80
41 58
37 64
13 108
51 102
72 85
36 53
24 71
1 54
3 62
83 98
31 38
79 102
29 41
93 97
12 101
48 59
28 33
42 53
26 105
20 ...

output:

1 2 1 1 1 3 2 2 2 1 2 3 2 1 2 3 5 2 1 1 4 1 3 1 4 3 1 4 1 1 2 1 2 1 1 3 1 2 1 2 2 5 1 2 4 3 4 4 2 2 3 3 1 2 2 3 1 5 1 6 1 3 2 1 1 5 1 1 4 3 4 1 4 1 7 1 1 4 1 1 1 3 2 2 2 2 1 135 2 134 2 133 132 5 1 4 5 1 5 2 1 1 2 131 4 4 130 129 128 3 127 1 1 126 125 124 123 122 2 4 121 120 119 118 117 116 115 114 ...

result:

ok accepted

Test #37:

score: 0
Accepted
time: 2ms
memory: 3364kb

input:

105 135
50 65
60 77
55 85
48 65
22 94
10 65
13 97
28 70
87 98
70 73
7 40
7 90
5 89
64 81
47 61
59 84
43 86
82 84
92 101
39 65
2 13
25 77
29 34
24 84
34 63
1 45
9 51
51 58
63 85
2 18
18 56
55 97
32 87
5 31
41 93
52 77
20 42
61 76
1 55
47 99
42 72
8 21
83 96
26 75
34 99
2 54
2 43
84 105
5 104
2 36
65 ...

output:

2 2 2 7 1 4 2 4 2 1 5 3 3 1 2 1 1 2 1 1 1 1 6 3 2 1 1 2 1 3 1 1 1 2 3 4 2 3 4 1 3 1 1 2 3 2 4 4 1 5 3 1 2 5 2 3 2 6 2 1 1 2 1 3 5 6 4 4 1 1 1 3 4 2 2 3 4 1 2 4 6 1 1 1 135 4 1 134 2 7 1 4 133 132 7 1 1 1 2 5 1 131 6 130 129 128 5 127 126 125 1 7 124 123 122 121 1 1 120 119 118 1 117 116 115 114 113 ...

result:

ok accepted

Test #38:

score: 0
Accepted
time: 0ms
memory: 3400kb

input:

30 37
4 24
3 25
2 13
12 21
16 29
2 12
6 18
2 14
22 28
3 12
10 11
1 20
9 19
1 14
4 21
7 17
28 30
26 29
9 24
19 20
6 26
10 16
15 18
9 17
8 23
11 15
18 30
21 27
7 29
5 27
3 16
19 25
13 22
5 28
8 20
25 30
10 23

output:

2 1 3 2 3 1 1 2 2 3 2 2 3 1 1 1 1 1 1 37 2 1 3 2 2 36 2 3 2 1 35 34 33 32 1 31 30
4 1 2 3 37
4 1 2 3 34
4 1 2 3 33
4 1 2 3 37
4 1 2 3 36
4 1 2 3 37
4 1 2 3 36
4 1 2 3 37
4 1 2 3 33
4 1 2 3 35
4 1 2 3 36
4 1 2 3 37
4 1 2 3 37
4 1 2 3 37
4 1 2 3 37
4 1 2 3 35
4 1 2 3 33
4 1 2 3 36
4 1 2 3 37
4 1 2 3 3...

result:

ok accepted

Test #39:

score: 0
Accepted
time: 2ms
memory: 3356kb

input:

110 137
2 35
15 99
22 82
58 64
63 70
30 55
12 97
19 80
1 40
15 56
58 99
66 84
79 83
10 87
12 37
22 42
33 62
14 72
18 109
98 102
16 24
20 79
54 64
7 96
78 92
18 93
43 110
14 57
15 27
28 56
34 61
68 84
41 109
47 101
68 83
52 54
37 78
36 101
40 69
4 20
9 35
32 87
73 80
41 53
44 67
100 110
31 44
58 66
4...

output:

3 1 1 1 2 1 1 2 2 2 3 1 3 2 2 2 2 3 3 1 2 1 2 1 2 1 1 1 3 1 2 3 2 2 1 3 1 1 1 3 1 1 3 1 3 2 2 2 1 2 2 1 1 1 1 2 1 1 1 2 2 2 1 2 2 3 2 1 1 1 2 3 3 1 1 2 1 1 1 1 1 1 1 2 3 2 2 1 2 3 3 1 1 137 2 1 136 135 1 3 2 2 1 134 2 3 2 3 1 2 133 1 1 132 131 2 130 129 128 127 126 125 124 123 122 121 120 119 118 11...

result:

ok accepted

Test #40:

score: 0
Accepted
time: 2ms
memory: 3444kb

input:

110 137
2 7
28 38
41 109
32 51
79 100
16 94
52 56
34 98
57 65
3 59
90 102
9 78
57 94
39 61
22 24
62 84
12 96
82 99
13 68
2 53
17 72
7 20
84 90
6 44
47 97
34 83
66 71
1 59
14 54
33 67
9 14
69 94
60 76
22 105
65 104
24 101
5 42
56 81
4 97
29 89
47 76
11 110
10 25
28 48
3 21
63 87
10 61
75 80
59 101
19...

output:

2 2 1 2 1 2 1 2 2 1 1 2 1 1 2 1 3 2 3 3 2 3 2 3 1 3 3 3 3 1 1 3 1 3 1 1 2 2 3 1 3 2 1 1 2 2 2 1 2 2 1 3 1 1 2 1 1 2 2 1 1 2 3 2 1 2 1 1 2 1 3 1 1 2 2 1 3 2 2 1 1 1 137 1 1 1 3 3 136 1 3 1 2 3 2 1 3 2 2 2 3 2 1 2 135 134 2 1 133 2 132 1 131 1 130 129 128 127 126 125 2 124 123 122 121 3 120 119 118 11...

result:

ok accepted

Test #41:

score: 0
Accepted
time: 2ms
memory: 3368kb

input:

62 77
53 60
19 29
11 54
15 24
38 43
4 31
8 36
12 60
5 41
28 35
29 39
46 56
38 40
20 42
17 58
23 49
24 58
10 16
27 36
13 48
22 40
17 21
25 61
26 41
31 32
22 55
26 52
12 25
27 48
18 53
17 36
9 62
2 52
3 13
32 45
23 52
1 58
1 16
11 15
20 35
19 26
33 51
32 59
50 61
27 43
3 50
44 57
8 42
18 59
7 57
21 51...

output:

2 3 1 1 1 1 3 1 1 2 1 1 2 2 1 2 2 2 1 1 1 3 1 3 2 2 2 2 2 1 2 2 3 2 3 1 3 1 2 1 1 2 1 2 3 1 1 1 2 2 1 2 3 3 77 76 75 2 1 74 73 3 72 2 71 70 69 68 67 1 1 66 65 1 64 63 62
3 1 2 72
4 1 2 3 66
4 1 2 3 76
4 1 2 3 76
4 1 2 3 68
3 1 2 72
4 1 2 3 76
3 1 2 72
4 1 2 3 77
4 1 2 3 76
4 1 2 3 66
4 1 2 3 67
4 1 ...

result:

ok accepted

Test #42:

score: 0
Accepted
time: 0ms
memory: 3372kb

input:

62 77
6 17
20 60
40 51
23 49
6 26
3 30
12 29
36 55
13 14
3 38
21 60
20 42
37 39
8 9
24 49
32 33
7 48
17 52
7 62
9 58
4 10
1 19
26 59
35 47
5 41
18 42
27 52
5 33
22 36
53 61
23 56
22 50
47 55
32 52
28 50
19 44
25 53
41 51
10 30
33 37
38 48
6 25
16 54
34 42
7 16
36 62
4 41
2 16
29 34
8 31
1 23
1 17
37...

output:

3 1 1 1 1 2 3 2 2 1 2 2 2 1 2 2 1 2 2 2 2 2 2 2 2 3 3 1 3 2 2 1 1 1 2 3 1 3 1 3 2 2 1 1 3 1 1 2 2 2 3 1 1 1 1 77 1 1 76 75 1 74 1 73 72 71 70 69 68 3 67 66 65 3 64 63 62
4 1 2 3 75
3 1 2 73
4 1 2 3 62
4 1 2 3 68
4 1 2 3 69
4 1 2 3 75
4 1 2 3 71
4 1 2 3 76
3 1 2 65
4 1 2 3 75
3 1 2 73
3 1 2 73
4 1 2 ...

result:

ok accepted

Test #43:

score: 0
Accepted
time: 2ms
memory: 3368kb

input:

62 77
26 39
35 42
25 47
19 29
16 36
52 58
10 18
22 61
3 16
60 62
45 50
3 62
26 46
6 12
1 31
18 28
14 50
48 54
10 40
28 55
48 56
5 24
17 37
12 16
7 47
9 15
32 53
3 54
41 57
9 41
11 46
25 44
17 47
33 58
27 39
24 42
8 51
57 59
21 40
1 34
2 7
15 30
2 40
30 45
36 38
44 51
1 6
15 21
21 61
5 13
23 49
24 55...

output:

1 1 2 1 3 2 1 1 1 1 2 3 2 1 3 2 1 1 3 1 2 1 1 2 1 2 1 2 2 1 1 1 3 1 2 3 1 1 2 1 2 3 1 1 1 2 2 1 3 2 1 2 2 2 2 2 3 77 2 3 76 1 75 74 73 72 1 71 70 69 68 67 66 65 64 63 62
4 1 2 3 71
4 1 2 3 72
4 1 2 3 77
4 1 2 3 74
4 1 2 3 73
4 1 2 3 71
4 1 2 3 74
4 1 2 3 77
4 1 2 3 77
4 1 2 3 75
4 1 2 3 76
4 1 2 3 7...

result:

ok accepted

Test #44:

score: 0
Accepted
time: 2ms
memory: 3416kb

input:

20 25
12 13
11 16
17 19
3 8
9 15
10 18
4 7
1 8
6 19
13 19
4 9
5 20
2 20
18 20
8 9
8 16
10 15
4 12
5 7
6 14
18 19
3 17
11 20
4 14
1 2

output:

1 3 3 2 2 2 3 4 1 2 1 2 3 1 3 1 1 2 25 2 24 23 22 21 20
3 1 2 24
4 1 2 3 22
4 1 2 3 23
4 1 2 3 23
4 1 2 3 25
4 1 2 3 25
4 1 2 3 25
5 1 2 3 4 20
3 1 2 21
3 1 2 24
4 1 2 3 25
4 1 2 3 25
5 1 2 3 4 20
4 1 2 3 25
4 1 2 3 23
4 1 2 3 22
4 1 2 3 25
3 1 2 24
4 1 2 3 25
3 1 2 21
3 1 2 24
4 1 2 3 23
4 1 2 3 22...

result:

ok accepted

Test #45:

score: 0
Accepted
time: 2ms
memory: 3448kb

input:

68 91
33 46
33 35
6 36
38 57
40 58
2 12
15 26
21 54
2 49
12 46
26 67
9 40
1 16
1 23
27 47
29 55
2 68
15 40
37 40
39 66
34 60
14 21
63 68
27 31
32 56
17 37
2 62
9 48
29 34
19 53
21 43
32 59
21 32
7 29
5 44
18 29
10 26
10 53
24 65
13 22
45 51
33 36
18 54
16 59
32 33
7 23
51 61
2 11
56 60
3 58
15 27
11...

output:

3 4 1 1 2 3 2 1 4 1 3 3 4 1 2 2 2 1 4 1 1 4 1 4 3 1 5 1 3 1 3 4 2 4 1 1 1 2 3 2 3 2 2 1 1 91 2 1 90 1 3 89 1 1 4 1 2 2 5 3 88 1 2 1 87 86 1 5 3 5 85 84 1 83 3 82 81 80 79 78 4 77 76 75 74 73 72 71 70 69 68
4 1 3 4 89
5 1 3 4 5 81
5 1 2 3 5 83
4 1 2 3 72
4 1 2 3 69
4 1 3 4 89
5 1 2 3 5 83
4 1 2 4 91
...

result:

ok accepted

Test #46:

score: 0
Accepted
time: 2ms
memory: 3360kb

input:

110 149
74 88
34 77
51 71
21 79
8 98
62 64
16 108
76 96
25 37
2 17
10 65
14 68
8 70
5 14
36 78
13 61
27 58
46 98
17 57
75 76
6 22
24 101
56 99
76 82
56 90
41 97
52 98
66 91
33 49
7 86
5 23
29 69
4 99
10 102
20 49
78 109
4 21
10 101
5 72
57 103
84 97
30 53
11 105
28 98
9 63
31 38
29 50
32 89
45 70
38...

output:

1 2 1 2 2 1 1 4 1 1 5 4 3 1 1 1 1 4 3 3 1 3 1 5 2 1 1 2 3 1 3 1 2 3 2 2 1 1 5 1 2 4 2 5 4 1 4 3 2 3 1 3 2 1 3 3 3 4 2 3 3 4 4 4 4 2 1 1 3 1 3 1 2 2 4 1 2 5 149 1 4 1 3 2 2 4 3 148 5 2 1 6 3 4 2 1 1 3 2 4 2 3 1 147 146 145 144 4 143 142 1 141 5 140 139 2 138 137 2 136 135 134 133 132 131 1 130 129 12...

result:

ok accepted

Test #47:

score: 0
Accepted
time: 1ms
memory: 3448kb

input:

64 94
16 39
5 35
3 44
25 45
4 30
17 29
21 54
2 25
15 28
31 48
16 42
6 63
55 57
24 25
35 40
15 62
20 25
14 19
22 44
25 58
27 52
34 40
25 52
13 63
28 43
17 28
7 28
42 63
6 27
25 46
25 50
14 42
26 36
22 28
28 53
1 49
1 37
36 40
23 44
23 47
16 50
29 43
23 57
33 34
1 60
25 38
12 30
25 56
13 49
26 62
32 4...

output:

2 1 3 3 1 1 4 1 1 1 1 1 2 4 2 2 5 1 1 6 1 3 2 2 6 5 7 3 2 7 8 2 2 3 8 2 1 1 2 3 94 93 1 1 3 9 2 10 1 1 1 2 9 92 1 3 4 91 11 3 90 3 89 88 12 87 86 10 1 85 84 83 82 81 3 80 79 78 11 77 76 75 74 73 72 71 70 69 68 3 67 66 65 64
4 1 2 3 85
3 1 2 69
3 1 3 83
4 1 2 3 82
5 1 2 3 4 86
4 1 5 6 93
3 1 4 68
4 1...

result:

ok accepted

Test #48:

score: 0
Accepted
time: 0ms
memory: 3368kb

input:

104 154
31 46
86 100
81 84
51 58
17 100
28 59
6 13
21 34
43 100
82 88
23 29
13 42
36 62
87 100
52 63
22 77
46 92
32 88
88 94
76 100
3 100
70 88
24 104
3 20
20 91
37 93
61 74
31 88
11 72
21 100
27 56
47 48
34 101
25 100
25 34
9 100
70 100
59 100
98 100
65 88
55 100
12 66
88 99
13 30
12 42
73 80
35 75...

output:

1 8 1 1 3 1 2 1 20 5 1 1 1 19 3 2 2 4 18 16 9 2 1 1 9 7 1 6 1 5 1 1 5 13 154 12 1 6 14 17 15 2 16 3 3 2 2 4 1 3 2 7 1 9 15 1 14 2 1 10 3 1 1 2 2 153 3 1 152 151 2 2 6 2 2 1 13 3 1 17 2 4 8 150 1 1 2 3 149 18 10 148 7 147 146 145 3 1 1 2 144 143 1 2 12 142 141 1 1 140 139 3 138 137 136 135 134 133 8 ...

result:

ok accepted

Test #49:

score: 0
Accepted
time: 0ms
memory: 3432kb

input:

104 154
77 93
42 47
56 71
38 91
54 88
34 66
51 102
21 88
21 62
12 29
27 58
30 104
6 104
5 104
25 101
71 104
46 103
39 40
4 21
21 83
21 69
1 14
33 54
14 53
21 93
64 104
96 104
43 52
15 21
79 104
32 47
34 70
15 19
21 31
8 21
21 98
68 75
7 13
25 89
20 99
18 26
23 30
28 73
35 66
7 61
18 65
3 72
100 103
...

output:

1 1 1 1 1 4 1 4 20 1 1 5 7 16 2 6 2 1 19 1 9 2 2 1 5 13 11 3 6 10 3 2 1 2 18 17 1 2 1 1 2 1 1 2 1 1 1 1 9 3 1 2 1 8 2 4 1 1 3 1 3 12 2 1 2 14 2 1 3 154 6 153 152 10 3 15 8 2 2 1 3 16 151 15 14 5 150 2 149 148 147 146 1 3 2 145 2 144 143 3 2 7 142 141 5 2 1 3 140 139 138 13 17 137 136 135 134 133 132...

result:

ok accepted

Test #50:

score: 0
Accepted
time: 2ms
memory: 3360kb

input:

104 154
37 46
9 50
16 44
49 104
35 95
24 68
4 68
1 73
43 68
41 95
15 47
50 62
73 96
31 90
30 62
31 54
60 68
47 73
32 68
12 68
52 68
27 42
8 67
5 8
8 29
7 81
65 98
64 92
10 61
40 89
33 47
8 17
2 36
25 64
46 85
8 100
42 75
8 40
48 74
22 53
38 93
68 102
8 28
44 54
66 72
23 68
33 35
68 70
9 68
15 20
8 1...

output:

7 1 1 2 1 8 20 1 19 3 2 4 2 2 1 1 18 3 17 16 15 4 13 18 17 1 1 1 2 2 1 16 8 5 2 15 2 9 6 7 1 9 1 3 3 14 2 1 4 1 14 5 2 4 2 1 1 2 10 1 2 5 2 154 5 8 7 3 6 153 2 2 3 1 2 2 6 13 2 1 2 152 4 151 12 150 1 12 2 2 149 3 3 11 4 148 1 147 2 146 11 145 3 144 7 143 142 141 140 139 138 137 136 1 3 135 6 134 133...

result:

ok accepted

Test #51:

score: 0
Accepted
time: 0ms
memory: 3412kb

input:

104 154
28 64
15 102
90 103
52 75
14 28
47 50
24 30
18 28
31 60
70 100
9 40
28 67
5 28
28 41
43 71
6 56
75 88
3 33
49 69
83 84
75 82
2 38
75 103
26 38
75 96
29 98
44 75
17 32
75 104
2 28
66 94
5 51
12 75
28 59
52 71
51 97
32 98
19 95
28 62
41 61
7 25
19 30
6 86
72 95
57 75
40 78
61 74
1 63
28 49
28 ...

output:

22 6 1 1 20 1 1 1 1 3 1 9 2 8 3 1 19 1 1 2 5 1 7 7 18 3 4 3 17 7 1 1 3 6 2 2 2 1 14 1 1 2 3 2 16 2 8 9 10 15 1 1 4 2 1 1 2 10 4 1 3 1 4 15 154 1 14 153 1 1 152 6 1 1 151 11 150 2 1 16 9 1 17 6 18 1 19 149 148 2 1 1 13 2 147 1 146 12 2 145 2 3 1 144 5 143 142 21 2 141 8 2 140 13 139 138 137 12 136 13...

result:

ok accepted

Test #52:

score: 0
Accepted
time: 0ms
memory: 3376kb

input:

44 66
12 33
22 36
6 35
17 40
6 42
18 26
9 10
24 34
17 26
1 25
9 44
36 40
9 32
34 36
8 37
9 30
3 11
6 16
27 37
9 19
24 26
23 44
11 36
3 4
15 23
23 39
9 39
10 25
31 41
4 36
36 38
1 9
17 21
19 25
2 33
28 41
2 9
27 43
28 33
5 37
21 36
25 35
3 27
9 15
7 33
32 36
9 12
18 43
9 29
23 28
6 30
8 36
20 24
9 42...

output:

2 5 1 2 2 2 2 2 3 3 4 3 1 4 1 5 2 3 2 6 66 1 1 3 4 2 65 1 3 64 6 63 1 62 1 1 3 3 3 3 61 2 1 60 4 2 59 58 7 57 56 55 4 54 53 52 51 50 4 49 48 4 47 46 45 44
4 1 2 3 59
4 2 4 5 52
4 1 2 5 56
4 2 3 4 66
3 1 2 54
4 1 2 3 58
4 1 2 3 63
4 2 3 4 66
4 2 3 4 66
4 1 2 3 63
4 1 2 4 65
4 2 3 4 66
4 1 2 7 51
4 2 ...

result:

ok accepted

Test #53:

score: 0
Accepted
time: 2ms
memory: 3400kb

input:

104 170
24 100
76 101
7 56
68 69
36 70
11 31
38 69
1 73
6 72
37 78
3 22
11 41
34 100
42 69
38 76
32 87
40 51
6 43
5 91
17 21
40 97
2 3
48 69
40 45
54 69
69 86
4 51
19 69
64 91
46 69
20 69
40 103
91 93
4 59
84 93
60 69
47 95
12 44
19 76
69 71
30 87
74 97
95 99
4 37
13 87
36 80
63 78
17 57
62 69
30 69...

output:

3 5 1 6 7 1 5 1 1 3 2 2 1 2 1 4 1 3 1 1 3 1 1 7 21 20 2 19 3 18 17 8 2 3 1 16 2 1 170 15 1 1 1 1 2 1 1 2 14 4 3 1 4 2 2 2 3 6 2 9 10 169 168 167 2 2 3 11 4 12 1 4 1 7 13 8 6 1 3 1 12 2 3 11 2 166 5 1 3 165 3 13 14 2 164 163 10 15 162 161 160 16 159 1 158 3 157 4 156 155 8 154 153 3 152 151 2 3 150 1...

result:

ok accepted

Test #54:

score: 0
Accepted
time: 2ms
memory: 3468kb

input:

104 170
98 101
67 103
87 98
46 65
10 89
60 71
14 54
32 89
14 56
46 104
75 89
4 42
14 87
26 78
80 89
17 68
68 83
9 48
14 85
14 70
89 102
95 98
4 11
27 78
37 68
12 89
25 45
29 37
14 28
60 85
14 47
14 42
33 89
8 89
25 30
1 14
84 91
34 89
14 17
69 89
14 16
3 9
27 39
5 103
43 99
14 82
29 62
31 86
18 49
2...

output:

4 1 1 3 8 2 10 25 24 2 24 1 4 1 23 1 2 3 2 23 22 2 5 2 3 21 1 1 22 1 21 5 20 19 2 20 4 18 3 17 19 2 3 6 2 7 3 2 2 4 2 170 6 2 16 1 18 3 1 169 4 17 6 1 3 1 15 3 14 168 167 4 5 1 8 2 3 2 16 13 12 166 2 2 165 164 163 15 162 1 1 1 161 3 1 160 159 158 3 157 11 14 4 156 13 3 1 1 155 154 3 12 153 152 151 1...

result:

ok accepted

Test #55:

score: 0
Accepted
time: 2ms
memory: 3472kb

input:

104 170
19 61
6 58
85 92
70 81
45 47
31 47
28 47
29 47
47 72
60 81
42 69
81 101
16 94
22 81
37 80
68 83
17 75
47 104
42 59
77 96
47 71
25 51
14 61
47 78
38 55
13 47
32 57
36 81
70 83
81 86
11 88
5 85
7 50
81 91
35 47
32 52
34 103
1 81
7 16
24 87
20 81
55 81
47 69
72 87
8 83
23 81
33 40
42 100
47 97
...

output:

8 1 7 5 18 24 23 7 2 10 1 15 1 14 2 2 1 22 4 2 21 6 1 20 1 3 2 1 1 3 1 2 3 13 9 1 1 11 2 3 2 7 4 1 5 12 1 2 19 2 1 170 4 1 2 169 4 11 17 3 16 1 9 168 9 4 15 167 1 2 8 10 1 166 6 2 5 165 2 14 2 164 1 16 2 6 163 2 162 161 160 159 1 2 13 158 157 1 156 155 3 1 154 2 1 153 12 152 6 17 3 2 7 151 18 150 1 ...

result:

ok accepted

Test #56:

score: 0
Accepted
time: 2ms
memory: 3340kb

input:

3 3
2 3
1 2
1 3

output:

1 2 3
3 1 2 3
3 1 2 3
3 1 2 3

result:

ok accepted

Test #57:

score: 0
Accepted
time: 4ms
memory: 3908kb

input:

1000 1800
259 399
188 963
159 354
133 905
437 589
188 803
402 605
70 120
349 815
321 984
18 396
462 931
120 563
649 830
453 819
167 314
120 315
421 839
581 737
59 542
691 751
210 560
319 684
519 560
202 243
446 727
49 70
489 843
188 471
259 434
224 568
498 881
345 908
283 953
105 902
252 886
84 454
...

output:

4 1 2 2 2 38 1 3 1 2 2 1 2 1 1 1 9 1 2 5 4 15 1 58 4 1 1 1 3 2 2 1 1 1 1 3 1 3 6 1 9 3 2 20 4 2 18 2 3 1 10 1 1 1 3 2 30 1 2 1 4 18 3 3 1 8 4 1 1 10 2 11 2 2 4 1 3 8 1 12 1 1 3 5 1 3 1 2 2 12 2 37 36 2 4 4 1 2 5 2 1 2 2 1 1 57 35 1 2 1 3 1 2 2 1 4 1 2 2 1 7 3 2 3 2 1 2 7 2 13 13 4 2 2 4 4 3 9 1 1 3 ...

result:

ok accepted

Test #58:

score: 0
Accepted
time: 0ms
memory: 3916kb

input:

1000 1800
520 781
370 885
613 785
224 946
588 964
348 394
269 288
71 145
6 961
89 678
415 823
109 778
10 967
561 784
610 947
663 979
212 872
281 974
440 497
104 909
377 440
169 954
926 963
439 832
479 912
380 551
466 566
508 809
649 978
553 730
180 861
268 790
161 616
184 343
397 635
88 467
367 645
...

output:

1 1 1 1 2 1 1 3 3 3 8 2 8 3 4 4 1 3 1 4 2 5 1 1 1 2 2 1 1 1 2 1 5 5 3 1 1 1 4 3 6 1 4 1 6 1 1 3 1 2 9 1 3 1 1 1 1 3 1 4 1 2 6 4 1 3 6 3 4 2 3 7 2 2 2 1 2 3 2 2 1 2 4 1 4 4 1 5 1 3 2 3 3 1 8 4 2 3 1 2 2 1 2 4 1 1 2 1 1 1 1 2 2 3 1 3 1 2 1 5 1 2 7 5 1 2 2 8 1 5 18 1 3 5 2 4 1 2 2 2 3 2 3 2 3 2 3 2 1 6...

result:

ok accepted

Test #59:

score: 0
Accepted
time: 4ms
memory: 3908kb

input:

1000 1800
359 869
621 627
104 820
156 917
72 398
43 893
453 525
567 728
613 618
445 947
165 166
33 613
357 955
419 839
207 914
54 1000
628 967
488 874
4 747
808 893
328 615
364 977
267 970
335 422
500 728
867 893
429 863
728 864
355 841
318 858
293 893
654 987
125 721
741 797
28 795
160 770
275 496
...

output:

1 2 5 1 1 18 7 5 1 4 2 2 2 1 1 1 7 2 3 84 1 2 1 1 1 24 22 6 4 1 7 1 1 1 2 3 5 1 1 83 2 82 8 3 1 2 1 3 1 2 2 1 2 3 1 1 2 5 1 7 2 81 18 3 2 2 5 2 1 1 1 8 1 2 2 3 2 2 3 3 5 3 1 3 4 1 4 2 1 2 80 3 4 4 1 1 1 2 1 79 1 1 3 3 2 4 2 2 8 2 78 2 1 2 1 1 1 2 2 1 10 1 1 1 6 1 7 1 3 3 4 2 2 1 1 2 4 4 32 1 14 4 77...

result:

ok accepted

Test #60:

score: 0
Accepted
time: 0ms
memory: 3956kb

input:

1000 1800
732 925
670 828
49 851
29 127
929 987
722 858
319 595
224 313
140 898
539 959
173 730
263 643
202 615
21 582
127 128
332 344
107 123
359 790
21 993
530 670
21 610
420 484
751 883
275 733
55 896
643 952
60 718
387 670
143 429
589 677
92 438
670 688
151 491
491 670
150 882
365 670
129 221
32...

output:

3 72 4 4 2 1 1 1 3 1 20 8 1 27 1 1 10 2 11 104 16 1 2 5 2 4 1 29 1 2 2 103 1 35 5 15 22 4 2 4 1 7 1 2 1 2 102 28 1 1 51 2 1 9 3 1 1 1 27 9 2 6 2 3 2 1 2 5 13 24 1 1 4 1 1 1 1 4 1 1 1 11 2 1 6 1 2 1 3 4 2 19 2 1 41 2 2 2 1 1 1 2 1 2 6 101 2 1 4 42 1 5 44 1 2 1 2 100 1 3 2 99 2 2 3 98 1 3 1 5 1 2 8 3 ...

result:

ok accepted

Test #61:

score: 0
Accepted
time: 4ms
memory: 3884kb

input:

1000 1800
449 743
134 197
140 917
575 773
19 917
172 913
243 595
256 750
39 960
45 114
409 919
369 874
364 578
100 307
617 863
276 985
134 793
237 465
573 917
22 79
379 456
196 983
106 863
59 112
420 994
290 711
549 771
422 485
28 552
161 919
71 149
422 917
118 863
712 987
382 821
319 917
343 840
81...

output:

2 2 37 18 130 58 1 2 2 54 25 1 1 64 9 2 1 2 138 1 53 3 4 1 1 1 36 2 1 1 1 31 10 14 3 140 3 6 2 1 1 1 2 2 34 1 1 1 2 16 56 46 12 2 1 141 1 4 14 25 92 49 1 3 10 45 2 17 2 2 1 1 29 143 1 1 33 1 145 8 52 113 5 1 112 109 1 11 30 59 35 2 1 1 8 12 1 3 1 3 1 1 2 106 1 2 2 41 24 97 10 18 1 2 2 12 6 100 118 3...

result:

ok accepted

Test #62:

score: 0
Accepted
time: 0ms
memory: 3988kb

input:

1000 1800
71 337
173 565
922 925
235 893
822 932
247 404
625 672
26 235
300 417
122 895
553 684
235 665
465 680
828 982
235 610
681 976
442 807
428 444
55 235
315 391
558 792
98 221
57 697
178 235
36 147
310 312
785 916
205 558
235 838
775 816
224 310
456 679
147 799
235 909
235 360
151 248
302 577
...

output:

2 2 29 35 12 68 3 189 1 2 4 21 1 1 190 1 10 1 191 14 8 2 1 74 1 2 1 1 44 19 4 1 2 192 193 2 1 2 2 1 194 94 2 1 1 56 1 1 2 4 1 2 37 93 3 66 11 1 1 195 196 2 197 188 1 24 2 85 1 28 199 1 1 62 1 3 1 3 1 5 2 2 1 200 201 202 9 17 4 5 13 114 61 1 1 1 203 52 2 204 41 205 65 2 2 2 2 1 1 3 3 1 206 13 2 20 1 ...

result:

ok accepted

Test #63:

score: 0
Accepted
time: 19ms
memory: 6380kb

input:

5555 9999
142 3105
3769 4712
2737 5484
1028 2311
3424 4648
1315 2280
5041 5102
1210 4076
2966 3603
1874 5183
358 4184
741 5507
1455 1512
61 886
58 2702
1268 3162
2307 2532
555 1307
3948 4851
1354 3579
2293 4154
102 777
280 3997
3677 4201
271 2381
4256 4377
1780 5041
5046 5413
689 4184
3440 3618
1308...

output:

5 1 24 2 1 2 1 2 1 1 29 14 4 4 2 4 1 2 1 1 1 4 1 3 1 4 26 1 4 3 1 1 1 1 5 1 1 2 1 29 6 1 1 2 1 1 30 9 2 1 2 3 2 18 1 1 1 2 21 2 3 2 1 1 4 2 2 4 1 1 93 3 2 1 3 4 4 2 7 1 4 1 2 2 1 3 1 2 2 5 5 2 2 4 1 1 2 4 3 1 11 2 2 1 1 1 2 1 2 2 5 2 1 3 27 1 2 40 77 31 2 2 2 1 1 2 9 1 1 3 5 5 1 1 18 3 58 4 3 1 3 2 ...

result:

ok accepted

Test #64:

score: 0
Accepted
time: 10ms
memory: 6396kb

input:

5555 9999
1262 4959
1894 3341
2140 5396
1363 3021
752 1194
2391 2897
806 4916
2455 2827
2752 3431
3736 5009
2904 5272
3235 3526
970 1025
966 1448
3450 4943
1614 3152
3462 3876
3440 4980
2140 4576
3097 3654
342 1663
3874 5313
2910 3626
2140 2304
1234 5543
486 3819
690 835
1352 1857
1041 1933
2969 477...

output:

2 4 222 1 2 1 3 2 10 1 2 2 51 33 1 4 1 1 200 11 9 1 2 201 2 1 4 8 5 3 1 3 4 5 1 6 16 3 1 3 2 2 2 1 2 6 2 2 3 3 1 3 3 1 1 1 3 1 43 3 1 2 1 1 2 3 2 2 1 2 3 32 1 1 61 4 3 3 4 1 1 1 5 8 23 41 1 2 1 4 17 1 2 8 1 2 1 3 3 2 62 2 1 1 1 4 1 2 202 1 1 1 3 1 2 6 1 2 2 203 2 3 6 1 2 2 1 1 1 1 1 1 1 1 1 2 2 2 6 ...

result:

ok accepted

Test #65:

score: 0
Accepted
time: 13ms
memory: 6348kb

input:

5555 9999
2052 3622
2954 3331
3929 3974
293 592
520 2404
1076 4201
805 5495
1614 2626
2832 3089
3630 4484
904 2074
823 3343
239 5129
1053 2865
476 3206
2332 3763
242 3023
2623 4634
2049 2585
3226 5469
912 1216
2816 5250
1112 1998
2954 3661
656 4170
569 5003
1252 4412
662 5262
213 1564
4114 4929
1746...

output:

1 9 3 7 2 2 1 77 1 1 14 2 5 1 2 1 18 4 1 186 1 3 2 41 3 4 39 2 1 6 2 1 1 2 1 1 1 2 1 2 9 1 4 38 1 2 2 3 1 12 6 1 2 2 1 5 1 20 15 2 2 2 1 2 6 5 1 1 1 2 2 73 2 2 1 14 1 2 2 2 2 81 2 1 6 1 3 2 1 3 1 1 158 12 1 11 2 1 1 4 1 6 1 8 2 5 1 18 1 1 2 1 1 8 3 2 1 2 1 2 2 2 2 2 3 17 1 2 3 1 1 1 1 1 10 2 1 2 5 1...

result:

ok accepted

Test #66:

score: 0
Accepted
time: 15ms
memory: 6056kb

input:

5555 9999
1143 5042
4102 4810
1483 4150
2735 4011
586 3881
1203 1722
2462 3887
525 2261
637 3076
871 3697
2387 2668
1124 1839
392 5505
2520 2843
4467 4639
4007 4068
1379 4355
3436 4835
3316 5122
2644 5058
3926 5090
3321 5049
1788 3153
4436 5469
1162 4857
1645 1761
145 4386
2404 4060
433 4727
2645 49...

output:

3 8 2 1 1 1 6 1 3 1 2 2 3 2 2 1 1 1 2 3 3 2 5 1 3 3 2 1 4 1 3 1 2 7 3 1 4 1 1 2 2 3 1 2 1 5 1 1 4 4 1 1 2 1 4 1 2 4 2 2 1 1 1 1 2 1 3 1 4 1 5 1 2 3 4 3 1 1 3 1 1 1 2 4 1 4 4 1 6 1 1 2 1 1 14 1 2 11 1 2 2 2 2 3 1 3 2 1 2 3 1 3 4 10 3 1 2 4 2 1 2 1 1 2 3 2 2 4 2 1 2 3 6 2 1 2 1 2 2 2 6 2 3 1 4 3 4 1 3...

result:

ok accepted

Test #67:

score: 0
Accepted
time: 20ms
memory: 6376kb

input:

5555 9999
1695 3975
1608 5240
1005 1500
4086 4842
829 4977
52 5212
162 4602
1471 4603
1551 2075
912 4369
2406 4745
2845 3030
3189 4898
2505 3442
2944 4391
523 1953
2037 4778
1415 1868
998 4556
690 2291
1045 1527
1581 2557
321 954
235 4886
3495 5528
1672 2154
3765 4763
973 5489
4635 5201
1337 4648
43...

output:

1 1 1 2 1 1 1 1 3 2 1 1 7 1 1 1 1 2 3 1 1 2 2 3 2 2 2 1 4 1 1 3 3 1 3 5 3 14 5 5 1 5 1 1 1 1 1 1 3 7 1 3 3 2 2 1 7 4 5 1 1 2 3 4 6 1 6 2 4 1 2 3 1 1 3 2 2 1 1 1 3 5 5 5 1 5 4 4 2 2 2 4 4 1 1 3 8 2 3 1 2 14 2 2 2 1 2 1 3 3 4 21 3 7 2 2 2 2 1 2 2 4 2 2 2 1 2 2 2 1 1 1 36 1 1 2 6 1 6 4 1 3 4 2 3 6 9 12...

result:

ok accepted

Test #68:

score: 0
Accepted
time: 15ms
memory: 6308kb

input:

5555 9999
1024 4311
1168 2599
961 3445
3511 4455
356 3352
2326 4819
305 2927
4461 4787
961 4533
4796 5248
1020 3418
3019 3231
410 2401
331 2088
267 4042
607 2886
1437 1777
2341 3615
2877 3670
587 3413
1174 1972
351 4883
413 3429
3173 5194
1679 5005
43 5028
456 5300
3029 4497
2795 4966
2900 3985
1238...

output:

18 3 11 4 2 1 9 2 3 1 21 1 3 1 2 11 3 17 48 2 22 2 3 1 3 2 1 1 1 5 3 1 1 1 2 2 2 5 5 2 2 1 1 3 1 3 1 2 4 26 4 1 2 2 1 2 1 1 11 2 6 3 3 3 2 1 1 1 4 11 2 2 1 1 6 2 4 1 8 2 1 2 1 45 15 42 3 47 13 1 1 23 2 18 1 2 1 1 1 1 3 68 2 4 1 5 2 4 3 1 4 1 1 2 2 1 1 2 2 1 4 2 7 5 1 7 2 2 4 4 2 2 1 1 2 4 2 1 2 2 4 ...

result:

ok accepted

Test #69:

score: 0
Accepted
time: 21ms
memory: 6320kb

input:

5555 9999
2683 2778
377 1237
4128 5303
875 4026
3397 4602
3164 5447
824 3280
2233 3301
282 3297
1063 4201
1393 2016
1089 2699
829 4363
1992 3929
978 4662
938 5172
2287 4933
377 418
2355 4365
38 954
1475 2056
485 3274
2767 3053
3950 5432
3309 4387
503 723
978 3003
1530 3618
2849 2894
2871 5260
2217 2...

output:

1 380 1 2 2 1 5 4 1 3 1 2 6 2 3 11 1 296 1 5 1 19 2 3 2 2 5 1 1 10 6 1 2 3 1 1 3 2 122 3 19 4 1 8 1 37 2 2 12 1 5 1 1 3 4 1 1 105 3 87 3 1 2 1 8 1 34 11 86 60 1 2 1 2 1 2 16 26 61 1 1 1 4 4 185 4 24 25 2 2 3 3 2 3 3 47 1 1 62 1 1 1 1 2 39 3 1 63 297 98 2 82 5 2 2 1 3 2 2 4 4 4 8 1 1 2 8 12 1 2 2 4 1...

result:

ok accepted

Test #70:

score: 0
Accepted
time: 15ms
memory: 6324kb

input:

5555 9999
1930 3502
1040 1448
2624 2954
393 2511
804 2385
1868 5188
5 2229
1567 2921
244 2825
750 4656
650 2429
2450 5031
1139 4494
1960 3761
911 4277
3525 4069
1746 1982
68 2421
481 5234
978 3926
596 3092
997 1128
2486 4719
2366 4065
1940 2796
439 1774
1493 3040
1262 3022
2729 4637
1690 2912
2818 4...

output:

1 1 1 1 1 1 8 1 12 1 1 12 1 14 7 2 1 45 1 3 1 2 41 1 2 2 1 1 89 1 4 18 2 12 1 1 5 7 5 1 3 224 1 35 2 31 45 5 2 2 8 4 4 4 3 18 34 1 1 1 57 1 2 1 6 5 7 5 4 6 1 3 10 1 2 37 16 4 4 1 42 1 5 7 37 1 13 1 1 2 3 1 3 4 1 78 3 4 2 2 47 1 23 3 4 2 22 1 1 2 1 8 35 1 3 8 2 3 3 1 15 1 2 38 1 2 1 2 5 6 14 2 3 3 6 ...

result:

ok accepted

Test #71:

score: 0
Accepted
time: 16ms
memory: 6332kb

input:

5555 9999
1789 3512
230 4431
417 3865
5335 5368
4749 5520
1543 3237
1708 2648
4256 5249
5106 5335
2479 2549
383 3118
2358 3768
1920 4619
964 3811
2916 5303
3012 5335
2524 4659
141 1711
159 3458
2253 4392
1253 5346
760 1559
1073 1153
59 4731
4943 5335
3346 3848
784 3141
3593 5546
1897 3408
146 958
21...

output:

2 3 1 133 2 2 1 1 364 4 3 3 1 1 1 56 6 1 2 2 2 10 159 2 32 2 13 3 19 2 1 2 23 1 6 69 363 9 1 2 4 3 1 21 1 38 15 5 4 1 362 1 361 2 1 360 2 1 2 2 71 115 3 1 9 2 123 4 2 1 1 1 1 23 1 3 1 1 3 46 1 114 4 2 20 1 2 13 3 5 2 45 2 9 4 2 1 2 46 2 1 1 1 5 2 2 2 3 2 43 5 1 2 1 14 90 3 2 2 2 1 2 2 26 149 5 1 1 2...

result:

ok accepted

Test #72:

score: 0
Accepted
time: 16ms
memory: 6612kb

input:

5555 9999
2304 5256
1016 4317
175 5340
438 5354
4202 5117
583 2387
1140 3712
2643 5234
1266 2296
1913 5294
3512 3829
2371 3791
4890 5294
619 2582
301 4652
1854 2816
1582 3957
1407 2264
1795 4566
1422 4644
1992 3580
5253 5439
2673 4315
456 768
4075 4641
4397 4917
3990 4376
1882 1904
2381 4693
1683 32...

output:

2 2 1 1 2 1 2 5 1 96 1 24 47 7 1 1 4 2 1 4 2 1 3 5 3 1 1 1 25 1 265 1 5 2 6 1 3 15 1 4 1 29 1 27 1 13 1 1 6 2 6 19 1 36 33 4 1 2 2 1 1 26 3 2 1 1 1 1 2 68 2 14 3 4 2 1 1 1 1 1 2 10 3 2 2 1 12 1 2 3 1 2 3 1 1 2 15 2 1 6 1 65 3 12 103 6 2 6 137 1 1 2 1 3 3 1 5 4 2 1 26 1 1 1 2 2 1 1 30 1 18 1 2 2 15 1...

result:

ok accepted

Test #73:

score: 0
Accepted
time: 19ms
memory: 6460kb

input:

5555 9999
1022 4933
839 1665
1534 5295
3097 5549
3387 5232
2976 4873
2089 4779
31 3171
4154 4444
3588 3674
2984 3014
352 2736
863 2885
2393 3620
1444 1562
143 4312
2764 3519
283 2089
1421 3209
1995 4534
2338 4534
2982 3760
4812 5242
2089 3592
951 1345
1208 4867
1870 3817
86 3694
623 1534
1534 4304
2...

output:

5 2 92 1 5 2 10 1 19 2 2 2 4 1 2 2 1 22 2 223 37 31 2 25 1 7 25 4 177 23 433 111 29 3 1 3 1 1 1 2 1 2 7 2 6 189 12 2 1 91 4 1 112 1 1 201 161 1 60 1 1 1 3 2 172 52 14 118 5 1 1 157 1 2 2 2 1 432 32 19 50 2 1 1 4 12 431 3 3 2 1 6 1 1 1 1 24 1 1 1 1 2 108 2 430 13 1 1 18 429 2 120 2 1 2 2 1 72 6 1 1 1...

result:

ok accepted

Test #74:

score: 0
Accepted
time: 18ms
memory: 6324kb

input:

5555 9999
3889 5549
959 3112
1159 3380
1177 5282
1319 1505
3362 3734
1605 3889
3134 3763
149 1752
580 1999
291 4664
3882 3889
1287 2599
3411 3902
490 3245
1343 2673
824 5373
115 4798
423 2719
2059 3944
1386 5222
4604 5175
698 1627
908 5309
1711 2281
269 1752
1632 3889
1419 3439
830 5319
1670 3889
28...

output:

295 2 9 5 5 43 239 1 18 1 1 420 1 1 1 2 1 155 1 1 1 1 95 131 2 24 175 1 2 443 12 1 1 394 53 2 2 1 1 1 2 1 1 1 1 4 4 1 7 1 14 2 1 1 5 1 2 408 1 9 2 2 1 3 2 170 3 411 1 5 1 4 1 13 28 137 2 3 5 3 2 9 1 412 1 2 2 26 49 1 184 3 1 2 1 47 2 3 1 1 1 3 4 1 1 6 6 9 11 3 112 1 6 4 2 56 3 8 415 5 2 3 1 27 1 1 7...

result:

ok accepted

Test #75:

score: 0
Accepted
time: 18ms
memory: 6288kb

input:

5555 9999
777 3919
105 1264
4091 4458
575 2432
2295 3559
319 2692
329 4520
804 5403
5002 5208
1864 2692
1155 4856
1153 4358
3074 5142
2392 4511
36 1457
1640 4581
760 1386
1151 4755
1003 4395
5308 5394
655 4521
2583 3778
53 2282
1065 5137
3074 3480
252 3201
1045 5020
2644 3058
286 4997
3017 4973
1563...

output:

1 1 1 3 1 507 1 3 7 6 1 1 80 2 1 1 2 1 1 1 38 2 2 51 61 4 50 2 1 1 3 472 2 4 1 348 4 2 1 1 5 134 7 108 2 11 2 1 32 1 1 1 3 65 62 83 1 1 485 5 31 40 1 79 2 9 452 215 190 5 324 1 5 150 3 3 187 1 3 1 1 454 2 49 445 9 2 330 6 2 6 58 2 1 2 1 2 1 5 2 1 32 37 2 1 6 3 2 3 459 1 1 2 1 1 1 3 13 1 2 1 2 2 62 1...

result:

ok accepted

Test #76:

score: 0
Accepted
time: 9ms
memory: 6312kb

input:

5555 9999
2927 5071
3301 4461
1938 2143
4132 4918
4443 4742
1982 3553
3854 5000
2931 4742
1588 4976
2973 3271
2038 2526
866 4095
1983 2590
3393 3953
3955 4540
4145 4742
1595 2273
2909 3153
1901 4478
1730 4742
1339 3329
2092 2964
415 3711
2610 3100
2882 5415
1495 5131
4742 5454
1310 1901
1702 3875
65...

output:

3 1 2 1 251 111 1 30 1 1 267 1 12 2 4 538 1 3 60 398 2 2 60 1 12 1 543 150 65 21 225 545 26 151 1 59 2 9 83 1 547 2 272 1 1 18 1 1 1 1 1 1 1 2 1 112 1 1 20 21 1 28 25 2 58 2 393 1 4 1 1 3 111 5 10 1 110 1 2 11 89 1 1 1 6 1 6 1 2 2 1 59 1 160 1 1 2 7 3 1 1 2 3 1 1 1 50 3 7 138 2 3 19 550 152 143 2 7 ...

result:

ok accepted

Test #77:

score: 0
Accepted
time: 18ms
memory: 6356kb

input:

5555 9999
14 1063
526 5120
775 5520
882 5106
4883 5106
3042 5497
477 3880
1685 2528
1670 1854
2875 3607
4343 5057
4630 4997
2914 3139
577 2682
2259 2875
2674 4405
4148 4405
2875 5378
170 2271
282 2875
1685 1837
1359 1445
1428 2044
3087 3388
2506 2875
4282 4731
2489 2875
3084 3109
1915 2831
1080 2875...

output:

2 2 1 3 1 6 1 29 2 88 3 2 20 29 441 8 2 223 1 220 6 1 1 30 440 1 9 22 68 77 11 5 1 8 1 117 12 9 6 6 2 23 439 2 38 3 132 2 2 5 16 1 10 4 3 122 3 11 1 23 1 138 2 90 1 73 27 1 4 2 438 437 2 1 3 2 3 3 53 1 1 2 4 1 34 5 1 143 436 2 18 10 17 1 5 2 98 2 1 4 1 5 56 3 17 2 1 2 99 435 1 1 7 2 5 1 49 1 1 5 1 2...

result:

ok accepted

Test #78:

score: 0
Accepted
time: 9ms
memory: 4636kb

input:

2522 3678
1665 2057
294 1330
788 1415
146 1494
273 1419
593 2267
383 1356
1488 2179
1204 1741
404 1392
811 2070
1079 1463
240 636
1000 2158
1171 2421
465 979
814 927
369 2402
693 1830
286 1543
565 1221
375 1824
567 2431
1020 2178
327 1577
880 1719
365 2201
465 1666
207 2454
1278 1349
1412 2025
550 2...

output:

1 1 20 5 8 1 8 10 11 21 29 1 1 1 26 22 1 9 15 1 1 4 1 9 17 7 1 29 1 19 1 17 25 24 22 10 15 18 1 29 23 21 1 2 12 10 13 19 1 1 2 13 8 7 10 10 1 2 3 1 19 1 1 1 2 1 1 10 14 26 26 13 27 1 1 2 1 22 1 12 5 22 1 3 28 15 3 21 3 16 1 24 16 1 1 4 1 10 4 15 2 2 2 26 1 1 16 1 9 15 17 10 23 17 11 1 2 16 1 1 1 1 1...

result:

ok accepted

Test #79:

score: 0
Accepted
time: 10ms
memory: 4920kb

input:

3246 4746
1629 3038
37 2425
736 2561
65 310
2591 3150
217 2256
547 2658
644 1617
2763 3194
1577 1611
158 2290
537 1882
439 2922
1048 1516
94 2930
2999 3073
201 1613
325 2153
260 2523
23 1458
485 2103
2575 2874
1617 2141
370 898
1959 2550
1810 1841
149 1541
125 559
2290 3019
146 3147
389 2763
325 788...

output:

1 1 15 22 1 1 29 19 13 19 22 1 9 1 2 8 1 19 15 13 9 17 16 1 1 20 3 8 28 1 1 3 1 16 4 10 13 12 4 9 13 6 1 2 16 12 28 1 31 1 1 23 25 12 1 17 14 12 4 16 13 1 10 1 22 25 28 1 10 1 2 2 12 15 1 1 3 2 26 5 4 25 1 1 4 1 1 20 1 1 19 1 1 4 2 26 4 2 1 14 9 1 11 27 17 1 1 1 1 1 1 2 1 23 9 1 1 1 3 1 2 12 1 1 20 ...

result:

ok accepted

Test #80:

score: 0
Accepted
time: 5ms
memory: 5060kb

input:

3446 5046
850 3446
1095 1118
1453 1470
1365 2819
361 2173
1930 2611
1105 3242
286 1593
1201 2108
2527 2766
2120 2566
1704 2805
2260 2781
962 3384
456 3360
55 3263
1056 1594
438 2480
898 2506
1507 2220
105 3135
945 3427
1782 2038
39 3253
757 2020
674 2231
1181 1900
2200 2295
375 2066
580 3440
2527 32...

output:

1 2 1 2 11 1 22 23 1 17 9 1 15 11 25 2 10 1 30 8 6 3 8 11 1 17 1 12 25 15 4 20 26 24 21 1 8 1 1 17 27 14 10 1 15 23 11 6 1 2 18 18 3 1 1 15 1 1 1 16 3 14 2 1 12 1 1 31 1 1 1 3 28 19 1 10 14 1 8 1 1 9 1 3 5 1 17 1 1 17 15 17 4 2 1 1 14 1 1 1 1 1 14 1 1 30 4 19 1 2 15 25 28 14 10 29 4 19 1 1 1 6 1 1 2...

result:

ok accepted

Test #81:

score: 0
Accepted
time: 7ms
memory: 5280kb

input:

4070 5970
804 3176
1834 4029
1214 3459
1992 3207
1707 1743
1327 2031
1431 2635
1351 2446
2459 3180
551 711
3103 4012
980 3110
626 2297
1630 3079
452 1951
3588 3898
713 3603
711 2594
3675 3862
140 3741
1153 1304
561 3807
1022 2669
632 1852
1602 1603
231 2729
70 272
793 1491
1201 3452
541 1751
1633 23...

output:

3 16 1 1 31 24 1 1 1 21 1 1 24 1 15 1 1 2 22 1 19 1 1 1 1 1 19 13 1 13 11 19 3 16 2 13 14 3 1 2 17 19 18 1 29 15 1 1 14 2 1 16 30 1 24 1 1 28 1 1 1 1 20 6 25 17 32 6 19 15 25 12 15 11 16 13 18 13 9 3 1 26 8 1 21 22 25 12 1 1 2 27 23 20 18 2 1 20 18 1 1 14 15 15 31 1 25 23 13 1 2 29 1 20 5 1 29 1 1 1...

result:

ok accepted

Test #82:

score: 0
Accepted
time: 4ms
memory: 5436kb

input:

4142 6078
616 667
2441 2752
1396 2690
369 3340
1407 2506
82 3706
3769 3964
922 3454
327 1297
1298 2421
27 684
633 2831
1158 1978
519 2761
565 3930
660 2263
416 2690
738 3945
325 3563
932 2030
3112 3124
593 3956
1541 3445
2824 3030
1227 3945
1204 1765
1398 2761
1541 3216
784 3588
1575 3438
2882 3516
...

output:

1 17 23 20 19 4 1 1 9 18 1 24 1 28 15 1 34 11 26 14 12 18 15 15 26 1 32 5 1 1 1 1 20 31 1 3 18 2 12 23 1 2 1 20 1 1 22 13 1 26 7 1 1 1 4 2 8 1 12 2 21 1 1 22 8 1 1 19 1 19 5 13 13 15 5 1 11 17 22 19 1 2 31 5 1 1 27 1 1 1 1 26 25 2 1 1 30 1 25 1 21 34 14 1 29 19 4 17 14 22 1 35 4 1 1 7 17 1 14 22 12 ...

result:

ok accepted

Test #83:

score: 0
Accepted
time: 16ms
memory: 5888kb

input:

5106 7506
2203 2553
74 3604
3894 4857
1309 3814
689 3836
799 1414
2645 4186
3539 4357
1215 3206
18 1946
255 4807
570 760
2147 3286
4612 4860
292 3549
3190 5078
1206 5043
230 4696
740 4440
1766 2742
1555 4789
23 43
1585 4071
1312 3593
2431 4999
1069 1987
581 3444
4630 5060
40 760
1831 2287
1206 2790
...

output:

32 1 1 14 4 16 26 1 4 22 1 2 1 25 1 17 1 33 9 6 17 32 1 24 1 1 16 1 25 20 26 23 1 16 30 11 14 18 1 17 1 18 14 17 17 1 7 23 1 28 23 17 4 21 1 1 3 14 16 1 35 2 2 1 41 1 33 27 18 37 2 1 1 9 26 1 1 35 23 16 1 28 13 1 22 1 18 7 1 17 36 22 18 13 8 23 13 1 1 1 1 36 34 1 1 16 16 14 43 1 15 1 1 1 1 1 35 1 2 ...

result:

ok accepted

Test #84:

score: 0
Accepted
time: 16ms
memory: 5980kb

input:

5306 7806
108 3527
2459 5250
2995 3535
801 1038
1429 2809
1900 3252
255 759
692 1939
508 2347
364 2020
242 5212
329 3297
4689 5259
1392 4921
2189 2217
739 1041
110 5158
154 2283
1072 2247
1311 1626
647 3963
763 4969
1395 2257
1561 3321
633 1395
30 364
2992 5161
1569 1878
872 1648
1067 3652
880 1900
...

output:

1 3 6 7 1 15 5 1 1 21 1 12 31 2 18 1 1 25 33 11 21 1 26 24 18 16 4 1 1 12 24 39 26 1 19 1 3 12 19 20 24 19 33 1 1 34 14 7 5 26 19 1 1 1 1 15 22 1 33 25 25 1 2 2 13 1 2 7 1 37 1 1 19 2 1 1 32 28 1 1 1 1 16 1 1 1 1 21 1 32 2 2 1 1 28 26 1 11 13 17 1 14 28 26 27 2 1 16 35 1 10 1 34 15 1 13 16 15 19 1 2...

result:

ok accepted

Test #85:

score: 0
Accepted
time: 12ms
memory: 6048kb

input:

5330 7830
2125 5242
90 2315
704 1885
3374 3691
1274 4632
692 4517
344 1040
1013 1948
1149 4884
2604 4971
2957 4425
3004 3443
1487 3782
2913 4608
115 1800
227 1132
4145 5186
4258 5267
2181 3318
1619 4940
1256 2127
2320 4633
692 4852
1823 4759
1895 3517
3448 3888
517 1956
1565 2283
517 4218
883 1883
1...

output:

14 1 1 1 19 13 3 26 18 20 11 4 1 1 1 1 1 18 1 26 1 1 1 10 35 22 27 10 35 1 23 1 1 1 30 5 1 1 27 27 1 19 8 1 23 9 1 19 15 5 1 14 1 12 21 28 1 2 1 1 16 1 1 15 18 1 35 1 9 37 18 1 31 37 13 4 13 20 2 1 13 1 1 34 17 15 19 3 1 20 1 1 7 1 6 32 25 6 1 33 1 6 1 36 34 25 1 1 15 9 26 1 31 1 1 1 1 16 2 29 16 27...

result:

ok accepted

Test #86:

score: 0
Accepted
time: 15ms
memory: 5828kb

input:

5006 7206
1656 4438
2643 4881
559 4674
192 1053
1410 3407
625 3614
378 3515
2918 4915
517 2912
1757 4741
1943 3211
1012 4861
1725 3070
3326 3515
2204 3977
1024 2319
1338 2783
2731 3311
74 2456
1677 3866
2140 3611
2930 2991
1079 4565
2799 3660
122 1693
276 4103
1884 2736
1031 2567
938 2207
1294 4533
...

output:

2 3 4 21 2 2 10 1 3 9 7 3 6 3 4 3 18 13 10 1 2 1 14 1 1 1 2 1 1 8 1 1 9 7 2 1 1 1 1 18 13 1 14 12 2 4 8 1 4 1 3 11 1 2 10 10 1 13 2 1 11 9 13 1 1 8 4 9 4 10 10 1 12 4 2 3 1 16 4 19 1 1 9 3 10 1 4 1 2 1 1 4 12 11 1 1 2 6 2 2 10 3 10 16 1 10 1 1 1 10 1 9 4 1 1 10 2 1 10 1 1 1 7 2 2 8 1 1 3 3 19 7 1 7 ...

result:

ok accepted

Test #87:

score: 0
Accepted
time: 6ms
memory: 4648kb

input:

2880 4032
274 2051
41 659
2005 2580
1778 2759
301 818
716 2455
274 2398
1586 2780
1102 1192
639 1148
456 1846
637 1619
1076 2129
931 1884
182 203
995 2346
827 1274
1319 2574
2005 2064
2018 2375
379 1393
865 1806
865 2872
2119 2341
1487 2863
51 1173
299 1375
2707 2769
2127 2155
290 569
566 2572
118 6...

output:

7 1 6 8 6 4 3 4 4 1 2 2 1 4 6 1 3 1 4 6 8 2 4 1 1 5 1 2 3 2 1 3 1 2 1 1 5 1 1 4 1 6 1 5 5 5 6 1 4 1 1 2 1 1 1 2 2 1 1 1 6 5 1 1 1 8 1 1 3 2 1 2 1 1 2 6 2 5 1 7 5 3 5 2 2 4 1 1 6 1 1 1 1 3 2 6 2 1 2 2 4 2 5 4 3 1 3 1 1 3 4 2 4 2 1 1 5 5 2 1 3 4 3 1 2 3 3 2 4 3 5 2 7 1 5 1 4 1 3 6 2 1 1 2 3 2 1 1 1 2 ...

result:

ok accepted

Test #88:

score: 0
Accepted
time: 10ms
memory: 4680kb

input:

2880 4032
713 1045
609 2781
1060 2155
1305 1432
342 1177
25 2257
1313 2875
545 1875
765 913
237 1729
14 308
466 467
216 1742
989 2721
570 639
1538 2438
658 1922
398 1794
1782 2182
1177 1608
900 929
988 1755
381 1632
1282 2044
2381 2629
2037 2420
502 1045
135 1379
1302 1542
971 2692
1805 1891
978 110...

output:

5 3 2 5 6 1 3 7 3 1 1 2 1 1 1 3 3 4 5 1 5 2 1 3 1 1 6 7 1 3 2 1 4 7 2 1 1 8 3 4 2 2 2 1 6 3 1 2 1 4 4 4 1 3 4 8 6 1 2 2 1 1 3 2 1 3 4 3 3 3 5 1 5 1 1 6 2 1 1 4 4 4 3 1 1 5 8 3 1 5 4 1 2 5 1 1 1 4 5 5 7 1 5 1 2 2 1 7 1 1 1 5 2 6 1 1 3 1 4 1 1 2 1 3 5 7 1 2 1 1 1 1 1 2 5 3 6 3 7 1 1 1 5 5 4 2 2 1 1 4 ...

result:

ok accepted

Test #89:

score: 0
Accepted
time: 8ms
memory: 4484kb

input:

2496 3648
881 907
738 1029
948 2152
1032 1399
1603 1874
447 2186
700 729
429 1841
1856 2473
153 2007
67 1711
368 2473
1263 1368
548 1779
1538 2066
1007 1147
1630 2097
119 1297
1963 2121
1575 2272
1891 2247
890 2039
429 609
1297 1665
367 1400
1923 2021
1175 1258
1023 1925
759 1826
828 1175
578 1480
2...

output:

2 3 1 5 5 3 1 1 1 3 1 5 3 1 1 1 1 5 1 1 6 1 3 2 4 4 5 2 2 4 3 1 3 2 3 3 2 2 2 5 6 2 5 3 2 1 1 5 5 4 3 1 5 3 1 4 4 4 5 1 4 1 3 4 2 1 1 4 3 3 1 2 7 1 7 1 2 2 6 1 1 1 2 1 2 2 1 6 6 4 4 5 3 4 3 2 4 3 8 2 1 6 5 2 1 4 4 3 1 1 1 1 2 4 3 3 3 2 1 5 5 4 5 3 1 2 4 2 1 4 6 1 6 1 4 1 4 4 1 5 1 3 1 3 3 2 1 2 3 1 ...

result:

ok accepted

Test #90:

score: 0
Accepted
time: 4ms
memory: 4556kb

input:

2496 3648
1114 2437
874 1679
1458 2376
1818 1928
565 1720
240 1098
322 2087
651 1565
357 1610
320 1078
235 729
34 2308
264 800
1308 1427
333 1143
1499 1855
1130 1558
1832 1994
534 805
331 2114
1990 2217
1055 2096
151 1640
877 1969
1554 2215
1837 2474
468 2373
1434 2169
11 1570
1023 2161
55 2495
26 1...

output:

4 4 2 4 4 1 3 1 1 2 4 6 3 3 1 1 8 4 1 6 4 1 1 4 5 2 1 1 3 3 2 2 2 7 1 2 6 3 4 1 5 1 3 1 1 3 3 1 1 6 1 6 2 1 5 4 3 4 4 1 1 2 4 2 3 1 3 1 4 9 1 2 4 5 2 6 1 2 3 6 1 6 1 2 3 4 5 4 2 1 1 5 2 4 1 1 6 2 1 5 2 5 1 4 5 2 3 1 2 3 1 3 6 5 1 7 1 2 1 3 4 5 5 3 3 1 3 2 1 5 1 1 4 4 1 1 2 1 5 1 2 4 5 5 2 2 4 3 1 3 ...

result:

ok accepted

Test #91:

score: 0
Accepted
time: 6ms
memory: 4780kb

input:

4094 5117
790 2907
3216 4028
2442 2460
1094 4030
1548 3460
2226 2290
993 1814
1592 1791
1011 3833
1736 2155
168 1834
738 3990
1683 2970
2034 2550
423 3013
960 1316
130 2039
2351 2718
9 2376
2701 3801
3697 3923
17 2874
5 1506
1250 3639
1417 2966
1 1914
894 2457
836 3220
1030 4068
238 3319
845 1500
93...

output:

2 2 1 1 3 2 2 2 3 2 1 1 1 1 3 3 2 3 2 1 2 1 1 2 2 2 3 2 1 1 1 2 2 1 1 1 1 2 3 3 3 2 1 3 2 1 2 2 3 2 2 2 1 2 2 1 2 1 3 1 2 2 3 1 1 1 2 3 2 3 2 1 2 3 3 1 3 2 2 1 2 1 1 1 3 3 1 2 1 2 3 2 2 3 2 1 1 2 2 1 1 2 3 1 3 2 2 1 2 3 1 2 3 1 2 1 2 1 1 1 3 1 1 3 1 1 3 2 2 1 3 2 1 1 2 2 3 1 1 1 1 2 2 3 2 1 3 2 3 3 ...

result:

ok accepted

Test #92:

score: 0
Accepted
time: 6ms
memory: 4716kb

input:

4094 5117
1746 4080
631 3599
162 383
2789 3200
214 2735
2470 2512
2396 3557
2600 3634
94 385
853 1028
248 2600
119 4053
3238 3886
290 825
141 3047
107 2318
1039 3392
336 2689
2565 3141
294 3335
1100 2239
72 459
776 1685
1825 1976
169 294
2591 3443
774 2696
436 2857
2946 3896
3005 3782
3432 3699
1037...

output:

1 3 2 1 1 1 3 2 3 1 1 1 1 2 3 2 1 2 2 1 1 2 2 1 3 1 3 2 2 2 3 1 2 1 2 2 2 1 1 1 2 2 1 1 1 1 1 2 2 2 2 3 2 2 1 1 1 1 3 3 1 1 1 1 1 3 2 1 1 3 2 1 1 2 2 2 1 1 2 1 1 3 1 1 1 2 1 1 1 2 1 2 2 2 2 3 1 2 1 2 1 2 1 2 3 2 2 2 2 1 1 2 2 1 2 3 1 2 1 1 1 1 1 1 2 1 1 1 2 2 2 2 3 2 2 3 3 1 1 3 2 3 2 1 1 1 3 2 2 1 ...

result:

ok accepted

Test #93:

score: 0
Accepted
time: 10ms
memory: 4768kb

input:

4094 5117
732 2622
47 3291
2243 4022
31 3945
677 2613
2187 2914
1647 2753
2196 2436
155 1966
607 1833
2528 2563
1919 3092
134 512
633 1637
1351 1848
19 246
2321 3771
1388 1555
463 2899
2947 3641
3184 3323
209 2287
977 3774
3540 3983
1199 3877
2012 2726
1677 3773
987 3048
3222 3502
1597 3568
3390 359...

output:

2 1 2 1 1 1 1 1 1 2 1 3 2 2 3 2 2 2 1 1 1 1 2 1 2 3 2 2 1 2 3 1 2 1 1 1 1 1 3 2 3 1 3 1 3 2 3 2 2 2 1 2 3 3 3 1 1 1 2 1 2 3 1 3 3 2 2 2 3 3 1 1 3 2 3 1 2 1 1 1 3 2 1 1 1 3 2 3 1 1 1 3 1 1 1 1 1 3 3 1 1 3 3 3 2 2 1 2 1 1 3 1 3 2 2 1 1 3 1 2 2 1 2 3 1 2 1 1 2 1 3 1 1 1 3 1 1 1 2 2 2 2 1 1 2 3 3 3 2 1 ...

result:

ok accepted

Test #94:

score: 0
Accepted
time: 6ms
memory: 4808kb

input:

4094 5117
2360 2913
2799 3896
785 3717
1631 4068
679 914
760 830
1816 2201
1519 2357
1955 2533
1994 3577
900 957
769 2983
201 1813
1760 2736
1851 3076
1404 2282
2195 2850
1482 2087
163 3324
113 3447
1051 3911
3396 3903
854 2917
570 2220
2352 2656
1133 1420
2990 3527
2086 3601
2249 3840
2189 3877
276...

output:

2 1 2 2 1 1 2 1 2 1 3 1 1 1 1 2 2 2 1 1 2 2 3 1 3 1 3 2 1 1 2 2 3 3 2 2 2 2 3 2 2 1 2 2 2 1 1 1 1 1 2 1 1 3 2 1 2 3 2 1 2 1 3 2 3 1 2 2 3 1 1 2 1 1 2 1 1 1 2 1 1 1 2 3 2 2 1 2 2 1 1 1 1 1 2 1 2 1 1 1 1 2 3 1 1 2 1 1 2 3 2 2 1 2 1 1 2 1 1 1 1 1 2 3 1 2 1 1 2 3 1 2 2 1 1 1 1 3 2 1 1 1 1 3 2 2 1 1 3 2 ...

result:

ok accepted

Test #95:

score: 0
Accepted
time: 10ms
memory: 4744kb

input:

4094 5117
591 663
2135 3803
3323 3335
2485 3571
1172 3797
1412 2710
1731 3530
2312 2888
103 439
3118 3458
2983 3261
485 3528
3377 4026
2 1124
183 1581
331 1532
509 1440
388 949
390 3743
1210 1273
862 2436
1347 4069
1362 4075
384 2639
2744 3848
1135 2973
531 781
346 3970
1913 2889
157 999
1096 3169
1...

output:

2 2 2 1 2 2 3 1 1 1 2 2 3 2 2 1 2 2 1 1 1 1 2 1 1 2 1 1 3 1 2 2 2 2 1 1 2 2 2 2 2 3 2 1 2 2 2 2 2 2 2 1 2 2 3 2 2 2 2 2 1 1 2 1 1 3 2 3 1 1 1 2 2 3 1 1 1 3 3 1 2 1 1 3 2 1 3 3 2 1 1 2 2 3 2 2 1 1 1 2 3 1 2 3 2 3 2 3 1 2 1 1 3 3 1 1 2 2 2 3 2 2 2 2 1 2 2 3 2 1 2 2 1 3 1 2 2 2 2 2 1 2 1 2 1 1 2 3 2 1 ...

result:

ok accepted

Test #96:

score: 0
Accepted
time: 6ms
memory: 4312kb

input:

1748 2467
27 663
608 995
216 1724
342 1449
933 1300
1124 1203
121 1081
959 1474
425 1065
973 1586
226 1378
730 1154
789 884
621 1180
260 289
235 1456
382 693
614 1017
1096 1456
642 1194
724 1228
141 1390
823 1661
158 780
44 385
149 319
898 1485
100 503
854 1249
434 1706
178 1057
427 846
118 273
741 ...

output:

1 3 1 1 2 3 5 1 2 1 1 2 1 4 1 1 1 1 3 4 2 2 3 1 4 2 2 1 2 2 2 1 4 3 1 5 5 3 2 3 2 2 4 2 2 4 1 4 4 4 4 2 2 1 1 1 2 3 5 2 3 4 1 2 2 3 4 4 3 2 2 4 1 1 1 2 1 2 2 1 2 5 1 6 1 1 2 5 2 4 4 1 3 1 3 1 2 1 1 4 2 2 3 1 1 1 1 2 4 2 1 1 1 4 1 2 3 2 1 2 5 1 1 1 2 4 3 6 1 3 1 1 3 4 1 2 1 4 2 5 1 5 4 5 1 3 2 2 1 2 ...

result:

ok accepted

Test #97:

score: 0
Accepted
time: 6ms
memory: 4268kb

input:

1748 2467
203 365
970 1478
289 782
445 1495
1343 1651
1022 1352
558 1427
291 425
450 851
887 1328
292 1007
1041 1431
279 337
148 776
578 1408
46 252
717 1737
854 1166
31 312
999 1445
966 1108
997 1162
359 577
546 1232
982 1633
551 1009
760 1350
1407 1502
1119 1320
14 1711
792 854
392 1307
542 805
10...

output:

5 1 4 1 2 2 1 2 1 3 1 2 3 3 1 1 2 2 1 1 4 3 1 4 3 1 1 1 1 3 4 1 1 2 2 5 5 2 2 2 3 1 4 1 1 1 1 1 2 1 1 1 1 1 3 3 1 3 5 1 1 3 2 1 4 2 2 2 2 2 2 2 1 1 1 1 2 6 1 1 2 3 2 2 1 2 4 3 1 1 1 4 1 1 4 6 1 1 3 6 1 5 2 3 4 1 1 3 2 2 2 2 6 1 1 2 1 2 1 2 1 1 1 2 1 2 3 2 1 1 1 5 5 4 2 2 1 1 1 2 2 2 4 2 1 1 3 2 3 4 ...

result:

ok accepted

Test #98:

score: 0
Accepted
time: 16ms
memory: 5768kb

input:

5554 7904
3264 4958
2397 5370
775 5234
2745 4122
544 837
1035 1534
1088 5338
3651 3704
684 707
1476 4623
371 1144
1993 3704
2976 3209
4605 5018
1530 3673
1551 3617
4920 4989
1915 4725
1216 4937
727 5007
1591 1924
4231 4241
1264 2619
552 2050
332 2564
5231 5431
3144 3760
321 1127
5218 5476
644 917
28...

output:

1 1 1 2 1 1 1 2 1 2 2 3 2 2 2 2 2 4 3 2 1 1 2 2 1 3 3 2 2 1 5 5 1 4 5 4 1 1 1 3 4 5 1 1 3 2 1 1 4 1 1 3 6 3 2 2 1 1 5 2 6 1 1 1 1 1 3 4 1 4 3 2 1 1 4 3 1 1 1 4 1 2 1 2 1 2 1 1 4 2 1 2 3 1 2 4 6 1 5 3 1 2 1 5 4 4 1 1 1 3 1 3 3 2 4 2 3 2 3 5 3 1 6 1 4 5 1 3 2 4 1 1 1 3 2 4 1 2 1 5 2 1 4 3 2 1 4 2 2 5 ...

result:

ok accepted

Test #99:

score: 0
Accepted
time: 2ms
memory: 4192kb

input:

1748 2467
547 1049
1067 1513
319 1015
300 816
34 546
141 1232
409 513
168 997
2 1442
232 273
754 925
934 1444
553 1075
1331 1652
299 1171
1136 1398
680 1137
228 1377
854 1322
1406 1620
62 1368
31 796
83 1511
671 1581
53 1576
264 985
33 1555
613 1535
232 640
298 1655
1223 1561
464 1514
29 434
195 991...

output:

2 5 4 3 2 2 1 2 4 3 1 1 1 1 1 1 2 2 1 1 2 1 2 1 1 1 1 1 4 2 1 2 1 2 1 3 1 1 3 4 1 1 2 3 2 4 6 2 1 1 2 4 2 1 4 1 1 1 3 1 1 1 4 4 2 1 5 4 2 1 4 1 2 2 1 5 2 3 4 2 1 2 1 2 1 1 2 1 2 1 1 3 1 3 2 4 1 4 5 2 3 1 1 1 3 1 3 4 1 1 3 5 2 3 2 4 2 4 1 2 2 2 1 1 4 3 5 1 3 1 1 1 1 3 4 5 2 4 4 1 1 1 6 1 1 2 1 2 4 4 ...

result:

ok accepted

Test #100:

score: 0
Accepted
time: 6ms
memory: 4208kb

input:

1748 2467
663 841
1279 1497
34 883
379 1330
1174 1247
1183 1692
28 98
70 1354
525 1511
680 888
746 1072
1442 1690
42 65
430 1517
620 785
407 1028
971 1001
837 1256
429 517
808 1413
644 1565
452 611
460 1467
168 669
689 1380
15 1733
342 820
900 1366
566 1021
265 337
49 610
466 1706
297 1636
734 961
2...

output:

1 5 2 1 1 3 3 1 5 1 2 3 1 4 2 1 2 3 1 1 1 5 4 1 1 2 1 4 2 1 1 1 2 1 1 2 6 1 4 1 1 2 2 2 1 1 3 3 1 3 2 5 2 2 1 2 4 2 1 1 1 3 2 5 1 2 4 2 2 3 6 3 1 1 1 1 1 1 3 1 1 2 4 1 5 4 2 4 3 2 3 1 2 1 2 2 2 2 2 3 2 4 2 4 4 1 2 3 2 2 2 6 3 3 1 2 1 1 5 2 2 1 2 3 3 1 1 2 2 1 4 2 4 2 1 1 1 1 1 2 1 2 5 1 4 3 1 3 1 1 ...

result:

ok accepted

Test #101:

score: 0
Accepted
time: 1ms
memory: 4200kb

input:

1748 2467
583 1381
182 322
192 1021
838 1082
280 995
822 1586
93 338
1313 1630
348 1569
696 838
571 1549
155 693
308 763
828 1614
709 1168
1156 1673
129 458
386 1207
489 1704
68 1053
1214 1545
129 1115
593 967
894 1240
1578 1705
99 1713
314 799
227 1585
274 1511
785 1214
54 270
361 1575
712 831
839 ...

output:

3 3 2 1 6 4 5 1 2 4 2 3 2 5 4 3 3 2 1 2 5 1 1 1 2 1 3 1 2 3 6 1 2 1 1 5 2 1 3 4 4 5 1 1 1 1 3 3 1 3 1 1 4 1 1 4 1 1 2 1 1 1 1 3 4 2 4 1 1 3 1 2 1 2 2 2 1 5 1 1 3 3 3 1 2 3 4 1 1 1 2 4 3 1 2 1 5 1 2 1 3 1 3 6 4 3 2 2 3 1 2 1 2 5 2 1 6 2 1 2 2 4 3 6 3 1 1 5 2 1 5 1 2 5 1 4 3 2 2 2 4 7 1 1 4 2 2 6 5 3 ...

result:

ok accepted

Test #102:

score: 0
Accepted
time: 11ms
memory: 4960kb

input:

4096 6142
2311 3854
766 3200
414 1836
277 1773
2335 2363
1260 3646
1057 1894
1348 3895
2425 2626
1142 2763
324 3968
454 3540
1048 3671
766 2495
1650 2424
764 2975
766 1526
277 3135
2776 2788
2257 3572
277 1502
277 4030
1674 2182
277 1959
1833 3299
2245 2957
2162 2885
174 277
969 2901
360 766
1823 19...

output:

2 378 6 687 3 45 2 2 73 2 1 2 2 267 1 1 182 568 82 1 106 46 65 218 1 2 1 45 2 181 2 330 2 1 567 1 1 184 1 2 33 1 1 566 542 541 565 175 269 564 1 2 14 1 129 1 2 563 540 539 171 538 537 536 86 219 108 60 2 18 2 1 92 1 3 2 1 158 61 2 1 2 191 562 5 2 1 38 33 74 561 535 534 104 2 1 2 99 2 560 1 533 156 2...

result:

ok accepted

Test #103:

score: 0
Accepted
time: 10ms
memory: 4988kb

input:

4096 6142
2358 3071
3011 3076
357 4026
2647 2904
2015 2795
1717 3595
361 1234
905 2676
932 2992
2451 2556
1351 2891
244 488
1984 3192
1729 3474
3588 3765
1757 2599
2567 3595
401 1172
281 2777
904 3255
2023 3835
935 3595
3240 3450
2362 2992
176 476
2550 3149
1757 2900
894 3814
2888 3610
372 3856
1388...

output:

1 101 30 1 7 413 180 1 1 1 1 1 21 1 1 364 195 16 1 2 15 372 2 2 1 219 553 1 2 2 1 238 120 243 247 93 552 551 138 1 4 550 441 334 1 549 335 2 2 439 1 33 1 312 48 1 1 1 1 2 1 434 2 450 448 1 2 1 449 1 170 2 1 548 261 1 547 1 2 133 184 454 65 216 94 546 2 77 1 295 44 2 2 100 1 5 461 1 289 1 1 431 422 1...

result:

ok accepted

Test #104:

score: 0
Accepted
time: 11ms
memory: 5000kb

input:

4096 6142
1170 3885
1090 3302
2111 2784
418 3658
444 3532
865 4022
439 1670
439 941
1622 3500
439 503
1412 1662
1504 3932
1211 3039
1056 3736
2635 3202
506 3892
837 1791
1020 1135
3251 3358
654 2252
1435 3240
25 2252
275 2252
104 2502
1575 2243
2252 3598
709 1265
2004 2163
1368 2526
439 864
205 3237...

output:

2 229 1 2 1 1 680 561 1 560 204 1 1 1 2 2 1 1 2 169 1 568 156 3 65 148 1 1 1 559 1 240 1 1 2 349 52 1 558 1 216 557 22 1 567 75 1 208 184 87 1 1 18 2 2 64 1 346 1 1 1 46 1 238 1 180 2 38 142 1 77 344 556 347 1 1 555 1 2 49 566 2 28 554 115 116 191 1 70 1 1 553 284 2 2 1 1 55 565 564 357 144 2 2 1 1 ...

result:

ok accepted

Test #105:

score: 0
Accepted
time: 11ms
memory: 5144kb

input:

4096 6142
511 3111
2485 3036
3036 3656
3111 3335
2040 2647
2516 3036
3036 3686
1801 3349
400 1582
2560 3998
2551 3036
1343 3861
1149 4092
2472 3934
3835 3920
638 2567
671 4028
3111 3907
1567 2207
357 1651
773 2059
805 1187
168 2775
819 1995
769 1247
1021 3036
1243 2078
545 3111
1615 3036
63 834
2555...

output:

393 653 537 558 1 334 327 186 3 2 156 1 1 2 28 2 2 196 2 1 1 2 100 1 1 536 2 46 158 1 47 535 2 314 2 1 3 1 2 1 54 2 345 194 1 163 534 2 1 557 1 533 1 1 153 532 2 1 1 2 279 1 287 2 211 1 281 103 531 2 180 2 1 1 1 2 2 1 1 556 16 30 2 65 104 530 555 1 1 9 130 1 22 2 186 529 99 528 2 554 2 527 513 1 19 ...

result:

ok accepted

Test #106:

score: 0
Accepted
time: 11ms
memory: 4908kb

input:

4096 6142
3326 3857
508 964
3084 3231
978 1588
2106 2609
2106 3600
906 2071
183 3084
3588 3750
2106 4023
3084 4033
674 1529
1227 3084
728 3697
584 2940
233 2106
1264 2086
2595 3084
115 3084
981 3882
212 2106
3084 3400
44 312
2620 2670
383 486
1248 4040
94 2106
3621 3733
2106 3395
2106 2823
630 2965
...

output:

2 2 389 2 394 114 139 225 3 390 226 2 227 1 2 411 17 563 228 84 412 562 1 1 1 5 413 39 414 190 2 561 1 2 62 11 165 258 445 168 1 2 1 1 301 244 2 30 1 2 2 286 2 453 2 129 87 461 142 1 560 2 1 1 6 1 2 2 2 110 79 2 50 300 2 559 2 92 2 2 120 290 558 361 1 2 113 49 133 381 369 1 229 172 2 335 2 106 5 149...

result:

ok accepted

Test #107:

score: 0
Accepted
time: 10ms
memory: 5148kb

input:

4096 6142
2442 3579
1412 3249
1459 2456
1022 2990
3249 3950
3325 3590
1560 1828
678 1746
2783 2878
457 2456
1890 2625
3249 3934
860 2418
3456 3812
1157 2456
3542 3599
295 3249
421 1829
2365 3564
2456 3575
2447 3249
1978 3601
1919 2493
2105 2463
1031 1661
870 2681
2456 3753
421 3249
789 2219
303 3249...

output:

2 440 231 1 203 1 2 128 2 11 150 442 2 4 443 1 445 1 1 417 76 1 1 2 225 57 471 31 1 449 193 55 474 2 13 174 2 2 1 1 1 1 2 1 1 1 43 1 451 78 2 1 488 54 1 1 137 281 447 2 1 1 195 40 262 20 80 35 508 464 46 1 263 1 182 17 208 11 521 1 1 483 481 1 1 61 157 2 2 369 22 12 113 2 41 1 1 1 485 2 2 368 1 1 1 ...

result:

ok accepted

Test #108:

score: 0
Accepted
time: 13ms
memory: 5504kb

input:

5448 8170
1255 1724
1485 2151
3319 3431
2089 2421
1313 4594
2151 2849
157 4621
630 2151
2151 4359
9 2391
2867 4621
1918 3610
2151 4373
1030 4621
2151 3539
2008 2151
4455 5448
2151 2602
1823 4850
1296 5350
2151 5151
4240 4621
419 1300
745 4200
2151 5251
1100 4621
3348 4662
961 2579
1789 4621
2521 461...

output:

25 253 167 1 10 58 326 425 284 14 103 24 285 206 286 610 149 614 1 71 621 716 4 12 426 717 140 2 287 233 569 2 1 427 1 575 287 289 98 1 338 288 1 2 1 2 582 2 583 2 1 2 2 1 178 69 52 1 718 587 151 2 2 1 17 2 2 2 166 2 2 1 86 210 290 268 1 291 1 2 428 2 593 2 651 2 30 1 44 281 336 1 340 61 115 2 654 2...

result:

ok accepted

Test #109:

score: 0
Accepted
time: 13ms
memory: 5560kb

input:

5448 8170
1263 1939
485 1582
1133 1855
1939 1978
1588 4235
732 2821
1751 2795
485 1947
1939 3952
164 485
295 4481
1774 5224
2379 4905
738 3031
272 3263
119 1851
1650 2341
1588 1601
5148 5201
485 1418
521 2356
1731 4342
485 2335
485 4350
1457 3483
4557 4959
645 3452
1346 2222
3727 4889
478 4955
183 4...

output:

42 236 2 725 83 1 2 707 726 320 1 2 7 5 2 2 1 2 1 708 173 313 386 178 105 2 282 1 1 114 2 67 3 2 1 727 1 2 2 106 223 1 2 2 88 728 2 381 1 729 148 1 95 2 222 277 709 8 710 1 47 711 186 123 267 216 79 98 1 1 730 262 440 1 1 1 59 2 289 731 712 198 1 45 433 1 732 23 92 2 23 1 188 2 713 1 2 2 1 2 91 173 ...

result:

ok accepted

Test #110:

score: 0
Accepted
time: 4ms
memory: 5556kb

input:

5448 8170
3776 5172
3040 4931
3165 3887
694 4931
3954 4212
2499 3042
1277 2234
4641 5170
600 3119
3514 4523
3634 4931
208 1141
2223 4212
245 5112
137 4481
2322 4693
1396 5317
1003 4931
3238 4931
940 4212
246 4212
197 4623
1346 2157
3820 3959
825 3517
371 1599
402 3709
754 3259
2641 4212
3734 5035
31...

output:

1 875 1 706 33 28 1 2 3 2 707 2 722 2 1 309 1 708 61 723 724 2 2 1 1 87 1 1 144 20 1 2 709 725 1 455 98 1 1 2 726 2 1 727 111 34 1 1 72 1 710 711 2 287 138 2 2 1 288 1 2 32 1 712 2 63 713 705 289 1 1 1 23 184 36 85 715 2 2 1 728 729 1 114 716 2 1 48 1 717 721 459 290 1 2 1 291 1 127 2 1 1 718 22 1 1...

result:

ok accepted

Test #111:

score: 0
Accepted
time: 13ms
memory: 5548kb

input:

5448 8170
4045 5029
275 4337
957 4045
1806 2140
2742 4298
531 2140
630 2555
1476 4681
593 2125
2314 2790
1895 4045
1244 3856
564 3850
4045 4666
2665 4098
725 791
575 1063
2459 3786
1023 2517
273 2381
5072 5298
1438 4659
4045 5366
617 2140
376 5139
1758 4045
1181 4596
268 4405
1351 2310
1142 4045
175...

output:

146 2 723 879 2 716 1 1 62 1 362 2 3 724 34 1 140 2 2 2 2 2 77 717 1 48 1 2 1 34 725 1 726 1 2 1 248 1 185 331 247 12 727 404 25 2 68 194 23 41 2 1 72 2 48 118 6 2 210 2 2 53 2 1 1 2 718 2 2 377 115 2 242 728 2 719 1 71 1 1 729 720 2 721 319 285 67 730 1 465 1 2 731 30 27 2 2 227 1 1 93 2 2 310 169 ...

result:

ok accepted

Test #112:

score: 0
Accepted
time: 14ms
memory: 5624kb

input:

5448 8170
118 4442
1299 3982
1299 1517
1082 3897
3261 3804
4110 4772
1216 3568
881 2572
1680 4959
711 946
2222 4442
1421 4442
520 4442
4442 5349
2710 3370
2641 4442
380 4048
1422 4924
1299 4838
3611 4442
2643 2847
2405 3017
309 1299
1299 2337
1486 4533
1794 3054
3001 5260
2424 4240
4296 5238
1299 14...

output:

253 370 729 12 1 73 2 2 18 14 314 706 707 42 1 708 2 1 315 709 2 184 730 421 1 1 2 2 17 731 2 31 1 1 1 155 285 34 2 202 335 1 1 200 114 253 2 13 284 283 1 2 3 2 248 1 48 2 1 34 2 281 2 2 197 115 2 17 302 115 1 145 168 710 1 25 338 315 1 308 1 711 1 455 2 732 2 1 2 1 1 31 733 115 2 111 1 2 2 196 734 ...

result:

ok accepted

Test #113:

score: 0
Accepted
time: 10ms
memory: 5672kb

input:

5448 8170
1678 4795
756 2740
1919 2033
3899 5319
668 2349
449 4600
502 546
1919 2622
1919 2350
853 5014
539 3536
704 2349
1913 2265
236 1304
2349 5121
1618 3655
721 4693
1956 5435
526 5236
1572 2349
291 650
3019 5067
1194 4335
806 5185
1998 3229
293 5288
2878 5102
2343 4471
3700 4824
1795 2349
2349 ...

output:

1 1 560 1 56 2 2 736 737 92 1 709 1 2 378 2 64 1 2 335 1 1 1 1 1 2 1 32 2 710 95 167 1 1 2 8 112 346 371 65 187 738 314 2 442 457 739 1 740 2 1 278 143 1 741 75 2 54 1 12 2 1 2 82 2 2 31 1 204 1 2 1 2 742 25 402 444 711 331 2 743 2 1 712 713 1 1 374 1 2 304 2 52 1 1 2 2 1 5 2 1 388 1 1 263 2 1 714 1...

result:

ok accepted

Test #114:

score: 0
Accepted
time: 7ms
memory: 5512kb

input:

5448 8170
2416 4341
2186 4812
561 959
1140 1365
1377 2888
2186 2778
2183 3810
786 5273
948 3184
1260 4417
1460 5273
1064 4967
4289 4421
2186 2815
1612 2024
2711 3556
2302 2595
2655 4469
453 5273
4431 5104
1248 5273
2186 2373
4231 5273
1914 3814
599 2701
3657 3783
1990 3103
933 2664
747 1036
369 3305...

output:

1 340 1 1 1 262 1 397 1 1 281 2 2 714 1 83 1 2 592 2 334 715 595 2 142 1 2 36 90 1 333 20 2 599 1 83 619 1 9 2 2 2 1 1 14 1 1 1 1 392 1 2 1 2 351 2 569 716 391 109 53 1 2 1 1 1 1 1 122 339 2 1 1 2 2 59 2 417 1 320 717 27 6 390 165 582 388 606 64 1 330 2 385 1 2 2 1 1 42 1 1 48 344 41 1 55 328 325 67...

result:

ok accepted

Test #115:

score: 0
Accepted
time: 14ms
memory: 5608kb

input:

5448 8170
1425 2806
1458 2959
928 4234
3485 4010
5170 5396
2447 3429
3249 4666
32 2903
2703 5236
2229 3593
92 1155
212 3146
935 1576
3697 4234
32 4024
1965 5396
1019 3361
1206 5180
1584 5396
2381 4312
472 1255
3889 4386
4 2954
50 2981
3506 5142
2200 3637
2231 5313
3666 5020
378 3575
845 5396
1640 38...

output:

1 1 122 1 417 1 2 17 1 80 1 1 1 48 1 726 2 1 727 1 1 1 2 2 108 1 2 5 61 238 84 1 599 1 200 1 728 729 35 143 1 452 1 83 730 731 732 612 1 257 2 2 1 2 614 326 615 124 2 563 733 2 2 113 88 1 569 1 1 1 2 1 60 235 1 1 45 1 1 577 1 31 725 314 583 1 1 1 1 1 418 40 735 10 45 1 1 23 736 2 737 419 1 738 1 1 1...

result:

ok accepted

Test #116:

score: 0
Accepted
time: 13ms
memory: 5588kb

input:

5448 8170
240 374
723 4337
2378 2575
1766 4310
888 1371
2142 2575
1371 4373
3822 4406
2609 4580
2853 4897
1371 3648
1279 1492
691 1126
793 4588
200 4438
1220 4668
2575 5361
1371 5292
1709 2552
1321 1458
916 2629
2176 4589
1502 3137
2575 5238
1337 2391
2090 4963
1220 4920
2797 3961
2499 3028
1008 137...

output:

2 1 896 1 91 722 738 2 1 2 739 2 1 1 1 47 91 409 1 17 1 1 12 162 1 4 1 15 1 740 2 1 1 14 1 242 741 2 38 39 723 321 1 207 42 1 1 1 2 1 110 252 2 450 2 1 1 1 1 742 109 2 234 12 2 27 1 71 724 422 1 1 340 174 2 725 1 743 2 192 744 236 177 1 745 340 1 120 178 60 2 1 1 1 2 2 726 1 1 46 2 259 2 2 2 2 25 1 ...

result:

ok accepted

Test #117:

score: 0
Accepted
time: 9ms
memory: 5608kb

input:

5448 8170
3432 4467
1292 4501
3291 4153
3154 3929
4055 4153
2844 3077
2368 3130
978 4763
1440 2844
2685 4153
2844 3418
4153 4491
1048 1922
1959 4153
3207 5409
710 4153
4153 4531
2244 3178
2366 3804
1601 2849
3745 3838
2672 2678
4085 4498
3209 5084
3309 5039
819 1860
210 4831
1286 2844
616 2526
337 9...

output:

2 316 279 1 717 792 2 1 47 718 597 294 1 312 1 719 322 1 1 2 303 1 2 4 16 1 1 606 1 149 251 286 1 1 1 1 720 404 19 303 1 1 2 1 421 2 1 28 721 21 1 1 2 612 613 416 254 6 2 2 1 1 244 76 1 579 569 50 575 1 165 1 2 237 580 2 1 227 23 417 1 81 1 587 1 722 421 1 1 1 588 1 93 723 1 1 137 80 1 66 51 278 271...

result:

ok accepted

Test #118:

score: 0
Accepted
time: 10ms
memory: 5704kb

input:

5444 8660
643 1855
2330 3281
807 1295
3281 4277
50 3281
1295 3761
1817 3183
1137 3641
1295 3779
509 5229
272 3095
1283 3458
52 4769
1024 4502
1295 4368
5 5434
1582 3557
971 5249
2318 5430
102 1295
1699 3035
2352 3660
1072 1295
2318 4655
3289 3477
1295 3763
4067 4557
1295 2590
1055 1295
2070 4339
360...

output:

1 340 1009 754 115 99 2 1 556 1 1 1 1 2 584 18 91 243 215 583 1 1 575 146 2 524 2 523 100 1 1 2 521 755 2 164 2 2 257 2 165 576 1 147 756 166 148 107 1 645 632 1 279 276 2 272 219 391 1 2 98 637 757 167 676 168 670 1 1 1 200 1 2 1 609 758 67 55 283 1 216 275 169 282 2 759 760 105 149 2 170 31 1 2 1 ...

result:

ok accepted

Test #119:

score: 0
Accepted
time: 13ms
memory: 5524kb

input:

5444 8660
597 1411
1470 2032
1273 2505
2159 3662
1335 3077
2011 3493
1273 4279
2667 2929
4476 5155
1335 1532
929 5321
1273 5285
1509 5077
1273 4714
1273 3063
76 1273
2677 4546
1775 2501
1509 3337
2056 3353
2701 2799
1401 4735
3493 5168
1335 5265
1509 2399
1273 5003
1347 3181
3566 4946
353 1335
1335 ...

output:

2 1 453 42 458 221 260 93 2 761 2 154 2 261 755 46 1 12 230 32 66 10 149 238 156 756 2 165 762 239 2 757 1 157 2 2 763 758 2 764 64 2 4 262 1 765 759 1 65 1 158 207 44 96 1 1 1 3 2 76 1 159 2 68 2 766 2 41 328 242 17 767 160 768 33 1 1 161 760 45 162 380 244 1 163 125 761 2 762 2 263 264 2 769 1 7 2...

result:

ok accepted

Test #120:

score: 0
Accepted
time: 14ms
memory: 5648kb

input:

5444 8660
1849 5175
616 4864
1471 5175
5063 5175
841 1387
4516 5230
1752 4517
1836 4499
2240 2991
3391 3473
2941 5175
401 3397
3535 5175
1474 4516
1703 4556
1074 4516
1447 1742
1671 5175
1053 1398
2371 4516
1106 1836
4151 4516
1847 2587
909 4153
4075 5070
1836 3005
761 2065
3145 4516
1836 2650
4287 ...

output:

826 2 725 318 144 457 90 1 2 1 726 1 254 84 254 740 1 727 1 43 246 96 27 1 1 166 2 741 167 26 728 186 1 168 2 1 234 2 1 1 2 2 742 1 1 1 22 1 743 2 37 185 284 9 110 729 184 167 2 2 157 1 2 169 214 170 1 135 744 104 67 171 730 9 91 1 731 172 732 173 733 745 29 746 734 747 748 1 108 331 332 1 102 11 72...

result:

ok accepted

Test #121:

score: 0
Accepted
time: 9ms
memory: 5636kb

input:

5444 8660
3405 4344
1885 4617
3344 4344
2224 4992
2318 5005
969 4344
1412 2327
2318 5302
2318 5215
2318 3179
1168 2318
1253 3780
2318 2611
192 565
1937 4344
7 4065
2934 4344
3734 4344
2238 2318
594 3335
1876 4344
2076 4344
1570 1768
1336 2820
2318 4010
673 1099
1885 2180
2869 3183
4327 4966
2784 441...

output:

367 227 733 1 26 370 244 732 733 734 735 2 99 1 734 1 224 117 736 1 30 735 1 157 737 2 153 1 162 28 736 154 2 221 7 1 1 155 51 43 738 739 737 1 740 738 739 1 165 156 1 1 741 1 2 1 731 1 16 743 19 214 740 1 1 1 2 2 2 155 744 340 1 194 745 2 1 746 380 3 1 747 1 1 1 2 157 1 162 2 1 741 158 166 244 748 ...

result:

ok accepted

Test #122:

score: 0
Accepted
time: 8ms
memory: 5600kb

input:

5444 8660
2322 3638
1798 3255
2389 4782
1745 4019
2059 2104
821 4808
579 4167
3082 3647
431 2933
4847 5380
1546 2104
3086 4063
1783 3206
1847 3274
2011 3206
2548 3398
3299 4337
4516 5177
3206 4974
3206 5324
579 2787
48 2933
579 4916
2661 2886
3206 4272
3206 3995
2249 3212
2104 3491
579 1156
1258 442...

output:

1 1 30 20 42 1 242 2 231 71 739 2 461 1 732 2 117 1 733 734 163 156 164 2 735 265 78 740 165 126 39 1 1 21 267 103 1 166 1 741 194 1 66 742 736 1 149 737 157 2 131 738 1 2 743 1 135 73 1 739 158 167 744 740 2 186 2 741 731 1 1 2 81 42 2 2 745 2 1 743 35 168 169 75 1 1 170 746 2 171 747 744 320 745 3...

result:

ok accepted

Test #123:

score: 0
Accepted
time: 7ms
memory: 5644kb

input:

5444 8660
2284 4147
893 1063
1483 3467
1444 2605
2151 2457
1937 3183
2056 2151
3965 4430
2757 3377
2268 2960
3304 4210
127 1717
2284 3989
976 2284
125 2284
1168 1579
2749 5075
1904 3495
1350 2481
4807 5030
1186 1578
1453 1600
1704 2284
3141 4372
1562 5075
1222 1991
231 1553
799 2151
506 2209
364 507...

output:

853 3 1 1 239 92 162 1 1 2 62 1 746 747 19 4 367 1 81 2 1 1 748 250 765 1 2 163 3 766 30 1 749 164 203 767 1 377 1 2 2 200 750 751 1 1 94 2 2 768 752 753 2 1 1 10 94 213 769 362 754 770 1 279 350 10 1 2 1 1 165 2 229 2 1 2 155 2 168 771 1 356 1 156 1 157 166 1 1 2 2 2 167 1 1 1 772 353 1 1 312 57 31...

result:

ok accepted

Test #124:

score: 0
Accepted
time: 4ms
memory: 5612kb

input:

5444 8660
560 715
3716 5077
2583 4928
1929 2167
758 3551
284 2341
3198 4108
958 3140
2593 5181
359 1475
2668 3551
2001 4121
778 1106
2184 3404
416 3786
2341 3623
1285 4020
1836 3551
3513 3551
3153 5193
2341 4292
1951 4179
3061 4926
1629 3348
2341 4167
2341 5387
505 3570
1153 4523
2341 3954
2582 2690...

output:

1 2 2 117 22 390 1 55 250 1 723 2 226 60 2 176 220 279 724 9 296 1 125 2 284 730 1 1 731 228 154 1 2 164 1 155 30 2 732 297 725 19 726 78 2 299 159 733 165 2 1 1 79 1 272 22 163 727 734 735 1 156 728 74 2 2 2 736 1 2 33 2 729 3 730 1 1 2 166 157 2 61 731 179 167 168 2 227 169 41 72 2 732 2 13 2 246 ...

result:

ok accepted

Test #125:

score: 0
Accepted
time: 13ms
memory: 5632kb

input:

5444 8660
41 1596
329 3277
710 1596
329 4163
97 4869
2840 3879
329 3287
3639 4950
1596 1893
329 1123
571 1584
1037 1596
1993 4782
493 4267
2587 3964
329 623
627 2733
620 5203
1596 1789
68 1338
24 419
109 2814
2612 5060
329 4127
202 329
1235 1307
1596 4490
329 1762
1671 4863
1301 4388
398 1141
3531 3...

output:

510 70 746 751 26 2 752 1 747 753 51 748 7 1 1 88 209 20 749 1 1 2 43 754 755 1 334 756 1 1 2 1 15 38 2 2 1 49 2 232 1 11 750 751 2 336 1 752 21 1 1 1 757 230 1 2 2 10 2 33 758 7 1 1 753 372 2 89 759 760 14 1 754 2 1 157 61 1 1 2 230 1 1 2 2 55 158 152 1 761 755 153 75 756 225 2 745 750 1 1 159 1 75...

result:

ok accepted

Test #126:

score: 0
Accepted
time: 10ms
memory: 5624kb

input:

5444 8660
2493 3680
2211 3565
2493 4150
3755 3857
3857 5166
2414 4767
2472 4767
4219 4882
224 534
4547 5057
3461 3857
1094 2218
1840 4964
1220 2088
1419 2196
1220 3992
727 3068
2350 3615
2493 5133
2545 3780
1220 4339
912 2802
1677 4078
1517 4734
2493 4820
550 1893
3153 4068
3857 5087
1365 2493
3857 ...

output:

402 2 332 760 140 235 158 1 1 1 27 1 1 234 1 158 2 171 760 2 159 71 1 1 761 1 1 573 762 63 1 117 1 1 160 349 37 1 763 280 569 1 2 577 2 2 2 213 159 94 1 1 604 1 764 161 1 765 1 602 601 766 2 767 278 40 1 768 1 369 160 769 587 359 162 115 46 253 163 164 770 1 1 1 592 1 1 2 9 13 161 205 1 2 165 166 1 ...

result:

ok accepted

Test #127:

score: 0
Accepted
time: 4ms
memory: 5540kb

input:

5444 8660
452 2239
1671 3615
2488 3912
2952 3057
4491 4721
1428 2152
2143 3452
781 2140
3096 3615
183 619
1761 3952
1694 4740
537 2429
3615 5015
1428 4149
176 2879
60 3273
2 2552
2137 3615
3615 5234
2874 4095
4018 5436
1522 2307
1562 2552
3615 4671
2294 2552
2552 2999
1342 4152
940 2552
3615 5383
57...

output:

1 935 1 19 1 251 19 1 6 266 1 1 1 68 184 1 16 105 73 555 144 55 2 732 592 733 734 1 735 577 2 1 161 231 156 42 1 1 2 2 86 348 183 157 524 230 522 7 520 1 153 1 540 158 736 1 1 737 2 1 113 160 64 539 182 2 534 738 653 108 159 223 739 740 1 159 247 158 142 2 1 11 218 157 1 1 160 635 2 73 264 1 181 28 ...

result:

ok accepted

Test #128:

score: 0
Accepted
time: 0ms
memory: 3380kb

input:

140 234
31 124
12 83
33 118
12 39
65 111
30 69
26 63
24 123
16 88
11 131
27 94
31 57
74 124
3 22
12 47
40 116
27 89
15 35
35 135
12 20
3 53
12 109
12 112
58 88
86 101
104 124
41 127
48 62
35 94
62 91
35 108
21 35
12 107
91 121
56 93
45 56
35 41
28 118
6 52
83 88
35 122
11 35
4 131
46 71
12 82
12 55
...

output:

2 6 1 1 2 5 1 2 6 1 1 1 1 3 31 1 5 22 2 30 4 2 29 1 1 3 1 1 5 4 9 31 28 1 2 1 6 12 2 2 7 8 8 7 4 27 10 30 26 7 8 1 3 3 5 29 1 2 25 2 1 234 28 4 2 24 2 6 27 9 4 3 26 23 11 25 1 1 233 2 3 1 9 2 2 12 22 2 11 5 21 3 232 2 231 230 2 19 1 24 7 1 2 3 3 18 10 23 13 229 3 228 227 226 225 17 224 16 2 1 223 15...

result:

ok accepted

Test #129:

score: 0
Accepted
time: 11ms
memory: 4968kb

input:

3500 6378
2829 3009
1168 2173
765 941
234 3150
2306 2412
652 3190
463 941
19 881
463 3456
2685 2953
787 1782
1699 2185
361 3049
1299 2431
990 2037
463 794
2957 3203
2470 3406
715 2488
155 1794
1037 3106
1588 1966
510 2766
463 755
361 2564
229 611
361 1035
879 1211
361 3024
1141 2102
463 2067
463 346...

output:

133 6 1 20 53 61 67 2 589 31 21 51 276 2 22 590 2 14 1 100 2 1 2 591 144 1 101 15 595 2 592 113 47 2 593 1 119 98 594 12 595 596 22 597 596 1 1 11 2 598 44 2 2 103 1 597 10 9 599 600 182 601 107 1 602 106 598 3 2 87 22 588 600 2 104 601 108 4 27 2 7 603 2 22 1 604 1 602 2 603 604 605 118 606 1 594 1...

result:

ok accepted

Test #130:

score: 0
Accepted
time: 5ms
memory: 5056kb

input:

3500 6378
573 2510
289 768
152 3355
729 3256
680 2097
505 2421
573 634
1889 2555
1380 3256
2195 3256
2930 3475
1200 3095
1047 1049
2154 2571
725 1054
827 1148
884 1228
3256 3415
275 3256
899 3005
975 2299
2971 3463
1755 2600
797 1502
2039 3296
573 1325
1658 3256
1515 3256
1422 1769
1900 3256
573 131...

output:

38 2 2 79 62 2 556 2 579 580 1 60 24 1 1 18 1 175 581 2 3 1 1 1 1 122 153 582 1 583 134 133 1 92 1 68 95 1 158 59 584 557 1 585 1 145 1 11 1 558 104 45 2 116 129 114 586 587 1 23 578 51 2 1 19 1 589 1 1 25 1 590 102 1 1 591 559 1 1 117 560 84 1 3 1 182 30 1 2 592 561 42 1 562 593 594 1 563 108 149 2...

result:

ok accepted

Test #131:

score: 0
Accepted
time: 6ms
memory: 4904kb

input:

3500 6378
1097 3294
1293 2103
346 1013
1293 1712
363 461
516 1818
363 2929
1293 2532
1293 2041
995 1202
363 2181
363 3346
738 1385
1567 2197
2619 2648
1219 3342
363 2759
363 903
2027 2128
1293 3427
1293 1897
1050 1293
860 2121
1293 3200
1718 2468
2571 3288
1293 3277
1293 1686
363 962
457 1608
206 11...

output:

1 351 161 579 257 1 30 580 581 65 601 60 2 2 142 88 106 602 1 582 583 584 18 585 11 1 586 587 603 1 100 588 2 604 2 77 102 149 55 2 94 2 2 2 605 2 100 53 578 2 8 590 606 68 58 591 113 592 33 607 1 115 593 40 594 47 2 608 106 89 2 1 1 131 90 2 2 92 609 610 4 2 600 595 1 612 50 596 2 108 107 112 1 95 ...

result:

ok accepted

Test #132:

score: 0
Accepted
time: 10ms
memory: 4980kb

input:

3500 6378
738 2555
790 2533
1461 1473
738 1563
920 1478
797 2394
790 3224
1589 3224
145 3480
472 1795
738 3414
1570 2026
1341 3345
1002 2974
1993 2113
1798 3437
747 3064
191 3437
790 2963
269 790
1955 2047
2357 3133
790 2344
393 1900
1255 1923
790 3182
821 2546
790 1885
790 1200
50 862
11 738
489 15...

output:

149 368 51 588 101 2 134 2 2 2 65 1 2 1 2 82 40 2 115 588 3 128 589 2 14 590 143 118 591 2 176 62 589 590 2 1 93 92 33 1 14 2 1 592 1 2 13 1 85 593 2 594 595 100 1 141 591 24 1 592 40 136 3 174 83 2 5 86 596 2 1 15 593 180 2 587 88 35 1 181 598 9 162 599 1 140 154 122 33 156 600 1 2 1 594 21 1 7 20 ...

result:

ok accepted

Test #133:

score: 0
Accepted
time: 8ms
memory: 5004kb

input:

3500 6378
907 2305
1371 1672
1269 1441
1419 3312
1768 2304
2422 3094
262 3312
118 3094
2569 2997
1581 3094
1849 3312
2277 3142
236 2047
2284 3222
1596 2745
931 3312
1917 3312
872 2927
989 1063
512 3094
1778 1792
323 3312
854 3062
2138 3312
2822 3312
796 2260
1069 3256
1162 1397
1412 2840
1160 3312
1...

output:

4 2 1 174 1 377 35 70 2 603 107 119 2 2 30 4 595 1 2 604 1 596 70 597 598 1 1 76 177 173 605 2 2 2 104 2 2 1 114 48 599 1 10 14 102 1 31 1 2 1 16 2 606 600 1 2 601 607 2 602 28 1 603 2 608 604 2 1 2 594 40 46 606 1 607 2 55 2 608 609 610 12 1 118 611 1 155 3 44 1 38 100 609 50 1 612 48 610 1 611 3 2...

result:

ok accepted

Test #134:

score: 0
Accepted
time: 9ms
memory: 6128kb

input:

5448 9994
2334 4357
353 1968
2766 4357
140 4357
3952 4105
2420 5221
352 2608
1144 1900
4677 4924
3881 4357
1700 4970
908 1684
3474 4357
2031 3694
4785 4924
2918 4245
2828 4357
3661 4924
4357 4949
1548 4924
2955 3016
178 1512
3830 4924
373 4038
1397 3667
1836 3999
1207 4924
2657 4924
2192 4392
4357 5...

output:

31 7 897 898 57 1 56 1 5 899 32 8 900 1 939 1 901 938 902 937 2 1 936 1 1 1 935 934 1 903 904 905 1 2 66 1 906 69 933 2 201 2 2 26 923 907 2 15 908 909 1 910 2 70 1 151 1 931 1 27 911 930 1 929 928 1 45 927 2 2 896 1 2 2 1 29 913 926 86 914 2 925 2 41 119 915 916 2 2 1 2 1 924 2 932 5 917 1 42 2 114...

result:

ok accepted

Test #135:

score: 0
Accepted
time: 7ms
memory: 5836kb

input:

5448 9994
871 2738
1301 2738
1828 4036
1184 5041
39 1313
712 3588
39 2902
959 1401
123 4546
39 4836
2941 3590
2738 3178
1451 2738
1380 2738
2398 2641
1165 2738
1022 2984
643 3018
2539 2738
3574 5370
3155 4780
39 4560
39 1808
1702 2738
2573 2844
2362 2738
39 4509
2359 5256
776 931
2018 3073
830 4949
...

output:

180 911 1 2 92 115 935 2 229 934 2 224 912 913 2 914 117 9 915 1 2 933 932 167 1 916 254 2 2 113 56 77 182 917 931 203 930 2 47 95 929 2 918 1 919 150 178 168 919 920 83 927 2 1 2 921 1 926 925 924 103 1 242 923 922 922 923 244 102 921 1 1 924 189 920 9 925 119 184 1 1 234 157 1 2 910 1 927 1 928 19...

result:

ok accepted

Test #136:

score: 0
Accepted
time: 17ms
memory: 5800kb

input:

5448 9994
3121 4487
1327 2951
513 3721
2829 3513
1569 4361
1621 4269
3438 3595
1569 3092
2971 4783
1327 3239
86 4570
1759 1857
3649 4197
3552 4423
644 3570
1327 4686
1327 1650
444 3788
3531 4460
879 1600
1327 3934
1569 2177
1569 4177
1746 1754
912 2435
724 3914
3034 4857
1327 2923
2628 2729
1569 537...

output:

3 178 155 2 1022 231 185 928 21 925 219 74 1 85 67 924 923 1 88 29 922 927 926 2 2 167 1 921 34 925 12 1 2 924 920 51 923 2 922 42 2 11 919 2 909 47 25 912 14 1 917 225 920 1 39 919 918 917 2 2 2 2 916 212 915 1 145 144 172 87 1 170 916 914 143 915 95 3 1 33 1 914 121 913 1 913 912 58 1 1 122 115 2 ...

result:

ok accepted

Test #137:

score: 0
Accepted
time: 6ms
memory: 5812kb

input:

5448 9994
4128 5171
981 1122
3110 4999
4453 5199
660 2580
1122 2880
2913 5352
660 1959
2251 3015
1122 3231
660 1353
1122 1616
660 4916
4863 4968
1697 2981
660 1091
304 660
4449 5028
1234 2357
146 2826
356 1876
167 4059
1122 1254
827 2408
355 2597
660 3719
660 3596
2552 5229
766 2551
1122 3717
4903 4...

output:

28 1036 2 152 23 934 1 950 230 11 949 933 948 2 1 70 947 2 1 1 74 56 211 2 44 79 946 221 2 932 156 100 62 931 268 930 226 929 1 928 246 14 2 2 945 102 16 918 103 252 137 1 926 1 2 1 1 133 2 233 169 2 1 96 2 944 2 187 925 934 1 258 1 2 260 924 1 2 942 923 1 2 2 941 1 33 922 103 2 921 254 940 920 919 ...

result:

ok accepted

Test #138:

score: 0
Accepted
time: 8ms
memory: 5888kb

input:

5448 9994
2740 4317
134 1419
2340 4405
588 1526
1516 3001
632 3573
3573 4806
157 402
2008 3573
3573 4877
134 5131
892 3184
2102 2197
1416 2969
2220 5235
683 3906
134 5336
3573 5147
134 804
134 2876
134 667
134 1405
939 4376
1498 4936
3708 5017
1406 4351
2903 3573
134 237
482 4937
1637 3573
3705 3944...

output:

2 212 13 2 27 555 942 2 185 941 910 119 101 1 82 2 911 940 912 913 268 914 36 113 1 1 15 65 1 270 154 266 170 2 1 39 915 916 939 917 938 918 23 3 919 2 190 937 2 19 936 2 926 934 17 1 1 920 54 921 194 166 56 45 922 48 923 924 2 169 41 53 933 932 931 136 144 909 2 1 229 930 133 2 929 202 140 1 926 56...

result:

ok accepted

Test #139:

score: 0
Accepted
time: 12ms
memory: 6080kb

input:

5448 9994
2304 5194
799 3155
518 3155
482 3068
338 2053
1122 3155
3155 4129
3155 4713
3135 4514
1675 3683
3683 5034
2525 3683
877 4513
111 5427
354 3155
3155 4450
6 1111
465 3683
1866 2788
3140 5189
1212 5054
2807 3155
1620 5153
1971 2850
897 3416
1541 4066
1467 3683
3155 4651
1291 5123
2301 3155
46...

output:

2 1019 934 1 1 933 276 932 2 1042 933 103 1 2 931 97 1 246 1 1 1 105 1 16 1 25 932 221 2 930 149 2 30 931 237 930 1 40 159 929 93 928 234 1 929 227 1 1 918 254 173 27 1 2 113 261 928 927 926 917 97 2 2 1 925 177 1 1 25 1 2 2 1 924 923 1 925 922 1 190 43 921 920 919 3 1 143 2 13 918 2 50 200 924 926 ...

result:

ok accepted

Test #140:

score: 0
Accepted
time: 12ms
memory: 5788kb

input:

5448 9994
1275 4544
959 5119
514 3926
3891 4205
48 3280
3551 3891
48 1023
3891 4214
359 5052
48 792
3812 4713
48 1755
48 1031
1217 3891
3119 3891
3891 4675
1749 4707
48 2153
3261 3891
706 3891
48 3667
2682 3891
4170 4831
1352 4317
48 5234
48 4139
1868 4021
2817 3891
48 1763
48 3084
156 3143
285 2979...

output:

2 2 2 11 535 198 920 941 31 11 133 919 918 940 939 938 2 917 937 936 916 935 29 175 915 219 189 925 914 904 1 2 933 1 10 932 56 2 931 2 76 132 63 168 2 130 115 1 3 126 930 1 1 912 2 50 911 98 1 910 1 909 165 2 83 157 2 929 100 908 2 1 2 1 154 1 928 907 906 51 100 905 2 2 927 14 1 1 61 1 1 1 2 913 50...

result:

ok accepted

Test #141:

score: 0
Accepted
time: 11ms
memory: 5932kb

input:

5448 9994
2189 2783
2783 4114
1218 2632
1218 2562
2714 3273
174 381
453 2783
2806 4563
1772 3941
1218 2641
2933 3063
195 3121
1727 4705
1218 1981
2343 2862
61 2783
1218 4393
2259 4147
214 2883
927 1017
1333 2101
2137 4560
1943 4336
1218 3403
122 3974
964 3360
1218 1872
1218 4450
2295 2783
1842 3309
...

output:

536 896 1020 932 1 87 897 172 123 102 1 52 1 3 87 898 931 92 165 1 97 155 1 930 66 169 929 99 34 1 68 2 167 89 2 3 899 169 928 1 2 927 1 926 201 900 60 2 1 14 1 209 2 234 901 2 180 2 902 903 916 1 904 2 131 924 2 10 923 2 922 229 921 168 905 1 1 204 2 103 107 195 2 251 226 920 2 906 907 908 2 909 91...

result:

ok accepted

Test #142:

score: 0
Accepted
time: 26ms
memory: 5796kb

input:

5448 9994
1264 3482
1264 3496
1264 4911
186 1633
227 486
951 1264
1264 1947
1712 4857
111 2372
625 1332
1055 4009
4081 5012
198 2726
4 4669
1112 2799
1264 4013
4041 4653
415 1147
186 5122
1501 2354
2902 5230
3792 5292
1264 4454
1050 1414
2987 3384
695 3736
186 2292
311 4928
2318 2401
186 1763
2834 4...

output:

1030 946 945 419 2 944 170 1 9 1 51 2 1 88 215 943 2 2 123 29 1 266 107 1 1 73 61 2 5 264 176 77 259 942 230 2 940 941 78 49 1 939 940 930 1 38 938 128 937 936 233 935 1 1 53 32 28 2 934 938 937 2 20 936 185 924 2 932 2 935 931 934 14 1 114 1 930 1 7 929 228 1 93 2 82 230 23 933 84 127 1 1 2 2 932 9...

result:

ok accepted

Test #143:

score: 0
Accepted
time: 10ms
memory: 6132kb

input:

5448 9994
607 3583
893 4375
1269 3218
1506 1777
103 893
893 3604
3873 4476
3837 5041
893 4988
893 3103
2879 4709
1524 1666
952 3837
971 1103
3837 4860
1462 3111
395 2068
144 3837
893 3814
3837 5362
2278 4416
525 625
2550 3837
872 893
544 4643
1784 3837
112 2074
1212 3774
935 3778
2127 4622
266 3586
...

output:

1 545 259 2 906 164 1 146 907 165 20 1 166 1 936 2 26 165 265 935 26 2 934 83 111 933 12 45 1 2 1 2 112 2 932 931 930 71 908 1 1 920 16 156 59 2 61 909 910 928 131 129 26 1 4 1 2 229 2 4 27 911 100 259 127 1 912 25 14 3 1 1 57 1 913 60 4 1 927 914 1 915 2 19 1 211 1 2 926 916 1 165 1 2 3 258 2 2 174...

result:

ok accepted

Test #144:

score: 0
Accepted
time: 8ms
memory: 5848kb

input:

5204 9740
647 4293
3193 3873
2144 2202
1487 4133
3612 4342
2144 2806
657 1707
2146 5101
3612 4276
2141 2144
36 3612
3442 5136
1592 2416
2313 4607
1881 4576
2144 5024
2144 2512
2144 3822
3612 3641
124 508
843 4938
2144 3130
271 2719
784 2090
3220 3904
2144 2912
1780 2144
583 4543
2481 3531
2144 4442
...

output:

51 5 1029 1 1092 921 1 28 894 26 74 19 1 221 2 920 919 918 893 1 1 184 2 2 1 187 917 231 2 916 2 144 149 41 2 1 2 2 3 2 150 915 1 1 25 17 1 2 892 1 1 2 151 97 156 905 891 2 3 22 28 95 1 913 912 890 2 911 1 2 7 2 889 888 149 117 910 16 1 20 909 159 908 907 134 108 1 59 906 878 886 914 1 175 1 160 938...

result:

ok accepted

Test #145:

score: 0
Accepted
time: 11ms
memory: 5936kb

input:

5204 9740
1894 2408
280 3276
2408 3257
280 462
2408 4006
1990 2408
3250 5183
1137 2137
280 801
280 1845
1701 2012
1375 1459
66 3648
2701 3267
361 1834
66 656
4523 4775
518 2408
280 4277
57 2408
327 661
681 2408
2408 3780
13 4291
634 2408
2761 4153
80 1711
280 3669
280 3508
1080 2408
2345 4294
2408 2...

output:

352 1102 26 900 869 868 1 2 899 898 1 1 1 83 67 11 2 867 897 43 179 866 865 239 864 231 46 208 896 863 173 853 156 861 138 161 1 162 129 895 53 6 860 859 138 858 87 3 163 857 157 195 894 3 164 165 1 90 158 856 855 1 15 854 10 94 862 1 884 16 892 871 13 872 1 1 3 27 2 1 79 159 24 145 873 154 874 891 ...

result:

ok accepted

Test #146:

score: 0
Accepted
time: 11ms
memory: 5792kb

input:

5204 9740
3845 4275
1951 2740
516 4747
1622 2303
51 1492
3513 3550
1372 1484
1372 5039
1372 4534
154 4765
3452 5064
4173 4890
941 3569
1345 5176
1937 1951
696 1951
233 1372
1372 3337
1951 2718
1951 2683
3127 3832
1860 2791
1485 2427
1372 2596
2557 3111
1969 3849
1421 2968
1137 1372
1372 2193
1372 47...

output:

39 999 93 2 2 178 277 41 885 1 1 238 1 2 895 894 884 90 893 128 27 2 2 883 1 1 6 882 881 880 3 106 40 95 100 879 1 35 892 891 1 1 1 890 889 879 869 1 205 142 161 52 877 162 144 163 83 1 887 886 77 885 876 76 2 114 164 875 75 11 1 87 874 85 163 143 243 2 873 884 1 2 1 883 872 165 882 881 2 164 12 880...

result:

ok accepted

Test #147:

score: 0
Accepted
time: 3ms
memory: 5864kb

input:

5204 9740
1608 3609
351 1052
3699 3721
2068 3609
1136 3699
3609 3791
2176 3699
1415 3609
3457 3740
370 2156
1529 3119
3102 3609
782 4086
1964 4496
3796 5072
3699 4457
991 4374
3564 3961
1073 3609
3609 4014
3609 4928
1457 1705
1235 3018
2777 3948
3699 4034
311 4086
882 3647
2815 3128
3699 4065
346 42...

output:

503 17 353 883 891 882 141 207 1 2 168 881 227 2 1 890 47 25 880 879 878 16 1 147 889 153 148 65 888 4 2 246 70 1 154 155 2 887 886 6 1 885 167 877 1 168 1 77 143 115 15 867 2 13 37 875 12 156 2 181 3 874 19 873 2 872 30 50 871 1 870 168 155 156 869 142 138 875 883 868 876 2 160 169 1 132 32 9 2 1 1...

result:

ok accepted

Test #148:

score: 0
Accepted
time: 11ms
memory: 5784kb

input:

5204 9740
2579 3402
62 1384
2089 2391
538 1675
1588 3203
3402 3418
158 1510
3402 5141
2341 3402
3203 4903
902 1568
3234 3402
547 2820
638 2296
1675 1760
609 3203
1675 2105
3078 3477
3402 3590
3203 3337
1377 3203
377 2198
2967 3402
2260 3402
1146 3402
973 5118
2686 4335
673 3604
1322 1579
2418 3402
2...

output:

1052 1 133 244 1090 869 75 868 867 889 29 866 1 2 165 888 166 1 865 887 187 1 864 102 863 2 240 1 2 853 861 22 2 860 162 859 163 117 858 152 857 2 55 886 14 885 856 28 110 1 884 164 3 855 883 1 2 165 178 873 854 15 862 57 80 2 2 155 881 2 66 2 82 880 2 21 871 1 872 14 166 879 60 873 2 140 59 167 874...

result:

ok accepted

Test #149:

score: 0
Accepted
time: 10ms
memory: 5784kb

input:

5204 9740
771 1797
771 2972
1703 3977
2142 4026
2142 3982
984 2342
722 3693
771 1331
2142 2647
2142 2751
311 2375
64 2261
64 4452
3375 4578
2005 2142
2292 5158
2142 3636
1913 2684
1494 1696
771 5161
847 2807
2743 3855
771 4227
2321 3672
771 1213
35 2142
64 4750
42 1081
2142 3441
771 3996
622 771
214...

output:

498 11 131 499 884 1 137 893 883 882 1 235 158 2 85 2 881 20 105 892 79 2 30 2 891 880 159 209 879 890 889 878 888 55 887 877 868 876 885 2 63 63 152 884 875 8 64 883 160 882 19 4 874 143 881 139 1 64 2 161 873 36 162 132 163 164 2 153 1 130 42 132 3 165 880 2 97 879 1 872 1 878 160 1 145 8 154 190 ...

result:

ok accepted

Test #150:

score: 0
Accepted
time: 9ms
memory: 5836kb

input:

5204 9740
1209 2446
1880 4350
4350 5041
2117 3280
480 4476
1123 2282
290 1840
1279 2117
464 2117
1747 2117
1402 5102
706 1003
787 4343
2117 3709
2117 3312
41 2470
923 4350
1643 4525
4350 4748
2673 2683
2482 4876
4350 4885
79 4350
224 938
38 2127
4012 4726
2763 4402
787 1236
638 3132
3833 4350
787 52...

output:

2 1001 895 996 1 2 2 893 892 891 2 98 237 890 889 223 894 1 893 2 123 892 173 1 1 1 59 160 2 75 161 888 100 2 104 28 2 887 877 13 885 146 1 73 206 162 2 119 2 6 2 884 891 3 1 890 889 1 2 1 883 882 881 168 879 7 1 2 1 163 162 887 1 880 2 2 1 879 878 164 886 1 2 886 885 884 20 883 6 910 1 163 165 882 ...

result:

ok accepted

Test #151:

score: 0
Accepted
time: 14ms
memory: 5796kb

input:

5204 9740
2942 3674
3684 4309
3325 4156
2599 3072
36 2599
1987 2044
125 1343
2176 2809
971 4916
1135 3841
2680 4916
2008 4096
4172 4916
2206 3336
551 1313
2186 4916
2599 3137
2016 4693
3062 4916
480 980
446 4250
1214 3857
2599 3049
2223 4916
2957 4916
2599 3861
2599 4079
3040 4069
3200 4916
2599 282...

output:

33 2 2 1041 845 1 157 247 306 171 202 241 172 2 2 882 846 2 881 2 1 2 847 880 879 848 849 120 878 89 126 877 876 70 73 18 162 167 850 3 53 168 178 1 1 169 170 197 196 9 104 866 851 852 102 84 2 1 1 8 16 874 853 2 171 2 873 104 854 31 855 2 12 163 872 871 2 21 870 869 35 114 54 28 22 1 868 1 867 2 1 ...

result:

ok accepted

Test #152:

score: 0
Accepted
time: 11ms
memory: 5816kb

input:

5204 9740
3718 5059
795 4220
432 4437
2570 4200
642 3174
432 2993
642 2981
432 2952
642 752
4052 4618
4000 4802
1024 4692
3781 4198
642 5125
642 755
530 3951
323 1770
1592 2488
2545 5066
903 1397
1174 3105
3192 3829
2119 2229
432 3109
1442 4170
2173 3718
642 4544
432 1642
4543 5088
157 642
3986 4028...

output:

2 1 164 2 1034 896 840 895 28 2 195 2 5 841 842 33 1 1 1 266 127 21 1 894 2 3 843 893 28 173 2 158 2 844 1 130 1 845 188 846 179 2 44 50 892 2 891 187 46 186 240 13 890 2 880 79 847 1 888 887 2 185 82 112 3 886 885 2 848 1 55 884 185 116 883 1 45 882 881 2 849 850 184 2 123 889 2 851 183 913 86 912 ...

result:

ok accepted

Test #153:

score: 0
Accepted
time: 8ms
memory: 5760kb

input:

5204 9740
59 1951
1928 3654
1366 5072
1951 4011
203 1928
2411 2642
1951 4190
1601 3880
1951 2067
398 1951
2480 3182
1928 2817
3978 4922
30 3236
2893 3432
1951 4609
561 2363
1833 4606
562 1928
766 2776
1951 3560
1780 1951
1179 1951
3368 3542
3603 4002
1731 1928
2007 3354
372 1928
1927 1928
2441 4383
...

output:

169 997 113 858 894 2 857 2 856 855 1 893 245 1 1 854 1 1 40 9 853 852 842 1 35 892 1 891 890 2 3 220 174 889 850 2 888 878 148 35 1 886 1 16 885 849 2 51 1 2 19 848 24 2 187 104 847 884 2 883 35 1 2 882 881 1 846 4 152 845 2 844 1 3 166 149 2 880 167 1 843 879 851 860 3 168 2 1 861 862 863 1 2 1 88...

result:

ok accepted

Test #154:

score: 0
Accepted
time: 8ms
memory: 5832kb

input:

5204 9740
2927 3048
1969 4375
2170 2712
740 2795
2795 3874
185 4316
2795 2845
2915 5052
4554 5052
2239 2407
2333 2795
2783 3810
159 185
1466 2795
164 185
886 3017
102 2492
2012 4301
348 2795
2690 2795
513 2691
1468 5052
185 2679
3552 4207
185 2832
644 1484
3333 3541
854 4537
1532 2795
1728 2726
185 ...

output:

2 38 2 498 889 506 13 245 166 74 888 1 165 887 885 2 1 30 886 885 1 167 884 40 883 10 227 1 111 2 41 168 884 882 2 881 2 58 1 51 880 181 72 68 172 879 869 877 169 20 883 137 1 873 876 875 874 873 2 881 173 2 43 872 89 7 2 1 880 153 120 879 170 871 154 878 155 1 877 130 870 1 63 8 2 876 2 138 152 156...

result:

ok accepted

Test #155:

score: 0
Accepted
time: 14ms
memory: 5796kb

input:

5204 9740
2286 2957
1010 1638
652 1486
272 462
1176 2048
272 1721
2048 3009
272 5005
3916 4900
744 2771
272 1355
2048 2519
2048 4370
272 5203
272 4246
272 2101
2048 4879
2048 4896
2833 3624
243 3312
2048 2615
1529 2544
2048 3760
272 4974
315 2823
86 272
272 5035
1529 5036
1529 2202
557 4145
3495 447...

output:

1 2 1 172 1083 872 883 83 158 20 871 882 881 870 869 868 880 183 2 214 879 246 878 867 34 866 856 166 167 2 187 2 176 877 94 168 867 864 863 875 185 184 169 874 1 98 139 862 873 872 1 861 871 870 860 859 869 858 170 868 2 876 83 17 857 2 885 1 51 886 887 1 145 79 5 865 171 874 2 875 89 172 876 2 888...

result:

ok accepted

Test #156:

score: 0
Accepted
time: 7ms
memory: 5788kb

input:

5204 9740
1320 2577
2658 4715
1078 4917
1320 4751
1643 3836
2078 4017
583 4889
2909 4618
2369 2813
1320 2182
4715 4728
583 1892
1832 3646
80 1320
717 5081
789 1320
3485 4715
1571 1726
1320 2276
544 2163
2002 3461
618 2492
2927 4917
53 4715
705 904
3352 4623
692 1025
2423 2895
2297 4026
1077 2705
369...

output:

1040 370 21 894 2 1 244 63 1 136 68 165 2 893 2 892 886 3 185 1 1 23 2 107 2 141 233 2 2 1 183 159 1 885 171 1 891 71 1 25 884 157 890 64 889 883 2 2 166 882 158 152 888 878 1 1 28 2 43 174 881 880 886 27 870 32 1 878 167 1 885 884 1 163 1 877 876 1 2 159 175 126 2 2 1 875 13 883 160 1 13 882 154 6 ...

result:

ok accepted