QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#519785#7688. Alea Iacta EstpandapythonerAC ✓944ms115432kbC++2316.6kb2024-08-15 01:47:142024-08-15 01:47:14

Judging History

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

  • [2024-08-15 01:47:14]
  • 评测
  • 测评结果:AC
  • 用时:944ms
  • 内存:115432kb
  • [2024-08-15 01:47:14]
  • 提交

answer

#include <bits/stdc++.h>


using namespace std;


using ll = long long;

#define rep(i, n) for(int i = 0; i < (n); i += 1)
#define rng(i, start, end, step) for(int i = start; i < end; i += step)
#define len(a) ((int)(a).size())


mt19937 rnd(234);
const ll mod = 998244353;

ll bin_pow(ll x, ll n) {
    ll rs = 1;
    for (ll i = 1, a = x; i <= n; i *= 2, a = a * a % mod)
        if (n & i) rs = rs * a % mod;
    return rs;
}

ll inv(ll x) {
    return bin_pow(x, mod - 2);
}

namespace fft {
    int mxpw;
    int mxn;
    ll w;

    void build_w() {
        ll phi = mod - 1;
        ll f = phi;
        vector<ll> p;
        for (ll i = 2; i * i <= f; i += 1) {
            if (f % i == 0) {
                p.push_back(i);
                while (f % i == 0) {
                    f /= i;
                }
            }
        }
        if (f > 1) {
            p.push_back(f);
        }
        for (int i = 1; i < mod; i += 1) {
            bool ok = true;
            for (auto q : p) {
                if (bin_pow(i, phi / q) == 1) {
                    ok = false;
                    break;
                }
            }
            if (ok) {
                w = bin_pow(i, phi / (1 << mxpw));
                break;
            }
        }
    }

    vector<ll> rvx;

    void build_rvx(int n) {
        rvx.resize(n + 1);
        for (int i = 1; i <= n; i += 1) {
            rvx[i] = inv(i);
        }
    }

    vector<ll> rvi, wpws;

    void build(int _mxpw) {
        mxpw = _mxpw;
        mxn = (1 << mxpw);
        build_w();
        int n = (1 << mxpw);
        rvi.resize(n);
        rvi[0] = 0;
        for (int i = 1; i < n; i += 1) {
            rvi[i] = (rvi[i >> 1] >> 1);
            if (i & 1) {
                rvi[i] += (1 << (mxpw - 1));
            }
        }
        wpws.resize(n + 1);
        wpws[0] = 1;
        for (int i = 1; i <= n; i += 1) {
            wpws[i] = (wpws[i - 1] * w) % mod;
        }
        build_rvx(mxn);
    }

    void fft(vector<ll>& a, int nk) {
        int n = (1 << nk);
        for (int i = 0; i < n; i += 1) {
            int mrv = (rvi[i] >> (mxpw - nk));
            if (mrv < i) {
                swap(a[mrv], a[i]);
            }
        }
        for (int ln = 1; ln < n; ln *= 2) {
            int ln2 = ln + ln;
            for (int i = 0; i < n; i += ln2) {
                for (int j = 0; j < ln; j += 1) {
                    ll mw = wpws[mxn / ln2 * j];
                    int u = i + j;
                    int v = u + ln;
                    ll y = a[v] * mw % mod;
                    a[v] = a[u] - y;
                    if (a[v] < 0) {
                        a[v] += mod;
                    }
                    a[u] += y;
                    if (a[u] >= mod) {
                        a[u] -= mod;
                    }
                }
            }
        }
    }

    void rev_fft(vector<ll>& a, int nk) {
        int n = (1 << nk);
        fft(a, nk);
        ll rvn = inv(n);
        reverse(a.begin() + 1, a.end());
        for (int i = 0; i < n; i += 1) {
            a[i] = (a[i] * rvn) % mod;
        }
    }

    vector<ll> square(vector<ll> a) {
        int nk = 0;
        while ((1 << nk) < (int)a.size() + (int)a.size() - 1) {
            nk += 1;
        }
        int n = (1 << nk);
        a.resize(n, 0);
        fft(a, nk);
        for (int i = 0; i < n; i += 1) {
            a[i] = (a[i] * a[i]) % mod;
        }
        rev_fft(a, nk);
        while (!a.empty() && a.back() == 0) {
            a.pop_back();
        }
        return a;
    }

    vector<ll> mul(vector<ll> a, vector<ll> b) {
        int nk = 0;
        while ((1 << nk) < (int)a.size() + (int)b.size() - 1) {
            nk += 1;
        }
        int n = (1 << nk);
        a.resize(n, 0);
        b.resize(n, 0);
        fft(a, nk);
        fft(b, nk);
        for (int i = 0; i < n; i += 1) {
            a[i] = (a[i] * b[i]) % mod;
        }
        rev_fft(a, nk);
        while (!a.empty() && a.back() == 0) {
            a.pop_back();
        }
        return a;
    }

    void add_inplace(vector<ll>& a, const vector<ll>& b, ll k = 1) {
        a.resize(max(a.size(), b.size()), 0);
        for (int i = 0; i < (int)b.size(); i += 1) {
            a[i] = (a[i] + b[i] * k) % mod;
        }
    }

    vector<ll> add(vector<ll> a, const vector<ll>& b, ll k = 1) {
        a.resize(max(a.size(), b.size()), 0);
        for (int i = 0; i < (int)b.size(); i += 1) {
            a[i] = (a[i] + b[i] * k) % mod;
        }
        return a;
    }

    vector<ll> sub(vector<ll> a, const vector<ll>& b, ll k = 1) {
        a.resize(max(a.size(), b.size()), 0);
        for (int i = 0; i < (int)b.size(); i += 1) {
            a[i] = (a[i] + mod - b[i] * k % mod) % mod;
        }
        return a;
    }

    vector<ll> replace_x_slow(vector<ll>& a, const vector<ll>& b) {
        vector<ll> rs = {};
        vector<ll> bpw = { 1 };
        for (int i = 0; i < (int)a.size(); i += 1) {
            if (i > 0) {
                bpw = mul(bpw, b);
            }
            add_inplace(rs, bpw, a[i]);
        }
        return rs;
    }

    vector<ll> replace_x(vector<ll>& a, const vector<ll>& b) {
        vector<ll> rs = {};
        vector<ll> bpw = b;
        int n = a.size();
        vector<vector<ll>> d(n);
        for (int i = 0; i < n; i += 1) {
            d[i] = { a[i] };
        }
        while (n > 1) {
            int m = (n + 1) / 2;
            vector<vector<ll>> nd(m);
            for (int i = 0; i < n; i += 1) {
                if (i % 2 == 0) {
                    nd[i / 2] = d[i];
                } else {
                    add_inplace(nd[i / 2], mul(d[i], bpw));
                }
            }
            n = m;
            d.swap(nd);
            if (n != 1) {
                bpw = square(bpw);
            }
        }
        return d[0];
    }

    vector<ll> shift_x(vector<ll> a, ll t) {
        if (a.empty()) {
            return {};
        }
        int n = (int)a.size() - 1;
        vector<ll> f(n + 1), rf(n + 1);
        f[0] = rf[0] = 1;
        for (int i = 1; i <= n; i += 1) {
            f[i] = (f[i - 1] * i) % mod;
            rf[i] = inv(f[i]);
        }
        vector<ll> b(n + 1), c(n + 1);
        ll tpw = 1;
        for (int i = 0; i <= n; i += 1) {
            b[i] = (a[i] * tpw % mod * f[i] % mod);
            tpw = (tpw * t) % mod;
        }
        for (int i = 0; i <= n; i += 1) {
            c[n - i] = rf[i];
        }
        a = mul(b, c);
        vector<ll> d(n + 1);
        ll rvt = inv(t);
        ll rvt_pw = 1;
        for (int i = 0; i <= n; i += 1) {
            d[i] = rvt_pw * rf[i] % mod * a[i + n] % mod;
            rvt_pw = (rvt_pw * rvt) % mod;
        }
        return d;
    }

    vector<ll> rev_polynom(const vector<ll>& a, int n) {
        int sz = a.size();
        vector<ll> b = { inv(a[0]) };
        int m = 1;
        int mk = 0;
        while (m < n) {
            int m2 = m + m;
            int m4 = m2 + m2;
            b.resize(m4);
            fft(b, mk + 2);
            vector<ll> nb(m4);
            for (int i = 0; i < sz && i < m2; i += 1) {
                nb[i] = a[i];
            }
            fft(nb, mk + 2);
            for (int i = 0; i < m4; i += 1) {
                nb[i] = (2 * b[i] - nb[i] * b[i] % mod * b[i]) % mod;
                if (nb[i] < 0) {
                    nb[i] += mod;
                }
            }
            rev_fft(nb, mk + 2);
            nb.resize(m2);
            b.swap(nb);
            m = m2;
            mk += 1;
        }
        b.resize(n);
        return b;
    }

    vector<ll> square_root(const vector<ll>& a, int n) {
        ll sz = a.size();
        ll rv2 = inv(2);
        vector<ll> b = { 1 };
        int m = 1;
        while (m < n) {
            ll m2 = m + m;
            vector<ll> rvb = rev_polynom(b, m2);
            vector<ll> ab(m2);
            for (int i = 0; i < m2 && i < sz; i += 1) {
                ab[i] = a[i];
            }
            ab = mul(ab, rvb);
            ab.resize(m2);
            b.resize(m2);
            for (int i = 0; i < m2; i += 1) {
                b[i] = (rv2 * ((b[i] + ab[i]) % mod)) % mod;
            }
            m = m2;
        }
        b.resize(n);
        return b;
    }

    vector<ll> derivative(vector<ll> a) {
        int n = a.size();
        if (n == 0) {
            return {};
        }
        for (int i = 0; i + 1 < n; i += 1) {
            a[i] = (a[i + 1] * (i + 1)) % mod;
        }
        a.resize(n - 1);
        return a;
    }

    vector<ll> integrate(vector<ll> a) {
        int n = a.size();
        a.resize(n + 1);
        for (int i = n; i > 0; i -= 1) {
            a[i] = (a[i - 1] * rvx[i]) % mod;
        }
        a[0] = 0;
        return a;
    }

    vector<ll> sin_polynomial(int n) {
        vector<ll> a(n, 0);
        ll fct = 1;
        for (int i = 0; i < n; i += 1) {
            if (i != 0) {
                fct = (fct * i) % mod;
            }
            if (i % 2 == 1) {
                int sign = 1;
                if ((i / 2) % 2 == 1) {
                    sign = -1;
                }
                a[i] = (mod + sign * inv(fct)) % mod;
            }
        }
        return a;
    }

    vector<ll> cos_polynomial(int n) {
        vector<ll> a(n, 0);
        ll fct = 1;
        for (int i = 0; i < n; i += 1) {
            if (i != 0) {
                fct = (fct * i) % mod;
            }
            if (i % 2 == 0) {
                int sign = 1;
                if ((i / 2) % 2 == 1) {
                    sign = -1;
                }
                a[i] = (mod + sign * inv(fct)) % mod;
            }
        }
        return a;
    }

    vector<ll> super_cos_polynomial(int n, int k) {
        vector<ll> a(n, 0);
        ll fct = 1;
        for (int i = 0; i < n; i += 1) {
            if (i != 0) {
                fct = (fct * i) % mod;
            }
            if (i % k == 0) {
                int sign = 1;
                if ((i / k) % 2 == 1) {
                    sign = -1;
                }
                a[i] = (mod + sign * inv(fct)) % mod;
            }
        }
        return a;
    }

    vector<ll> logarithm(const vector<ll>& a, int n) {
        if (n == 0) {
            return {};
        }
        vector<ll> b = integrate(mul(derivative(a), rev_polynom(a, n)));
        b.resize(n);
        return b;
    }

    vector<ll> exponent(const vector<ll>& a, int n) {
        vector<ll> b = { 1 };
        int m = 1;
        while (m < n) {
            int m2 = m + m;
            vector<ll> t = logarithm(b, m2);
            for (int i = 0; i < m2 && i < (int)a.size(); i += 1) {
                t[i] = (t[i] - a[i]);
                if (t[i] < 0) {
                    t[i] += mod;
                }
            }
            vector<ll> q = fft::mul(t, b);
            q.resize(m2);
            b.resize(m2);
            for (int i = 0; i < m2; i += 1) {
                b[i] -= q[i];
                if (b[i] < 0) {
                    b[i] += mod;
                }
            }
            m = m2;
        }
        b.resize(n);
        return b;
    }

    vector<ll> solve_differential(const vector<ll>& a, const vector<ll>& b, int n) {
        vector<ll> e = exponent(integrate(a), n);
        vector<ll> result = mul(e, integrate(mul(b, rev_polynom(e, n))));
        result.resize(n);
        return result;
    }

    vector<ll> pure_exponent(int n, ll k = 1) {
        if (n == 0) {
            return {};
        }
        k %= mod;
        if (k < 0) {
            k += mod;
        }
        vector<ll> rs(n);
        rs[0] = 1;
        ll rv_fct = 1;
        for (int i = 1; i < n; i += 1) {
            rv_fct = (rv_fct * rvx[i]) % mod * k % mod;
            rs[i] = rv_fct;
        }
        return rs;
    }
}  // namespace fft

vector<ll> get_flex(int step, int num_steps) {
    vector<ll> result(step * num_steps);
    rep(i, num_steps) result[i * step] = 1;
    return result;
}


vector<ll> get_dice(vector<ll> flex) {
    vector<ll> result;
    rep(i, len(flex)) {
        assert(flex[i] >= 0);
        rep(j, flex[i]) result.push_back(i);
    }
    return result;
}


void print_flex(ll n, ll m, ll a, ll b) {
    ll nm = n * m;
    assert(n % a == 0 and m % b == 0);
    auto first_dice = get_dice(fft::mul(get_flex(a, n / a), get_flex(m / b, b)));
    auto second_dice = get_dice(fft::mul(get_flex(1, m / b), get_flex(1, a)));
    cout << len(first_dice); for (auto x : first_dice) cout << " " << x + 1;
    cout << "\n";
    cout << len(second_dice); for (auto x : second_dice) cout << " " << x + 1;
    cout << "\n\n";
}


int32_t main() {
    fft::build(21);
    if (1) {
        ios::sync_with_stdio(0);
        cin.tie(0);
        cout.tie(0);
    }
    int t;
    cin >> t;
    rep(itr, t) {
        int n, m;
        cin >> n >> m;
        if (n > m) swap(n, m);
        ll nm = ll(n) * m;
        ll opt = 1;
        for (ll x = 1; x * x <= nm; x += 1) {
            if (nm % x != 0) continue;
            if (opt + nm / opt > x + nm / x) opt = x;
        }
        if (opt != n) {
            ll g = gcd(opt, n);
            ll a = n / g;
            ll b = opt / g;
            print_flex(n, m, a, b);
            continue;
        }
        ll g = gcd(n, m);
        ll frst = -1;
        for (ll i = 2; i <= g; i += 1) if (g % i == 0) { frst = i; break; }
        if (frst != -1 and frst < m) {
            print_flex(n, m, frst, frst);
            continue;
        }
        bool ok = false;
        rep(itr, 2) {
            swap(n, m);
            ll a = -1, b = -1;
            for (ll i = 2; i <= n; i += 1) if (n % i == 0) {
                a = i; break;
            };
            if (a == -1) continue;
            for (ll i = 2; i <= n; i += 1) if (i % a != 0 and n % i == 0) {
                b = i; break;
            }
            if (b != -1) {
                vector<ll> biba(n);
                vector<ll> boba(n + m);
                biba[0] = boba[0] = 1;
                for (int i = len(biba) - 1; i - a >= 0; i -= 1) {
                    biba[i] -= biba[i - a];
                }
                for (int i = len(biba) - 1; i - b >= 0; i -= 1) {
                    biba[i] -= biba[i - b];
                }
                for (int i = 1; i < len(biba); i += 1) {
                    biba[i] += biba[i - 1];
                }
                for (int i = 1; i < len(biba); i += 1) {
                    biba[i] += biba[i - 1];
                }
                for (int i = a * b; i < len(biba); i += 1) {
                    biba[i] += biba[i - a * b];
                }

                for (int i = len(boba) - 1; i - a * b >= 0; i -= 1) {
                    boba[i] -= boba[i - a * b];
                }
                for (int i = len(boba) - 1; i - m >= 0; i -= 1) {
                    boba[i] -= boba[i - m];
                }
                for (int i = a; i < len(boba); i += 1) {
                    boba[i] += boba[i - a];
                }
                for (int i = b; i < len(boba); i += 1) {
                    boba[i] += boba[i - b];
                }
                bool bad = false;
                for (auto x : boba) if (x < 0) bad = true;
                if (bad) {
                    continue;
                }
                auto first_dice = get_dice(biba);
                auto second_dice = get_dice(boba);
                cout << len(first_dice); for (auto x : first_dice) cout << " " << x + 1;
                cout << "\n";
                cout << len(second_dice); for (auto x : second_dice) cout << " " << x + 1;
                cout << "\n\n";
                ok = true;
                break;
            }
        }
        if (ok) {
            continue;
        }
        opt = -1;
        for (ll x = 1; x * x <= nm; x += 1) {
            if (nm % x != 0) continue;
            if (x == n) continue;
            if (opt == -1 or opt + nm / opt > x + nm / x) opt = x;
        }
        if (opt != -1 and opt + nm / opt < 2 * n + m) {
            ll g = gcd(opt, n);
            ll a = n / g;
            ll b = opt / g;
            print_flex(n, m, a, b);
            continue;
        }
        cout << 2 * n; rep(i, n) cout << " " << i + 1 << " " << i + 1; cout << "\n";
        cout << m; rep(i, m) cout << " " << i + 1; cout << "\n";
        cout << "\n";
    }
    return 0;
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 242ms
memory: 52260kb

input:

3
2 8
1 9
2 9

output:

4 1 2 5 6
4 1 2 3 4

3 1 4 7
3 1 2 3

3 1 4 7
6 1 2 2 3 3 4


result:

ok Correct. (3 test cases)

Test #2:

score: 0
Accepted
time: 242ms
memory: 52128kb

input:

1
40013 40013

output:

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

result:

ok Correct. (1 test case)

Test #3:

score: 0
Accepted
time: 234ms
memory: 52252kb

input:

1
40013 1

output:

2 1 1
40013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...

result:

ok Correct. (1 test case)

Test #4:

score: 0
Accepted
time: 242ms
memory: 52348kb

input:

1
2 40013

output:

4 1 1 2 2
40013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98...

result:

ok Correct. (1 test case)

Test #5:

score: 0
Accepted
time: 241ms
memory: 52324kb

input:

1
3 40013

output:

6 1 1 2 2 3 3
40013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 9...

result:

ok Correct. (1 test case)

Test #6:

score: 0
Accepted
time: 240ms
memory: 52124kb

input:

1
4 40013

output:

8 1 1 2 2 3 3 4 4
40013 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 ...

result:

ok Correct. (1 test case)

Test #7:

score: 0
Accepted
time: 396ms
memory: 52300kb

input:

1
999983 999983

output:

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

result:

ok Correct. (1 test case)

Test #8:

score: 0
Accepted
time: 286ms
memory: 52128kb

input:

1
1 999983

output:

2 1 1
999983 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99...

result:

ok Correct. (1 test case)

Test #9:

score: 0
Accepted
time: 293ms
memory: 52292kb

input:

1
2 999983

output:

4 1 1 2 2
999983 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 9...

result:

ok Correct. (1 test case)

Test #10:

score: 0
Accepted
time: 293ms
memory: 52344kb

input:

1
999983 3

output:

6 1 1 2 2 3 3
999983 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 ...

result:

ok Correct. (1 test case)

Test #11:

score: 0
Accepted
time: 285ms
memory: 52348kb

input:

1
999983 4

output:

8 1 1 2 2 3 3 4 4
999983 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95...

result:

ok Correct. (1 test case)

Test #12:

score: 0
Accepted
time: 800ms
memory: 101432kb

input:

1
1000000 1000000

output:

1000000 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173...

result:

ok Correct. (1 test case)

Test #13:

score: 0
Accepted
time: 407ms
memory: 77348kb

input:

1
1000000 1

output:

1000 1 1001 2001 3001 4001 5001 6001 7001 8001 9001 10001 11001 12001 13001 14001 15001 16001 17001 18001 19001 20001 21001 22001 23001 24001 25001 26001 27001 28001 29001 30001 31001 32001 33001 34001 35001 36001 37001 38001 39001 40001 41001 42001 43001 44001 45001 46001 47001 48001 49001 50001 51...

result:

ok Correct. (1 test case)

Test #14:

score: 0
Accepted
time: 413ms
memory: 77136kb

input:

1
1000000 2

output:

1250 1 2 1601 1602 3201 3202 4801 4802 6401 6402 8001 8002 9601 9602 11201 11202 12801 12802 14401 14402 16001 16002 17601 17602 19201 19202 20801 20802 22401 22402 24001 24002 25601 25602 27201 27202 28801 28802 30401 30402 32001 32002 33601 33602 35201 35202 36801 36802 38401 38402 40001 40002 416...

result:

ok Correct. (1 test case)

Test #15:

score: 0
Accepted
time: 417ms
memory: 78472kb

input:

1
3 1000000

output:

1600 1 626 1251 1876 2501 3126 3751 4376 5001 5626 6251 6876 7501 8126 8751 9376 10001 10626 11251 11876 12501 13126 13751 14376 15001 15626 16251 16876 17501 18126 18751 19376 20001 20626 21251 21876 22501 23126 23751 24376 25001 25626 26251 26876 27501 28126 28751 29376 30001 30626 31251 31876 325...

result:

ok Correct. (1 test case)

Test #16:

score: 0
Accepted
time: 418ms
memory: 77080kb

input:

1
4 1000000

output:

2000 1 2 3 4 2001 2002 2003 2004 4001 4002 4003 4004 6001 6002 6003 6004 8001 8002 8003 8004 10001 10002 10003 10004 12001 12002 12003 12004 14001 14002 14003 14004 16001 16002 16003 16004 18001 18002 18003 18004 20001 20002 20003 20004 22001 22002 22003 22004 24001 24002 24003 24004 26001 26002 260...

result:

ok Correct. (1 test case)

Test #17:

score: 0
Accepted
time: 720ms
memory: 101040kb

input:

1
988027 988027

output:

988027 1 992 998 1983 1989 1995 2974 2980 2986 2992 3965 3971 3977 3983 3989 4956 4962 4968 4974 4980 4986 5947 5953 5959 5965 5971 5977 5983 6938 6944 6950 6956 6962 6968 6974 6980 7929 7935 7941 7947 7953 7959 7965 7971 7977 8920 8926 8932 8938 8944 8950 8956 8962 8968 8974 9911 9917 9923 9929 993...

result:

ok Correct. (1 test case)

Test #18:

score: 0
Accepted
time: 412ms
memory: 77944kb

input:

1
988027 1

output:

991 1 998 1995 2992 3989 4986 5983 6980 7977 8974 9971 10968 11965 12962 13959 14956 15953 16950 17947 18944 19941 20938 21935 22932 23929 24926 25923 26920 27917 28914 29911 30908 31905 32902 33899 34896 35893 36890 37887 38884 39881 40878 41875 42872 43869 44866 45863 46860 47857 48854 49851 50848...

result:

ok Correct. (1 test case)

Test #19:

score: 0
Accepted
time: 416ms
memory: 78308kb

input:

1
2 988027

output:

997 1 992 1983 2974 3965 4956 5947 6938 7929 8920 9911 10902 11893 12884 13875 14866 15857 16848 17839 18830 19821 20812 21803 22794 23785 24776 25767 26758 27749 28740 29731 30722 31713 32704 33695 34686 35677 36668 37659 38650 39641 40632 41623 42614 43605 44596 45587 46578 47569 48560 49551 50542...

result:

ok Correct. (1 test case)

Test #20:

score: 0
Accepted
time: 415ms
memory: 76824kb

input:

1
3 988027

output:

997 1 992 1983 2974 3965 4956 5947 6938 7929 8920 9911 10902 11893 12884 13875 14866 15857 16848 17839 18830 19821 20812 21803 22794 23785 24776 25767 26758 27749 28740 29731 30722 31713 32704 33695 34686 35677 36668 37659 38650 39641 40632 41623 42614 43605 44596 45587 46578 47569 48560 49551 50542...

result:

ok Correct. (1 test case)

Test #21:

score: 0
Accepted
time: 423ms
memory: 77920kb

input:

1
4 988027

output:

1982 1 3 998 1000 1995 1997 2992 2994 3989 3991 4986 4988 5983 5985 6980 6982 7977 7979 8974 8976 9971 9973 10968 10970 11965 11967 12962 12964 13959 13961 14956 14958 15953 15955 16950 16952 17947 17949 18944 18946 19941 19943 20938 20940 21935 21937 22932 22934 23929 23931 24926 24928 25923 25925 ...

result:

ok Correct. (1 test case)

Test #22:

score: 0
Accepted
time: 712ms
memory: 101428kb

input:

1
995779 995779

output:

995779 1 984 1014 1967 1997 2027 2950 2980 3010 3040 3933 3963 3993 4023 4053 4916 4946 4976 5006 5036 5066 5899 5929 5959 5989 6019 6049 6079 6882 6912 6942 6972 7002 7032 7062 7092 7865 7895 7925 7955 7985 8015 8045 8075 8105 8848 8878 8908 8938 8968 8998 9028 9058 9088 9118 9831 9861 9891 9921 99...

result:

ok Correct. (1 test case)

Test #23:

score: 0
Accepted
time: 416ms
memory: 78364kb

input:

1
1 995779

output:

983 1 1014 2027 3040 4053 5066 6079 7092 8105 9118 10131 11144 12157 13170 14183 15196 16209 17222 18235 19248 20261 21274 22287 23300 24313 25326 26339 27352 28365 29378 30391 31404 32417 33430 34443 35456 36469 37482 38495 39508 40521 41534 42547 43560 44573 45586 46599 47612 48625 49638 50651 516...

result:

ok Correct. (1 test case)

Test #24:

score: 0
Accepted
time: 412ms
memory: 78472kb

input:

1
995779 2

output:

1013 1 984 1967 2950 3933 4916 5899 6882 7865 8848 9831 10814 11797 12780 13763 14746 15729 16712 17695 18678 19661 20644 21627 22610 23593 24576 25559 26542 27525 28508 29491 30474 31457 32440 33423 34406 35389 36372 37355 38338 39321 40304 41287 42270 43253 44236 45219 46202 47185 48168 49151 5013...

result:

ok Correct. (1 test case)

Test #25:

score: 0
Accepted
time: 425ms
memory: 77952kb

input:

1
995779 3

output:

1013 1 984 1967 2950 3933 4916 5899 6882 7865 8848 9831 10814 11797 12780 13763 14746 15729 16712 17695 18678 19661 20644 21627 22610 23593 24576 25559 26542 27525 28508 29491 30474 31457 32440 33423 34406 35389 36372 37355 38338 39321 40304 41287 42270 43253 44236 45219 46202 47185 48168 49151 5013...

result:

ok Correct. (1 test case)

Test #26:

score: 0
Accepted
time: 413ms
memory: 78080kb

input:

1
995779 4

output:

1966 1 3 1014 1016 2027 2029 3040 3042 4053 4055 5066 5068 6079 6081 7092 7094 8105 8107 9118 9120 10131 10133 11144 11146 12157 12159 13170 13172 14183 14185 15196 15198 16209 16211 17222 17224 18235 18237 19248 19250 20261 20263 21274 21276 22287 22289 23300 23302 24313 24315 25326 25328 26339 263...

result:

ok Correct. (1 test case)

Test #27:

score: 0
Accepted
time: 773ms
memory: 100488kb

input:

1
720720 720720

output:

720720 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 ...

result:

ok Correct. (1 test case)

Test #28:

score: 0
Accepted
time: 424ms
memory: 75032kb

input:

1
720720 1

output:

840 1 859 1717 2575 3433 4291 5149 6007 6865 7723 8581 9439 10297 11155 12013 12871 13729 14587 15445 16303 17161 18019 18877 19735 20593 21451 22309 23167 24025 24883 25741 26599 27457 28315 29173 30031 30889 31747 32605 33463 34321 35179 36037 36895 37753 38611 39469 40327 41185 42043 42901 43759 ...

result:

ok Correct. (1 test case)

Test #29:

score: 0
Accepted
time: 412ms
memory: 76220kb

input:

1
2 720720

output:

1170 1 2 1233 1234 2465 2466 3697 3698 4929 4930 6161 6162 7393 7394 8625 8626 9857 9858 11089 11090 12321 12322 13553 13554 14785 14786 16017 16018 17249 17250 18481 18482 19713 19714 20945 20946 22177 22178 23409 23410 24641 24642 25873 25874 27105 27106 28337 28338 29569 29570 30801 30802 32033 3...

result:

ok Correct. (1 test case)

Test #30:

score: 0
Accepted
time: 408ms
memory: 75364kb

input:

1
3 720720

output:

1456 1 496 991 1486 1981 2476 2971 3466 3961 4456 4951 5446 5941 6436 6931 7426 7921 8416 8911 9406 9901 10396 10891 11386 11881 12376 12871 13366 13861 14356 14851 15346 15841 16336 16831 17326 17821 18316 18811 19306 19801 20296 20791 21286 21781 22276 22771 23266 23761 24256 24751 25246 25741 262...

result:

ok Correct. (1 test case)

Test #31:

score: 0
Accepted
time: 415ms
memory: 75872kb

input:

1
4 720720

output:

1680 1 2 3 4 1717 1718 1719 1720 3433 3434 3435 3436 5149 5150 5151 5152 6865 6866 6867 6868 8581 8582 8583 8584 10297 10298 10299 10300 12013 12014 12015 12016 13729 13730 13731 13732 15445 15446 15447 15448 17161 17162 17163 17164 18877 18878 18879 18880 20593 20594 20595 20596 22309 22310 22311 2...

result:

ok Correct. (1 test case)

Test #32:

score: 0
Accepted
time: 535ms
memory: 76904kb

input:

1
524288 524288

output:

524288 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 ...

result:

ok Correct. (1 test case)

Test #33:

score: 0
Accepted
time: 309ms
memory: 60504kb

input:

1
1 524288

output:

512 1 1025 2049 3073 4097 5121 6145 7169 8193 9217 10241 11265 12289 13313 14337 15361 16385 17409 18433 19457 20481 21505 22529 23553 24577 25601 26625 27649 28673 29697 30721 31745 32769 33793 34817 35841 36865 37889 38913 39937 40961 41985 43009 44033 45057 46081 47105 48129 49153 50177 51201 522...

result:

ok Correct. (1 test case)

Test #34:

score: 0
Accepted
time: 423ms
memory: 72868kb

input:

1
2 524288

output:

1024 1 2 1025 1026 2049 2050 3073 3074 4097 4098 5121 5122 6145 6146 7169 7170 8193 8194 9217 9218 10241 10242 11265 11266 12289 12290 13313 13314 14337 14338 15361 15362 16385 16386 17409 17410 18433 18434 19457 19458 20481 20482 21505 21506 22529 22530 23553 23554 24577 24578 25601 25602 26625 266...

result:

ok Correct. (1 test case)

Test #35:

score: 0
Accepted
time: 426ms
memory: 72772kb

input:

1
3 524288

output:

1024 1 513 1025 1537 2049 2561 3073 3585 4097 4609 5121 5633 6145 6657 7169 7681 8193 8705 9217 9729 10241 10753 11265 11777 12289 12801 13313 13825 14337 14849 15361 15873 16385 16897 17409 17921 18433 18945 19457 19969 20481 20993 21505 22017 22529 23041 23553 24065 24577 25089 25601 26113 26625 2...

result:

ok Correct. (1 test case)

Test #36:

score: 0
Accepted
time: 414ms
memory: 72704kb

input:

1
524288 4

output:

1024 1 2 3 4 2049 2050 2051 2052 4097 4098 4099 4100 6145 6146 6147 6148 8193 8194 8195 8196 10241 10242 10243 10244 12289 12290 12291 12292 14337 14338 14339 14340 16385 16386 16387 16388 18433 18434 18435 18436 20481 20482 20483 20484 22529 22530 22531 22532 24577 24578 24579 24580 26625 26626 266...

result:

ok Correct. (1 test case)

Test #37:

score: 0
Accepted
time: 739ms
memory: 98556kb

input:

1
531441 531441

output:

531441 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 103 106 109 112 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226 229 232 235 238 241 244 2...

result:

ok Correct. (1 test case)

Test #38:

score: 0
Accepted
time: 410ms
memory: 72788kb

input:

1
1 531441

output:

729 1 730 1459 2188 2917 3646 4375 5104 5833 6562 7291 8020 8749 9478 10207 10936 11665 12394 13123 13852 14581 15310 16039 16768 17497 18226 18955 19684 20413 21142 21871 22600 23329 24058 24787 25516 26245 26974 27703 28432 29161 29890 30619 31348 32077 32806 33535 34264 34993 35722 36451 37180 37...

result:

ok Correct. (1 test case)

Test #39:

score: 0
Accepted
time: 417ms
memory: 72836kb

input:

1
2 531441

output:

729 1 730 1459 2188 2917 3646 4375 5104 5833 6562 7291 8020 8749 9478 10207 10936 11665 12394 13123 13852 14581 15310 16039 16768 17497 18226 18955 19684 20413 21142 21871 22600 23329 24058 24787 25516 26245 26974 27703 28432 29161 29890 30619 31348 32077 32806 33535 34264 34993 35722 36451 37180 37...

result:

ok Correct. (1 test case)

Test #40:

score: 0
Accepted
time: 406ms
memory: 72720kb

input:

1
531441 3

output:

729 1 2 3 2188 2189 2190 4375 4376 4377 6562 6563 6564 8749 8750 8751 10936 10937 10938 13123 13124 13125 15310 15311 15312 17497 17498 17499 19684 19685 19686 21871 21872 21873 24058 24059 24060 26245 26246 26247 28432 28433 28434 30619 30620 30621 32806 32807 32808 34993 34994 34995 37180 37181 37...

result:

ok Correct. (1 test case)

Test #41:

score: 0
Accepted
time: 430ms
memory: 72860kb

input:

1
531441 4

output:

1458 1 3 730 732 1459 1461 2188 2190 2917 2919 3646 3648 4375 4377 5104 5106 5833 5835 6562 6564 7291 7293 8020 8022 8749 8751 9478 9480 10207 10209 10936 10938 11665 11667 12394 12396 13123 13125 13852 13854 14581 14583 15310 15312 16039 16041 16768 16770 17497 17499 18226 18228 18955 18957 19684 1...

result:

ok Correct. (1 test case)

Test #42:

score: 0
Accepted
time: 505ms
memory: 76684kb

input:

1
510510 510510

output:

510510 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 ...

result:

ok Correct. (1 test case)

Test #43:

score: 0
Accepted
time: 318ms
memory: 65404kb

input:

1
510510 1

output:

714 1 716 1431 2146 2861 3576 4291 5006 5721 6436 7151 7866 8581 9296 10011 10726 11441 12156 12871 13586 14301 15016 15731 16446 17161 17876 18591 19306 20021 20736 21451 22166 22881 23596 24311 25026 25741 26456 27171 27886 28601 29316 30031 30746 31461 32176 32891 33606 34321 35036 35751 36466 37...

result:

ok Correct. (1 test case)

Test #44:

score: 0
Accepted
time: 310ms
memory: 65556kb

input:

1
510510 2

output:

1001 1 511 1021 1531 2041 2551 3061 3571 4081 4591 5101 5611 6121 6631 7141 7651 8161 8671 9181 9691 10201 10711 11221 11731 12241 12751 13261 13771 14281 14791 15301 15811 16321 16831 17341 17851 18361 18871 19381 19891 20401 20911 21421 21931 22441 22951 23461 23971 24481 24991 25501 26011 26521 2...

result:

ok Correct. (1 test case)

Test #45:

score: 0
Accepted
time: 311ms
memory: 65608kb

input:

1
3 510510

output:

1190 1 430 859 1288 1717 2146 2575 3004 3433 3862 4291 4720 5149 5578 6007 6436 6865 7294 7723 8152 8581 9010 9439 9868 10297 10726 11155 11584 12013 12442 12871 13300 13729 14158 14587 15016 15445 15874 16303 16732 17161 17590 18019 18448 18877 19306 19735 20164 20593 21022 21451 21880 22309 22738 ...

result:

ok Correct. (1 test case)

Test #46:

score: 0
Accepted
time: 319ms
memory: 64480kb

input:

1
4 510510

output:

1428 1 2 3 4 1431 1432 1433 1434 2861 2862 2863 2864 4291 4292 4293 4294 5721 5722 5723 5724 7151 7152 7153 7154 8581 8582 8583 8584 10011 10012 10013 10014 11441 11442 11443 11444 12871 12872 12873 12874 14301 14302 14303 14304 15731 15732 15733 15734 17161 17162 17163 17164 18591 18592 18593 18594...

result:

ok Correct. (1 test case)

Test #47:

score: 0
Accepted
time: 467ms
memory: 76148kb

input:

1
279936 279936

output:

279936 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 ...

result:

ok Correct. (1 test case)

Test #48:

score: 0
Accepted
time: 313ms
memory: 62792kb

input:

1
279936 1

output:

486 1 577 1153 1729 2305 2881 3457 4033 4609 5185 5761 6337 6913 7489 8065 8641 9217 9793 10369 10945 11521 12097 12673 13249 13825 14401 14977 15553 16129 16705 17281 17857 18433 19009 19585 20161 20737 21313 21889 22465 23041 23617 24193 24769 25345 25921 26497 27073 27649 28225 28801 29377 29953 ...

result:

ok Correct. (1 test case)

Test #49:

score: 0
Accepted
time: 311ms
memory: 62768kb

input:

1
279936 2

output:

729 1 385 769 1153 1537 1921 2305 2689 3073 3457 3841 4225 4609 4993 5377 5761 6145 6529 6913 7297 7681 8065 8449 8833 9217 9601 9985 10369 10753 11137 11521 11905 12289 12673 13057 13441 13825 14209 14593 14977 15361 15745 16129 16513 16897 17281 17665 18049 18433 18817 19201 19585 19969 20353 2073...

result:

ok Correct. (1 test case)

Test #50:

score: 0
Accepted
time: 315ms
memory: 62840kb

input:

1
279936 3

output:

864 1 2 3 973 974 975 1945 1946 1947 2917 2918 2919 3889 3890 3891 4861 4862 4863 5833 5834 5835 6805 6806 6807 7777 7778 7779 8749 8750 8751 9721 9722 9723 10693 10694 10695 11665 11666 11667 12637 12638 12639 13609 13610 13611 14581 14582 14583 15553 15554 15555 16525 16526 16527 17497 17498 17499...

result:

ok Correct. (1 test case)

Test #51:

score: 0
Accepted
time: 318ms
memory: 62764kb

input:

1
4 279936

output:

972 1 2 3 4 1153 1154 1155 1156 2305 2306 2307 2308 3457 3458 3459 3460 4609 4610 4611 4612 5761 5762 5763 5764 6913 6914 6915 6916 8065 8066 8067 8068 9217 9218 9219 9220 10369 10370 10371 10372 11521 11522 11523 11524 12673 12674 12675 12676 13825 13826 13827 13828 14977 14978 14979 14980 16129 16...

result:

ok Correct. (1 test case)

Test #52:

score: 0
Accepted
time: 732ms
memory: 100508kb

input:

1
871933 871933

output:

871933 1 90 179 268 357 446 535 624 713 802 891 980 1069 1158 1247 1336 1425 1514 1603 1692 1781 1870 1959 2048 2137 2226 2315 2404 2493 2582 2671 2760 2849 2938 3027 3116 3205 3294 3383 3472 3561 3650 3739 3828 3917 4006 4095 4184 4273 4362 4451 4540 4629 4718 4807 4896 4985 5074 5163 5252 5341 543...

result:

ok Correct. (1 test case)

Test #53:

score: 0
Accepted
time: 410ms
memory: 76880kb

input:

1
871933 1

output:

101 1 8634 17267 25900 34533 43166 51799 60432 69065 77698 86331 94964 103597 112230 120863 129496 138129 146762 155395 164028 172661 181294 189927 198560 207193 215826 224459 233092 241725 250358 258991 267624 276257 284890 293523 302156 310789 319422 328055 336688 345321 353954 362587 371220 37985...

result:

ok Correct. (1 test case)

Test #54:

score: 0
Accepted
time: 408ms
memory: 77288kb

input:

1
2 871933

output:

202 1 2 8634 8635 17267 17268 25900 25901 34533 34534 43166 43167 51799 51800 60432 60433 69065 69066 77698 77699 86331 86332 94964 94965 103597 103598 112230 112231 120863 120864 129496 129497 138129 138130 146762 146763 155395 155396 164028 164029 172661 172662 181294 181295 189927 189928 198560 1...

result:

ok Correct. (1 test case)

Test #55:

score: 0
Accepted
time: 412ms
memory: 76748kb

input:

1
3 871933

output:

303 1 2 3 8634 8635 8636 17267 17268 17269 25900 25901 25902 34533 34534 34535 43166 43167 43168 51799 51800 51801 60432 60433 60434 69065 69066 69067 77698 77699 77700 86331 86332 86333 94964 94965 94966 103597 103598 103599 112230 112231 112232 120863 120864 120865 129496 129497 129498 138129 1381...

result:

ok Correct. (1 test case)

Test #56:

score: 0
Accepted
time: 419ms
memory: 76424kb

input:

1
4 871933

output:

404 1 2 3 4 8634 8635 8636 8637 17267 17268 17269 17270 25900 25901 25902 25903 34533 34534 34535 34536 43166 43167 43168 43169 51799 51800 51801 51802 60432 60433 60434 60435 69065 69066 69067 69068 77698 77699 77700 77701 86331 86332 86333 86334 94964 94965 94966 94967 103597 103598 103599 103600 ...

result:

ok Correct. (1 test case)

Test #57:

score: 0
Accepted
time: 347ms
memory: 115232kb

input:

1
1000000 999999

output:

1000000 1 2 2 3 3 4 4 5 5 6 11 12 12 13 13 14 14 15 15 16 21 22 22 23 23 24 24 25 25 26 31 32 32 33 33 34 34 35 35 36 41 42 42 43 43 44 44 45 45 46 51 52 52 53 53 54 54 55 55 56 61 62 62 63 63 64 64 65 65 66 71 72 72 73 73 74 74 75 75 76 81 82 82 83 83 84 84 85 85 86 91 92 92 93 93 94 94 95 95 96 10...

result:

ok Correct. (1 test case)

Test #58:

score: 0
Accepted
time: 798ms
memory: 101024kb

input:

1
1000000 999998

output:

999998 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 ...

result:

ok Correct. (1 test case)

Test #59:

score: 0
Accepted
time: 349ms
memory: 115432kb

input:

1
1000000 999983

output:

1000000 1 2 2 3 3 4 4 5 5 6 11 12 12 13 13 14 14 15 15 16 21 22 22 23 23 24 24 25 25 26 31 32 32 33 33 34 34 35 35 36 41 42 42 43 43 44 44 45 45 46 51 52 52 53 53 54 54 55 55 56 61 62 62 63 63 64 64 65 65 66 71 72 72 73 73 74 74 75 75 76 81 82 82 83 83 84 84 85 85 86 91 92 92 93 93 94 94 95 95 96 10...

result:

ok Correct. (1 test case)

Test #60:

score: 0
Accepted
time: 747ms
memory: 100468kb

input:

1
1000000 900000

output:

937500 1 25 49 73 97 121 145 169 193 217 241 265 289 313 337 361 385 409 433 457 481 505 529 553 577 601 625 649 673 697 721 745 769 793 817 841 865 889 913 937 961 985 1009 1033 1057 1081 1105 1129 1153 1177 1201 1225 1249 1273 1297 1321 1345 1369 1393 1417 1441 1465 1489 1513 1537 1561 1585 1609 1...

result:

ok Correct. (1 test case)

Test #61:

score: 0
Accepted
time: 704ms
memory: 99036kb

input:

1
500000 1000000

output:

640000 1 26 51 76 101 126 151 176 201 226 251 276 301 326 351 376 401 426 451 476 501 526 551 576 601 626 651 676 701 726 751 776 801 826 851 876 901 926 951 976 1001 1026 1051 1076 1101 1126 1151 1176 1201 1226 1251 1276 1301 1326 1351 1376 1401 1426 1451 1476 1501 1526 1551 1576 1601 1626 1651 167...

result:

ok Correct. (1 test case)

Test #62:

score: 0
Accepted
time: 737ms
memory: 100528kb

input:

1
524288 1000000

output:

655360 1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 93 97 101 105 109 113 117 121 125 129 133 137 141 145 149 153 157 161 165 169 173 177 181 185 189 193 197 201 205 209 213 217 221 225 229 233 237 241 245 249 253 257 261 265 269 273 277 281 285 289 293 297 301 305 309 313 317 3...

result:

ok Correct. (1 test case)

Test #63:

score: 0
Accepted
time: 334ms
memory: 52256kb

input:

6
1 4
531441 999983
2 2
1 1
1 6
4 3

output:

2 1 3
2 1 2

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

result:

ok Correct. (6 test cases)

Test #64:

score: 0
Accepted
time: 342ms
memory: 52148kb

input:

7
1 1
7 6
1 1
3 3
1 1
4 4
999983 524288

output:

2 1 1
1 1

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

2 1 1
1 1

6 1 1 2 2 3 3
3 1 2 3

2 1 1
1 1

4 1 3 3 5
4 1 2 2 3

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

result:

ok Correct. (7 test cases)

Test #65:

score: 0
Accepted
time: 819ms
memory: 93140kb

input:

42
4698 12061
519 18
4 11
1 1
1 1
30 105
106 18
53 45
14230 7541
15 15
36035 39105
7430 11797
101 269
1 1
11 39
12 12
1677 1550
38 54
15974 33669
4 3
14928 32774
27 20
1354 2368
7 49
1 1
1 11
1 1
37 192
1604 1970
135 114
22095 16791
12317 28762
524288 531441
125 18
35746 16893
921 3453
344 42
70290 ...

output:

5481 1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97 103 109 115 121 127 133 139 145 151 157 163 169 175 181 187 193 199 205 211 217 223 229 235 241 247 253 259 265 271 277 283 289 295 301 307 313 319 325 331 337 343 349 355 361 367 373 379 385 391 397 403 409 415 421 427 433 439 445 451 457 463 46...

result:

ok Correct. (42 test cases)

Test #66:

score: 0
Accepted
time: 341ms
memory: 107588kb

input:

9
1 1
1 1
1 1
2 2
1 2
999983 720720
1 1
8 4
1 1

output:

2 1 1
1 1

2 1 1
1 1

2 1 1
1 1

1 1
4 1 2 2 3

2 1 1
2 1 2

720720 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 ...

result:

ok Correct. (9 test cases)

Test #67:

score: 0
Accepted
time: 398ms
memory: 102848kb

input:

38
1427 1873
2 4
1537 896
1 1
1750 1553
1 1
5610 31561
35 2
332 354
6 173
4 6
181 71
3647 3589
6 1
5331 3265
48 965
111270 88190
8097 3502
2 1
17 30
30 50
3 2
1801 1152
720720 720703
101 101
70821 44842
2 3
70 316
1 8
7 7
739 1024
4 21
586 12898
1 2
257 132
19172 1718
5283 5970
2 2

output:

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

result:

ok Correct. (38 test cases)

Test #68:

score: 0
Accepted
time: 360ms
memory: 52348kb

input:

8
1 1
999983 720703
2 2
3 3
1 1
3 4
5 4
1 1

output:

2 1 1
1 1

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

result:

ok Correct. (8 test cases)

Test #69:

score: 0
Accepted
time: 731ms
memory: 101116kb

input:

29
1 1
41 42
2 22
1220 451
8 2
58 94
2 4
1 1
255 179
5 1
3514 591
3 4
22 4
232 702
1 2
358 320
2768 497
928 525
2 51
1 9
85 207
41 47
221 174
5 5
988027 986040
1251 80
217 220
2 11
1 1

output:

2 1 1
1 1

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

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

671 1 21 41 ...

result:

ok Correct. (29 test cases)

Test #70:

score: 0
Accepted
time: 353ms
memory: 114708kb

input:

25
84 35
1 1
110 118
1163 724
1 2
1 1
19 6
38 55
62 50
4 151
5866 4399
2 3
5 3
13 13
986039 988027
1 1
184 869
255 717
1 1
67 57
6 15
21 24
4 3
2474 284
258 145

output:

49 1 6 11 13 16 18 21 23 25 26 28 30 31 33 35 37 38 40 42 43 45 47 49 50 52 54 55 57 59 61 62 64 66 67 69 71 73 74 76 78 79 81 83 86 88 91 93 98 103
60 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 7 7 7 7 7 8 8 8 8 8 9 9 9 9 9 10 10 10 10 10 11 11 11 11 11 12 12 12 12 12 13 13 13 13 14 14 14 15 15 16

2 ...

result:

ok Correct. (25 test cases)

Test #71:

score: 0
Accepted
time: 333ms
memory: 114452kb

input:

34
59 174
406 33
1 1
7 7
16 11
1 1
2 6
168 897
9 10
442 292
1 1
86 120
821 424
40 14
68 2758
367 449
3 4
148 243
20 4
184 142
1 2
2 1
1 9
107 129
173 636
6 2
3 14
1531 405
131 142
633 2649
23 59
18 50
988027 986023
57 144

output:

87 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173
118 ...

result:

ok Correct. (34 test cases)

Test #72:

score: 0
Accepted
time: 352ms
memory: 114400kb

input:

28
708 966
59 13
6 10
6 16
30 38
9 2
2 2
8 8
1 142
10 20
5 20
393 77
230 465
210 9
622 329
1276 1402
1 1
72 380
3 1
264 364
880 679
1 1
11 42
21 27
986041 988027
2175 468
2680 427
66 1038

output:

826 1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97 103 109 115 121 127 133 139 139 145 145 151 151 157 157 163 163 169 169 175 175 181 181 187 187 193 193 199 199 205 205 211 211 217 217 223 223 229 229 235 235 241 241 247 247 253 253 259 259 265 265 271 271 277 277 277 283 283 283 289 289 289 295...

result:

ok Correct. (28 test cases)

Test #73:

score: 0
Accepted
time: 366ms
memory: 74304kb

input:

4
1 1
2 3
999995 799991
1 1

output:

2 1 1
1 1

4 1 1 2 2
3 1 2 3

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

result:

ok Correct. (4 test cases)

Test #74:

score: 0
Accepted
time: 799ms
memory: 99748kb

input:

6
1 1
1 1
1 1
1 1
1 1
999995 799992

output:

2 1 1
1 1

2 1 1
1 1

2 1 1
1 1

2 1 1
1 1

2 1 1
1 1

799996 1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106 111 116 121 126 131 136 141 146 151 156 161 166 171 176 181 186 191 196 201 206 211 216 221 226 231 236 241 246 251 256 261 266 271 276 281 286 291 296 301 306 311 316 321 ...

result:

ok Correct. (6 test cases)

Test #75:

score: 0
Accepted
time: 332ms
memory: 110996kb

input:

5
2 2
1 1
1 1
1 1
799993 999995

output:

1 1
4 1 2 2 3

2 1 1
1 1

2 1 1
1 1

2 1 1
1 1

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

result:

ok Correct. (5 test cases)

Test #76:

score: 0
Accepted
time: 659ms
memory: 72932kb

input:

47
1 1
22 26
2883 3705
3 21
3184 132
287 521
4024 8251
5411 995
262144 524288
13 7
108 160
10999 146603
5695 4137
211 130
64 542
2 6
91 10
159 223
27 46
4 3
37992 10217
1292 1509
130194 143457
3924 1771
53 76
68 137
15 12
6 6
1 1
1264 307
13283 76
62 15
1 1
5 9
1295 1592
6 2
352 288
1 1
10526 25592
...

output:

2 1 1
1 1

22 1 3 5 7 9 11 13 14 15 16 17 18 19 20 21 22 24 26 28 30 32 34
26 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14

2945 1 40 79 94 118 133 157 172 187 196 211 226 235 250 265 274 280 289 304 313 319 328 343 352 358 367 373 382 391 397 406 412 421 430 436 445 451 460 466 469 ...

result:

ok Correct. (47 test cases)

Test #77:

score: 0
Accepted
time: 648ms
memory: 73960kb

input:

47
678 953
1 2
3 3
235 36
1 2
75364 55166
1 1
9 4
1820 6589
131072 524288
7 405
14421 13529
170 131
89 306
4404 1036
1 8
3068 1609
1 1
8 52
388 244
13 4
8097 42399
6 2
4444 2321
8564 21145
3 5
322 520
16341 12885
80 320
28 13
10352 6091
11 11
27056 17200
8413 2337
2 40
12424 10239
41839 29920
2 2
30...

output:

678 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 81 81 82 85 86 86 87 87 88 91 92 92 93 93 94 97 98 98 99 99 100 ...

result:

ok Correct. (47 test cases)

Test #78:

score: 0
Accepted
time: 515ms
memory: 73416kb

input:

45
2522 2234
19 11
30 2
21 34
2166 2909
7572 17298
44 31
5 5
793 1866
2 2
177147 531441
1 1
229 20
5908 1062
2276 5573
51677 26191
138 132
15 10
7469 112499
348 191
107537 130218
2 1
66902 38459
3 3
52 17
22 13
34346 22431
1 3
206 322
1 1
335 661
4 4
9 1
1 1
2 4
7 10
620 2357
8921 5587
124 97
557 11...

output:

2234 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

result:

ok Correct. (45 test cases)

Test #79:

score: 0
Accepted
time: 628ms
memory: 74928kb

input:

40
1 1
1 1
143997 127776
27 24
325 12426
5080 15238
23 23
124 54
28 85
2512 51088
59 10
15672 9833
761 1454
387 465
5728 5858
3613 2964
138 114
50274 144792
4 5
2 11
745 686
1 1
3 3
7 3
59049 531441
1331 947
1511 5217
8067 1526
2208 4545
32965 50506
142 29
32 25
61 126
4 20
5 5
900 1171
36 36
1326 2...

output:

2 1 1
1 1

2 1 1
1 1

127776 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 103 106 109 112 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226 229...

result:

ok Correct. (40 test cases)

Test #80:

score: 0
Accepted
time: 456ms
memory: 76820kb

input:

25
1 2
2 1
1 1
8 14
4 3
16 16
5 1
1 1
121 379
793 154
103 74
926 144
75 89
13 8
19 15
994009 997
230 254
1 1
148 254
8 11
2668 2557
343 220
14 7
6 2
73 25

output:

2 1 1
2 1 2

2 1 1
2 1 2

2 1 1
1 1

8 1 3 5 7 8 10 12 14
14 1 2 2 3 3 4 4 5 5 6 6 7 7 8

2 1 3
6 1 2 2 3 3 4

16 1 3 5 7 9 9 11 11 13 13 15 15 17 19 21 23
16 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9

2 1 1
5 1 2 3 4 5

2 1 1
1 1

242 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16...

result:

ok Correct. (25 test cases)

Test #81:

score: 0
Accepted
time: 467ms
memory: 78036kb

input:

26
58 9
642 392
1 1
1 3
106 28
1 1
1 1
38 5
1266 2765
1 3
4 2
16 16
699 728
315 366
371 15
32 44
44 59
988027 997
2 2
13 21
1 10
5301 1300
8 5
399 259
849 240
56 177

output:

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

428 1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97 99 103 105 109 111 115 117 121 123 127 129 133 135 139 141 145 147 151 153 157 159 163 165 169 171 175 177 181 183 18...

result:

ok Correct. (26 test cases)

Test #82:

score: 0
Accepted
time: 464ms
memory: 77864kb

input:

25
2 1
11 9
566 503
1 1
7 8
446 872
2123 1740
25 5
60 146
32 67
341 281
4127 834
1 1
879 608
2 20
1 1
991 988027
38 28
37 53
667 398
782 654
541 190
699 505
2 2
1 1

output:

2 1 1
2 1 2

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

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

result:

ok Correct. (25 test cases)

Test #83:

score: 0
Accepted
time: 459ms
memory: 77604kb

input:

30
353 150
426 161
1676 837
6 9
997 980051
1368 4284
55 14
1202 216
115 146
108 287
21 16
6835 3320
1370 2364
413 452
6 16
36 12
490 267
30 44
1 1
4 4
3 7
412 130
486 352
1 1
6 7
3 3
149 119
18 26
21 100
57 45

output:

150 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 81 81 82 85 86 86 87 87 88 91 92 92 93 93 94 97 98 98 99 99 100 ...

result:

ok Correct. (30 test cases)

Test #84:

score: 0
Accepted
time: 456ms
memory: 77188kb

input:

37
176 121
42 23
3637 1131
1 1
1 1
324 76
4 2
28 29
2015 459
1 50
1574 238
19 10
1 10
94 943
264 92
37 66
887 790
206 60
7 1
11 9
983 974153
111 139
7 8
19 17
1 1
332 487
6883 694
3 11
6 2
2 1
7 5
110 97
4 30
4383 7603
124 132
141 108
2 1

output:

121 1 12 17 23 28 33 34 39 44 45 49 50 55 56 60 61 65 66 67 71 72 76 77 78 81 82 83 87 88 89 92 93 94 97 98 99 100 103 104 105 108 109 110 111 113 114 115 116 119 120 121 124 125 126 127 129 130 131 132 135 136 137 140 141 142 143 145 146 147 148 151 152 153 156 157 158 159 161 162 163 164 167 168 1...

result:

ok Correct. (37 test cases)

Test #85:

score: 0
Accepted
time: 448ms
memory: 76896kb

input:

30
1089 6672
1056 120
51 75
71 65
1 1
3 7
2 3
162 7774
17960 4597
183 169
9 13
9425 661
618 913
267 152
477 2084
1 1
3 5
36001 2632
985 19
87 52
1 1
100 81
1670 1480
12 2
97 912673
23 26
1 1
139 750
802 680
145 382

output:

2502 1 25 49 73 97 121 122 145 146 169 170 193 194 217 218 241 242 243 265 266 267 289 290 291 313 314 315 337 338 339 361 362 363 364 385 386 387 388 409 410 411 412 433 434 435 436 457 458 459 460 481 482 483 484 485 505 506 507 508 509 529 530 531 532 533 553 554 555 556 557 577 578 579 580 581 6...

result:

ok Correct. (30 test cases)

Test #86:

score: 0
Accepted
time: 478ms
memory: 77388kb

input:

41
63 41
109 7
14 48
466 7394
554 532
217 156
4685 11172
1911 1551
16 16
2 2
223 449
50 66
1 1
6 89
53 11
752 971
2 1
9409 912673
11 68
3 3
1096 3795
1693 828
4 4
13702 39283
1 9
284 672
3671 1823
64 157
4 3
1 1
5379 1404
3951 509
227 81
34 5
8 12
3 40
1 1
1 1
40 200
157 1027
1811 3978

output:

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

14 1 1...

result:

ok Correct. (41 test cases)

Test #87:

score: 0
Accepted
time: 464ms
memory: 76800kb

input:

12
1 1
2 1
5 7
28 36
1 1
1 1
3 8
1 3
9 5
1 1
999929 1259
2 2

output:

2 1 1
1 1

2 1 1
2 1 2

10 1 1 2 2 3 3 4 4 5 5
7 1 2 3 4 5 6 7

28 1 3 5 7 9 11 13 15 17 19 19 21 21 23 23 25 25 27 27 29 31 33 35 37 39 41 43 45
36 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19

2 1 1
1 1

2 1 1
1 1

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

2 1 1
3 1 2 ...

result:

ok Correct. (12 test cases)

Test #88:

score: 0
Accepted
time: 638ms
memory: 76168kb

input:

41
30944 15179
8 75
597 3531
1 6
12 1
44 146
19749 22875
43190 12781
1471 2110
32 79
631 9
1477 1259
287454 289410
87221 92189
3 3
1816 2636
729 601
25 50
1 1
14381 70906
15281 10085
15 13
5733 8032
1 1
121693 145733
69749 23909
306 97
1 12
4785 5741
19 37
2 2
272 155
2 1
191 65
6723 13361
43893 561...

output:

15472 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 1...

result:

ok Correct. (41 test cases)

Test #89:

score: 0
Accepted
time: 745ms
memory: 93284kb

input:

25
277 17
1 1
1 2
2 6
1245 196
53 12
2 2
82 145
3 8
5 4
1 30
1 1
33 33
253 448
109 138
290 327
1 2
2 1
11 11
256 356
1 2
994009 524288
137 127
1 1
1863 2759

output:

34 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17
277 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73...

result:

ok Correct. (25 test cases)

Test #90:

score: 0
Accepted
time: 745ms
memory: 101140kb

input:

29
20 15
798 397
4 4
1 1
982081 994009
7 1
56 85
133 79
1 1
2 1
48 36
381 372
1 1
170 61
220 685
2 2
2356 296
252 442
3 2
618 325
84 71
65 38
2 1
10 11
2 7
18 2
1 3
4 7
25 37

output:

15 1 5 6 9 10 11 13 14 15 17 18 19 22 23 27
20 1 2 2 3 3 3 4 4 4 4 5 5 5 5 6 6 6 7 7 8

399 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131...

result:

ok Correct. (29 test cases)

Test #91:

score: 0
Accepted
time: 762ms
memory: 93376kb

input:

36
4289 2120
47 32
18 25
126 67
62 192
59 1
168 360
821 3643
1500 1073
12 11
601 375
1656 1038
9 14
728 613
1 2
1 1
2 4
1 1
4758 2969
24037 12901
2 18
70 115
406 25
11993 10613
29 54
1 1
923521 524288
7 8
310 42
197 142
20 32
8063 14598
5274 1531
278 171
39 166
974 46

output:

2120 1 2 2 3 3 4 4 5 5 6 11 12 12 13 13 14 14 15 15 16 21 22 22 23 23 24 24 25 25 26 31 32 32 33 33 34 34 35 35 36 41 42 42 43 43 44 44 45 45 46 51 52 52 53 53 54 54 55 55 56 61 62 62 63 63 64 64 65 65 66 71 72 72 73 73 74 74 75 75 76 81 82 82 83 83 84 84 85 85 86 91 92 92 93 93 94 94 95 95 96 101 1...

result:

ok Correct. (36 test cases)

Test #92:

score: 0
Accepted
time: 744ms
memory: 100680kb

input:

31
9810 15970
764 741
6 6
1 1
13 2
63 153
79 79
78 14
11315 2838
923521 531441
13480 13770
1646 890
137 136
9 8
22 15
180 340
36 33
1909 4131
1703 1400
2 2
3 1
1 1
2026 1169
129 1400
6712 2708
4914 396
2 6
22 307
1 1
7169 10933
1 1

output:

10900 1 10 19 28 37 46 55 64 73 82 91 100 109 118 127 136 145 154 163 172 181 190 199 208 217 226 235 244 253 262 271 280 289 298 307 316 325 334 343 352 361 370 379 388 397 406 415 424 433 442 451 460 469 478 487 496 505 514 523 532 541 550 559 568 577 586 595 604 613 622 631 640 649 658 667 676 68...

result:

ok Correct. (31 test cases)

Test #93:

score: 0
Accepted
time: 747ms
memory: 93060kb

input:

36
3 3
230 1476
1 1
6 1
3688 33321
152 168
731 1509
74 115
1 29
1 4
2062 1542
2064 2576
32 29
14883 7639
988 4463
80 75
2 2
912673 279841
139 51
2713 7207
501 148
51 2
25 30
11517 14325
14 16
1 1
331 161
882 639
1 1
1807 1180
2 6
2 2
666 86
6 52
210 239
341 128

output:

6 1 1 2 2 3 3
3 1 2 3

552 1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106 111 116 121 124 126 129 131 134 136 139 141 144 146 149 151 154 156 159 161 164 166 169 171 174 176 179 181 184 186 189 191 194 196 199 201 204 206 209 211 214 216 219 221 224 226 229 234 239 244 247 249 252...

result:

ok Correct. (36 test cases)

Test #94:

score: 0
Accepted
time: 745ms
memory: 92656kb

input:

36
27328 32141
372 585
9 19
2348 400
26750 20719
28 16
203 239
4 3
11 11
1 1
18292 52201
3 1
17865 11540
1 4
92 70
304 460
1 1
2 2
1189 7441
7364 2071
44 31
5 4
180 320
38510 28928
122 115
5 5
2548 935
37188 78751
1 1
1090 4114
4569 165
653 810
1 6
6734 15086
371293 707281
269 190

output:

27328 1 2 2 3 3 4 4 5 5 6 6 7 7 8 15 16 16 17 17 18 18 19 19 20 20 21 21 22 29 30 30 31 31 32 32 33 33 34 34 35 35 36 43 44 44 45 45 46 46 47 47 48 48 49 49 50 57 58 58 59 59 60 60 61 61 62 62 63 63 64 71 72 72 73 73 74 74 75 75 76 76 77 77 78 85 86 86 87 87 88 88 89 89 90 90 91 91 92 99 100 100 101...

result:

ok Correct. (36 test cases)

Test #95:

score: 0
Accepted
time: 800ms
memory: 92704kb

input:

40
862 952
22 1
205 156
336 474
35 26
5121 1557
5 3
846 318
10310 17851
27 96
1589 227
77 158
2 2
141 2783
5 5
41 55
7822 3420
28 27
2 3
265 67
2372 18
1 1
1856 2770
62685 3910
571787 524288
4799 38454
2096 18681
2 2
4222 6522
947 1929
11674 6145
198204 20142
6 2
1102 779
1 1
8 13
24 32
33 141
24924...

output:

862 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175...

result:

ok Correct. (40 test cases)

Test #96:

score: 0
Accepted
time: 774ms
memory: 93208kb

input:

41
5 14
14 52
75469 71109
2 2
1 1
631 904
74 106
524288 704969
1002 688
16436 4768
2 3
1 1
21854 13565
306 320
41 210
3163 8216
755 352
1 1
5454 11191
4 2
1 1
158 185
23 143
1 1
31941 32979
89 50
11 12
29757 18535
730 813
173 206
6 2
1444 3823
4771 305
1 1
44 2
88 68
4 1
5347 5434
7 18
28008 78378
9...

output:

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

26 1 5 8 9 12 13 16 17 20 21 24 25 28 29 32 33 36 37 40 41 44 45 48 49 52 56
28 1 2 2 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 9 9 10

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

result:

ok Correct. (41 test cases)

Test #97:

score: 0
Accepted
time: 783ms
memory: 93064kb

input:

34
98 163
4 6
14 11
82 1
13821 21255
10 22
15 4
15 2
1 1
4423 2780
1479 1680
3 2
14556 438
156 354
2 1
28 64
1 1
354 1278
22874 32321
968 550
10 7
1563 879
934 292
823543 707281
2218 1576
102 47
4 9
9 44
45724 63765
746 4924
152 65
25510 11120
2 2
1 1

output:

98 1 2 2 3 3 4 4 5 5 6 6 7 7 8 15 16 16 17 17 18 18 19 19 20 20 21 21 22 29 30 30 31 31 32 32 33 33 34 34 35 35 36 43 44 44 45 45 46 46 47 47 48 48 49 49 50 57 58 58 59 59 60 60 61 61 62 62 63 63 64 71 72 72 73 73 74 74 75 75 76 76 77 77 78 85 86 86 87 87 88 88 89 89 90 90 91 91 92
163 1 3 5 7 8 9 1...

result:

ok Correct. (34 test cases)

Test #98:

score: 0
Accepted
time: 792ms
memory: 92852kb

input:

36
2 119
27 17
6 2
1 1
1 1
1 13
26 31
155 157
912673 823543
1 2
3643 2665
16102 17734
13798 9749
476 476
6663 3820
6 19
3 7
1 1
2 2
7 130
1387 703
272 220
2939 2777
13 1
3 4
48 28
35 29
7 7
1 1
35896 18754
284 72
1 1
1032 3033
127 176
146 399
2 1

output:

14 1 2 18 19 35 36 52 53 69 70 86 87 103 104
17 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

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

3 1 3 5
4 1 2 2 3

2 1 1
1 1

2 1 1
1 1

2 1 1
13 ...

result:

ok Correct. (36 test cases)

Test #99:

score: 0
Accepted
time: 944ms
memory: 106296kb

input:

40
858 537
42 163
250 365
2693 400
174 228
257 430
49 78
5891 2416
14939 453
1 1
524288 786431
11 6
5 2
3 3
43 261
61758 8780
19 192
3208 3154
64877 44965
5313 3399
10 20
18111 25542
9 7
46 52
9610 3756
1 1
3593 2031
44 215
6877 9773
15 2
65 26
140 665
2370 2673
1 1
34 35
1 1
3 1
3 4
1 1
13 17

output:

537 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 103 106 109 112 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226 229 232 235 238 241 244 247 ...

result:

ok Correct. (40 test cases)

Test #100:

score: 0
Accepted
time: 571ms
memory: 64572kb

input:

44
2 1
447 544
4270 2693
936 618
18 24
68 190
2 3
664 1307
3 3
278721 63772
82 67
66840 36321
2036 1918
25 46
39 6
1 1
7 48
27758 18781
1061 1385
14 14
16536 2830
19028 45407
3 7
2 7
6 1
191002 30138
2706 690
1545 23255
21518 19702
288 555
3 6
2204 2868
1474 9846
4 2
2965 2989
197668 162174
13121 19...

output:

2 1 1
2 1 2

544 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 69 70 70 71 71 72 72 73 73 74 74 75 75 76 76 77 77 78 78 79 79 80 80 81 81 82 82 83 83 84 84 85 ...

result:

ok Correct. (44 test cases)

Test #101:

score: 0
Accepted
time: 385ms
memory: 52592kb

input:

4000
44 72
176 47
488 420
89 102
212 35
164 61
140 66
260 277
10 368
310 115
11 341
7 190
156 239
19 28
65 109
127 124
369 87
405 221
195 150
141 338
16 7
107 200
60 462
100 237
452 426
487 255
86 37
71 23
489 217
285 103
327 67
248 294
115 51
100 216
198 247
89 311
74 174
223 169
60 140
57 464
210 ...

output:

48 1 7 12 13 18 19 23 24 25 29 30 31 34 35 36 37 40 41 42 43 46 47 48 49 52 53 54 55 58 59 60 61 64 65 66 67 70 71 72 76 77 78 82 83 88 89 94 100
66 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 8 8 8 8 8 8 9 9 9 9 9 9 10 10 10 10 10 10 11 11 11 11 11 11 12 12 12 12 12 13 13 13 13 14 14 14 1...

result:

ok Correct. (4000 test cases)

Test #102:

score: 0
Accepted
time: 390ms
memory: 52744kb

input:

3000
388 14
189 94
450 293
396 119
220 606
315 643
132 385
426 448
22 261
649 537
112 221
64 55
126 632
18 62
476 494
332 298
290 454
276 292
311 361
55 191
542 431
246 53
66 1
215 600
19 309
56 17
63 13
195 491
470 436
102 41
543 532
444 622
602 549
355 88
286 318
234 15
9 4
4 397
101 112
398 563
1...

output:

56 1 2 3 4 5 6 7 8 9 10 11 12 13 14 98 99 100 101 102 103 104 105 106 107 108 109 110 111 195 196 197 198 199 200 201 202 203 204 205 206 207 208 292 293 294 295 296 297 298 299 300 301 302 303 304 305
97 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35...

result:

ok Correct. (3000 test cases)

Test #103:

score: 0
Accepted
time: 399ms
memory: 52584kb

input:

2500
308 379
182 193
494 380
43 69
198 97
91 91
386 168
136 57
367 464
764 545
124 177
337 43
234 185
633 557
114 2
224 130
402 503
176 90
1 12
410 118
3 487
406 692
65 4
742 638
24 43
12 11
207 42
389 546
8 9
401 656
21 59
801 801
154 140
442 51
24 20
485 228
98 39
127 41
275 39
23 447
513 671
121 ...

output:

308 1 2 2 3 3 4 4 5 5 6 6 7 7 8 15 16 16 17 17 18 18 19 19 20 20 21 21 22 29 30 30 31 31 32 32 33 33 34 34 35 35 36 43 44 44 45 45 46 46 47 47 48 48 49 49 50 57 58 58 59 59 60 60 61 61 62 62 63 63 64 71 72 72 73 73 74 74 75 75 76 76 77 77 78 85 86 86 87 87 88 88 89 89 90 90 91 91 92 99 100 100 101 1...

result:

ok Correct. (2500 test cases)

Test #104:

score: 0
Accepted
time: 394ms
memory: 52584kb

input:

2000
336 302
244 75
463 393
716 478
15 431
108 148
47 19
312 962
191 665
533 45
704 60
304 554
494 49
194 612
921 903
627 181
244 497
620 268
298 792
11 5
219 124
68 62
65 129
107 781
786 608
187 450
325 490
207 16
362 790
684 397
307 743
257 888
392 519
379 330
135 248
878 612
2 153
581 136
158 325...

output:

302 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 169 171 171...

result:

ok Correct. (2000 test cases)

Test #105:

score: 0
Accepted
time: 396ms
memory: 52700kb

input:

1500
234 402
374 748
1089 613
24 80
251 1179
861 1014
675 206
41 326
265 1085
1240 933
267 1282
120 197
75 963
580 173
149 503
144 312
83 97
1141 155
81 448
165 1189
495 249
999 1084
910 526
1290 254
16 173
862 347
773 825
282 1018
15 24
10 23
893 538
198 1110
250 459
463 729
233 436
446 979
186 666...

output:

268 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 103 106 109 112 115 118 118 121 121 124 124 127 127 130 130 133 133 136 136 139 139 142 142 145 145 148 148 151 151 154 154 157 157 160 160 163 163 166 166 169 169 172 172 175 175 178 178 181 181 ...

result:

ok Correct. (1500 test cases)

Test #106:

score: 0
Accepted
time: 402ms
memory: 52676kb

input:

1000
1026 1995
2 22
1219 113
238 682
859 798
146 98
184 1771
676 1664
329 456
918 1734
1033 20
13 17
31 193
311 1016
1397 1940
6 205
820 60
1425 1541
113 499
411 175
2 288
779 1669
1013 942
115 680
165 91
1062 671
543 290
180 343
134 225
993 1176
33 50
1247 1764
508 402
276 1047
3362 1791
1384 32
58...

output:

1330 1 28 55 58 82 85 109 112 115 136 139 142 163 166 169 172 190 193 196 199 217 220 223 226 229 244 247 250 253 256 271 274 277 280 283 286 298 301 304 307 310 313 325 328 331 334 337 340 343 352 355 358 361 364 367 370 379 382 385 388 391 394 397 400 406 409 412 415 418 421 424 427 433 436 439 44...

result:

ok Correct. (1000 test cases)

Test #107:

score: 0
Accepted
time: 413ms
memory: 52732kb

input:

750
2373 1215
2551 377
20 493
372 1235
763 1195
1486 2603
747 578
640 967
197 400
1674 2167
318 396
1296 1308
85 655
1403 2305
1917 1697
823 1314
1496 1265
1729 2081
1284 255
2286 1635
536 665
679 651
240 2019
235 723
958 1066
18 62
392 190
2320 2463
614 167
472 147
559 1008
634 1370
1365 1641
1020 ...

output:

1695 1 22 43 64 82 85 103 106 124 127 145 148 163 166 169 184 187 190 205 208 211 226 229 232 244 247 250 253 265 268 271 274 286 289 292 295 307 310 313 316 325 328 331 334 337 346 349 352 355 358 367 370 373 376 379 388 391 394 397 400 406 409 412 415 418 421 427 430 433 436 439 442 448 451 454 45...

result:

ok Correct. (750 test cases)

Test #108:

score: 0
Accepted
time: 418ms
memory: 52812kb

input:

500
1669 719
570 443
1001 2226
2998 2993
2855 2719
2789 1464
2777 2088
1179 699
2984 3781
699 269
3295 1149
842 215
2181 2141
462 380
2176 130
2205 692
2304 549
198 455
3666 2882
1335 2884
1857 1270
1777 1295
1387 271
311 333
2184 1311
2620 2182
841 1621
3490 1568
1231 2181
2595 3082
169 296
1585 86...

output:

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

result:

ok Correct. (500 test cases)

Test #109:

score: 0
Accepted
time: 436ms
memory: 53252kb

input:

250
268 333
418 540
6371 4690
15 4202
3466 2578
230 372
5190 5798
4363 5184
692 1769
5403 6362
2518 4632
5122 5292
1014 7741
37 372
8444 3420
107 6815
3260 2772
2074 2093
4862 1855
3967 7728
564 674
792 5880
160 1493
1779 2939
6601 1638
148 5543
1128 4050
6878 2606
4334 3595
6438 6596
3899 4865
152 ...

output:

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

result:

ok Correct. (250 test cases)

Test #110:

score: 0
Accepted
time: 461ms
memory: 53468kb

input:

125
2849 10070
3126 7163
2047 3662
7796 8049
1212 49
7581 2808
9611 8688
5301 6143
108 1203
2255 3081
5385 8747
3872 2726
10406 6220
9531 7875
338 650
3002 2737
13341 2596
888 581
1134 12966
183 6831
4857 2146
6945 7814
13443 10817
5230 14462
96 140
6992 4737
11537 9024
12483 4846
12305 891
4433 164...

output:

5035 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 17...

result:

ok Correct. (125 test cases)

Test #111:

score: 0
Accepted
time: 478ms
memory: 53924kb

input:

100
7159 2157
10415 970
19324 14008
298 4233
11641 12770
509 5637
2934 8915
6288 4722
14070 6323
3 30
8477 6877
16101 2505
13403 1764
2902 18181
1640 1184
4079 1667
73 17661
3654 7083
3739 6190
996 20110
1430 1200
3046 16934
18529 16916
4336 6334
7479 5381
16875 18790
12833 3403
9179 12996
1338 9652...

output:

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

result:

ok Correct. (100 test cases)

Test #112:

score: 0
Accepted
time: 499ms
memory: 55456kb

input:

50
12203 5744
43643 8540
16948 45662
4488 6743
10974 18625
21080 6312
38714 12746
5762 5889
27726 40541
7736 15631
10081 495
8896 3395
2403 2263
15548 3396
26888 19708
7995 11096
24581 26912
1298 11574
14811 39892
41820 28794
7626 10232
23981 4796
17976 15632
4627 38160
969 15431
19523 19747
2665 23...

output:

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

result:

ok Correct. (50 test cases)

Test #113:

score: 0
Accepted
time: 423ms
memory: 57364kb

input:

25
68773 78158
258 17659
6289 54936
13341 17981
60070 72947
7969 4604
15536 14866
2323 2802
1185 859
36081 73850
104704 25723
23678 30268
29910 65257
63653 13136
31941 13139
953 3239
81349 9896
13331 25528
5849 16938
2479 20737
76785 9067
3739 33179
18498 28963
13434 2242
3614 61002

output:

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

result:

ok Correct. (25 test cases)

Test #114:

score: 0
Accepted
time: 442ms
memory: 63708kb

input:

10
49504 1041
19068 183591
113321 86560
48049 105109
139970 102484
286 30518
133051 119913
146298 172121
7422 137
65393 46486

output:

7072 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 113 120 127 134 141 148 155 162 169 176 183 190 197 204 211 218 225 232 239 246 253 260 267 274 281 288 295 302 309 316 323 330 337 344 351 358 365 372 379 386 393 400 407 414 421 428 435 442 449 456 463 470 477 484 491 498 505 512 519 526 533 540 ...

result:

ok Correct. (10 test cases)

Test #115:

score: 0
Accepted
time: 536ms
memory: 65708kb

input:

5
277262 181058
63727 372609
108285 88494
31228 125539
116305 4605

output:

181058 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 ...

result:

ok Correct. (5 test cases)

Test #116:

score: 0
Accepted
time: 368ms
memory: 80232kb

input:

2
521875 319971
123 478125

output:

521875 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 7 7 7 7 7 8 8 8 8 8 9 9 9 9 9 10 10 10 10 10 11 11 11 11 11 12 12 12 12 12 13 13 13 13 13 14 14 14 14 14 15 15 15 15 15 16 16 16 16 16 17 17 17 17 17 18 18 18 18 18 19 19 19 19 19 20 20 20 20 20 21 21 21 21 21 22 22 22 22 22 23 23 23 23 23 24 24 24 24 2...

result:

ok Correct. (2 test cases)

Test #117:

score: 0
Accepted
time: 660ms
memory: 92804kb

input:

1
1000000 199252

output:

436000 1 458 915 1001 1372 1458 1829 1915 2001 2286 2372 2458 2743 2829 2915 3001 3200 3286 3372 3458 3657 3743 3829 3915 4001 4114 4200 4286 4372 4458 4571 4657 4743 4829 4915 5001 5028 5114 5200 5286 5372 5458 5485 5571 5657 5743 5829 5915 5942 6001 6028 6114 6200 6286 6372 6399 6458 6485 6571 665...

result:

ok Correct. (1 test case)

Test #118:

score: 0
Accepted
time: 379ms
memory: 52128kb

input:

4000
77 93
264 120
348 323
71 222
100 19
231 92
86 173
172 76
296 243
174 326
209 107
190 177
195 6
14 343
278 151
342 276
253 294
198 96
147 189
207 342
10 256
179 52
143 170
178 158
85 130
160 271
122 305
16 74
350 199
302 128
142 69
95 23
246 66
232 14
312 37
199 9
282 222
71 197
166 12
304 121
1...

output:

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

result:

ok Correct. (4000 test cases)

Test #119:

score: 0
Accepted
time: 375ms
memory: 52312kb

input:

4000
9 256
29 268
320 288
347 344
219 105
339 109
111 262
187 265
12 142
59 49
125 83
116 196
314 205
177 112
341 348
316 239
180 153
119 116
175 321
227 179
347 263
98 304
308 261
52 27
42 237
149 55
279 279
100 170
110 63
284 34
99 267
147 337
198 90
249 319
191 342
332 316
283 156
56 29
72 62
55 ...

output:

48 1 4 7 17 20 23 33 36 39 49 52 55 65 68 71 81 84 87 97 100 103 113 116 119 129 132 135 145 148 151 161 164 167 177 180 183 193 196 199 209 212 215 225 228 231 241 244 247
48 1 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 11 11 11 12 12 12 13 13 13 14 14 14 15 15 15 16 16 16 17 17 18

67 ...

result:

ok Correct. (4000 test cases)

Test #120:

score: 0
Accepted
time: 385ms
memory: 52244kb

input:

4000
336 5
204 23
60 200
219 330
327 5
180 39
136 251
32 253
216 4
129 133
282 193
134 1
99 153
69 187
219 58
152 211
294 124
130 156
5 190
105 157
330 207
87 51
278 199
20 346
143 73
197 76
138 295
190 348
151 66
142 30
26 190
175 293
113 86
272 335
318 247
309 173
234 86
263 110
196 24
224 254
9 7...

output:

40 1 2 3 4 5 43 44 45 46 47 85 86 87 88 89 127 128 129 130 131 169 170 171 172 173 211 212 213 214 215 253 254 255 256 257 295 296 297 298 299
42 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

68 1 4 7 10 13 16 19 22 25 28 31 34 ...

result:

ok Correct. (4000 test cases)

Test #121:

score: 0
Accepted
time: 388ms
memory: 52112kb

input:

4000
249 73
204 154
33 205
43 334
252 311
92 208
198 41
288 271
94 248
281 195
152 276
157 102
139 104
42 158
341 119
101 33
124 116
284 347
233 172
19 22
93 253
146 190
58 87
256 350
104 338
289 95
148 202
254 272
301 270
310 141
37 17
201 303
44 124
270 185
139 231
68 90
42 135
83 257
109 302
46 3...

output:

83 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 103 106 109 112 115 118 121 124 127 130 133 136 139 142 145 148 151 154 157 160 163 166 169 172 175 178 181 184 187 190 193 196 199 202 205 208 211 214 217 220 223 226 229 232 235 238 241 244 247
2...

result:

ok Correct. (4000 test cases)

Test #122:

score: 0
Accepted
time: 379ms
memory: 52348kb

input:

4000
61 322
285 335
113 160
182 217
345 199
247 51
44 91
277 11
137 221
37 255
44 298
144 263
200 343
140 26
36 165
160 22
348 189
174 75
217 17
10 345
76 98
234 288
177 237
302 189
64 41
204 35
285 269
26 142
11 240
159 133
312 204
125 334
62 295
227 228
5 33
283 126
149 257
39 113
156 149
76 240
2...

output:

122 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 19...

result:

ok Correct. (4000 test cases)

Test #123:

score: 0
Accepted
time: 378ms
memory: 52792kb

input:

4000
23 126
248 283
33 192
271 332
236 297
91 179
95 47
143 246
224 289
271 6
284 305
204 187
240 133
278 34
4 263
229 122
250 278
54 96
12 99
184 2
259 223
170 170
117 145
258 116
208 57
311 18
94 228
312 78
326 177
207 2
125 75
8 306
277 324
176 327
133 133
59 26
250 54
98 302
318 130
92 327
318 2...

output:

46 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
63 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 ...

result:

ok Correct. (4000 test cases)

Test #124:

score: 0
Accepted
time: 381ms
memory: 52572kb

input:

4000
106 49
211 53
9 173
166 58
78 49
24 149
173 304
305 135
77 201
305 79
172 134
94 295
85 140
107 53
338 136
69 134
288 109
185 25
122 58
148 157
253 318
137 64
3 348
48 312
295 341
86 12
334 82
52 62
118 63
100 302
210 325
85 105
30 255
88 173
132 231
175 262
323 10
72 321
6 187
42 106
218 342
1...

output:

53 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105
98 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 2...

result:

ok Correct. (4000 test cases)

Test #125:

score: 0
Accepted
time: 367ms
memory: 52580kb

input:

4000
191 134
47 218
50 133
301 156
225 214
240 163
314 343
320 183
24 324
213 75
329 344
79 237
71 7
135 104
293 172
213 309
130 137
8 76
309 145
231 342
112 250
62 230
32 170
12 337
221 239
64 347
270 325
12 95
116 260
229 284
83 48
89 146
251 196
31 134
180 277
222 29
264 117
87 8
180 31
348 129
2...

output:

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

result:

ok Correct. (4000 test cases)

Test #126:

score: 0
Accepted
time: 377ms
memory: 52256kb

input:

4000
102 30
256 208
177 181
341 288
237 271
8 180
161 2
263 51
210 266
29 6
232 82
156 277
43 110
172 22
89 14
140 314
167 182
179 56
70 156
318 324
151 192
314 80
32 95
23 247
247 121
144 14
191 175
275 205
322 5
164 274
257 120
334 65
155 172
201 305
198 267
275 10
254 307
155 127
2 336
189 80
15 ...

output:

51 1 7 11 13 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 105 107 111 117
60 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 8 8 8 8 8 8 9 9 9 9 9 9 10 10 10 10 10 10 11 11 11 11 11 12 12 12 12 13 13 13 14 14 ...

result:

ok Correct. (4000 test cases)

Test #127:

score: 0
Accepted
time: 376ms
memory: 52584kb

input:

4000
24 22
312 9
223 173
63 142
255 108
173 150
95 52
287 334
258 325
7 225
184 326
19 226
161 138
61 318
161 175
174 338
91 304
56 131
156 161
165 161
112 211
83 36
299 50
333 98
71 271
229 316
70 282
136 260
311 317
221 144
70 231
249 242
95 224
67 349
337 283
105 271
86 157
135 252
73 121
193 98
...

output:

22 1 3 5 7 9 11 13 13 15 15 17 17 19 19 21 21 23 25 27 29 31 33
24 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13

52 1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97 103 109 115 121 127 133 139 145 151 157 163 169 175 181 187 193 199 205 211 217 223 229 235 241 247 253 259 265 271 277 283 2...

result:

ok Correct. (4000 test cases)

Test #128:

score: 0
Accepted
time: 383ms
memory: 52348kb

input:

4000
119 199
53 209
315 113
313 249
71 79
158 332
243 167
11 196
113 298
147 39
295 160
35 277
135 72
106 199
234 144
218 228
331 184
49 141
140 193
5 309
254 274
147 133
39 300
90 58
58 80
213 138
185 77
112 49
121 347
38 219
7 38
286 17
346 153
173 146
24 302
84 192
261 84
329 96
120 62
276 2
135 ...

output:

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

result:

ok Correct. (4000 test cases)

Test #129:

score: 0
Accepted
time: 383ms
memory: 52568kb

input:

4000
57 326
271 53
193 152
64 96
339 200
114 169
79 25
327 206
229 99
208 121
96 30
163 288
253 269
4 255
109 62
266 301
292 196
127 337
173 283
335 55
117 144
303 110
99 119
148 66
279 58
125 225
115 330
346 30
187 239
257 213
24 168
346 241
272 184
279 101
177 90
186 34
346 17
119 269
123 326
245 ...

output:

114 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 19...

result:

ok Correct. (4000 test cases)

Test #130:

score: 0
Accepted
time: 388ms
memory: 52156kb

input:

4000
45 104
51 234
62 240
213 143
320 323
43 336
276 88
278 306
221 167
166 306
117 38
67 10
259 285
91 190
344 325
57 75
62 310
233 116
273 308
81 22
248 337
348 319
63 181
70 265
57 177
123 56
147 11
190 144
350 66
312 241
119 41
291 249
344 287
79 38
35 27
275 275
27 300
277 245
281 241
33 56
123...

output:

65 1 9 10 17 18 19 25 26 27 28 33 34 35 36 37 41 42 43 44 45 49 50 51 52 53 57 58 59 60 61 65 66 67 68 69 73 74 75 76 77 81 82 83 84 85 89 90 91 92 93 97 98 99 100 101 106 107 108 109 115 116 117 124 125 133
72 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 1...

result:

ok Correct. (4000 test cases)

Test #131:

score: 0
Accepted
time: 377ms
memory: 52596kb

input:

4000
47 289
213 206
264 187
1 315
78 59
263 69
334 248
69 24
216 79
275 111
101 326
121 47
207 299
147 123
28 239
229 184
108 288
201 139
200 229
248 317
146 346
232 317
284 277
299 133
217 240
55 68
36 201
41 154
240 107
76 142
100 112
120 86
34 64
336 166
86 232
195 311
251 342
67 219
350 255
7 14...

output:

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

result:

ok Correct. (4000 test cases)

Test #132:

score: 0
Accepted
time: 372ms
memory: 52564kb

input:

4000
125 142
166 165
305 177
27 153
313 105
346 284
303 4
95 45
5 249
73 268
246 341
307 115
84 284
172 79
16 99
71 314
116 50
321 306
25 74
276 301
127 278
72 115
50 82
326 255
166 241
72 344
247 26
315 143
7 267
100 272
343 205
243 337
298 84
78 107
63 322
339 85
48 276
86 128
175 273
229 232
64 3...

output:

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

result:

ok Correct. (4000 test cases)

Test #133:

score: 0
Accepted
time: 385ms
memory: 52584kb

input:

4000
290 233
266 14
178 200
350 108
25 73
134 128
310 320
337 229
82 328
201 34
255 41
321 273
284 316
145 287
46 8
26 179
254 237
4 232
24 236
317 244
8 51
344 73
173 158
158 97
141 83
188 221
39 108
73 149
77 132
11 146
203 235
22 343
153 147
39 202
3 56
268 50
17 83
159 313
122 296
183 4
302 210
...

output:

290 1 2 2 3 3 4 4 5 5 6 11 12 12 13 13 14 14 15 15 16 21 22 22 23 23 24 24 25 25 26 31 32 32 33 33 34 34 35 35 36 41 42 42 43 43 44 44 45 45 46 51 52 52 53 53 54 54 55 55 56 61 62 62 63 63 64 64 65 65 66 71 72 72 73 73 74 74 75 75 76 81 82 82 83 83 84 84 85 85 86 91 92 92 93 93 94 94 95 95 96 101 10...

result:

ok Correct. (4000 test cases)

Test #134:

score: 0
Accepted
time: 380ms
memory: 52276kb

input:

4000
271 204
334 5
224 165
256 234
306 276
77 288
324 236
158 240
136 292
5 104
135 100
235 150
278 33
251 137
264 237
70 346
97 13
278 331
19 186
156 116
11 241
128 103
220 96
281 178
338 257
83 114
36 346
169 149
68 124
156 294
103 110
258 9
101 132
110 73
97 14
160 148
85 151
291 126
255 72
157 2...

output:

204 1 2 2 3 3 4 7 8 8 9 9 10 13 14 14 15 15 16 19 20 20 21 21 22 25 26 26 27 27 28 31 32 32 33 33 34 37 38 38 39 39 40 43 44 44 45 45 46 49 50 50 51 51 52 55 56 56 57 57 58 61 62 62 63 63 64 67 68 68 69 69 70 73 74 74 75 75 76 79 80 80 81 81 82 85 86 86 87 87 88 91 92 92 93 93 94 97 98 98 99 99 100 ...

result:

ok Correct. (4000 test cases)

Test #135:

score: 0
Accepted
time: 376ms
memory: 52272kb

input:

4000
27 267
259 166
235 202
57 185
187 123
37 242
322 314
277 126
322 75
265 139
143 74
242 96
185 267
32 181
53 177
103 344
209 330
258 41
37 18
15 341
220 175
318 322
137 270
340 151
81 270
313 24
10 213
305 234
103 52
152 226
148 290
123 229
232 50
272 233
187 288
311 343
227 83
303 114
320 125
2...

output:

81 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
89 1 2 3 4 5 6 7 8 ...

result:

ok Correct. (4000 test cases)

Test #136:

score: 0
Accepted
time: 384ms
memory: 52592kb

input:

4000
184 72
110 238
67 179
321 148
31 69
24 176
50 184
291 239
285 43
219 101
328 319
273 177
224 84
52 238
72 21
240 216
189 11
291 332
148 247
87 86
335 215
53 81
19 91
162 99
284 233
92 222
201 219
25 302
181 274
167 264
207 222
134 211
117 254
211 93
111 180
286 88
216 332
204 130
220 233
54 148...

output:

96 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 47 49 50 52 53 55 56 58 59 61 62 64 65 67 68 70 71 74 77 80 83 86 89 92 93 95 96 98 99 101 102 104 105 107 108 110 111 113 114 116 117 120 123 126 129 132 135 138 139 141 142 144 145 147 148 150 151 153 154 156 157 159 160 162 163 166 169 172 175 178 1...

result:

ok Correct. (4000 test cases)

Test #137:

score: 0
Accepted
time: 376ms
memory: 52616kb

input:

4000
250 39
62 220
62 175
191 199
296 72
267 29
213 101
181 181
70 27
222 313
132 76
301 22
316 107
176 129
28 99
236 113
24 66
33 162
70 303
208 207
334 143
126 203
280 316
33 16
149 236
126 122
110 242
11 261
309 165
125 130
27 76
56 185
13 180
252 23
193 292
178 171
57 65
258 208
333 91
148 225
2...

output:

78 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
125 1 2 3 4 5 6 7 8 9 10 11 12 13...

result:

ok Correct. (4000 test cases)

Test #138:

score: 0
Accepted
time: 372ms
memory: 52596kb

input:

4000
139 254
112 243
47 145
127 325
270 242
223 258
19 37
137 147
205 101
9 345
127 245
278 279
100 59
219 8
270 15
12 80
31 177
204 267
170 213
238 333
287 246
136 255
248 295
159 186
348 1
264 247
326 276
7 106
230 145
268 221
169 217
313 307
4 286
257 137
344 147
156 226
320 144
230 194
344 108
3...

output:

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

result:

ok Correct. (4000 test cases)

Test #139:

score: 0
Accepted
time: 378ms
memory: 52752kb

input:

4000
253 27
98 170
118 114
186 233
152 97
269 107
159 160
285 104
306 120
153 107
116 9
248 215
126 197
56 95
334 198
88 244
109 122
79 60
292 25
10 275
174 222
132 85
203 253
187 81
136 125
163 292
126 262
72 13
269 168
40 251
80 227
306 259
219 93
281 135
8 1
45 22
108 331
27 293
135 66
81 307
4 1...

output:

69 1 10 12 19 21 23 30 32 34 41 43 45 52 54 56 63 65 67 74 76 78 85 87 89 96 98 100 107 109 111 118 120 122 129 131 133 140 142 144 151 153 155 162 164 166 173 175 177 184 186 188 195 197 199 206 208 210 217 219 221 228 230 232 239 241 243 250 252 261
99 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7...

result:

ok Correct. (4000 test cases)

Test #140:

score: 0
Accepted
time: 384ms
memory: 52792kb

input:

4000
194 201
77 161
302 194
316 314
141 266
238 232
153 48
117 151
9 100
329 11
69 59
335 200
316 169
67 90
179 340
305 172
115 237
42 1
205 287
112 152
119 8
114 233
233 241
24 52
184 60
268 71
158 285
300 202
73 87
241 55
183 15
331 15
79 312
153 285
174 79
125 331
271 85
180 179
227 206
140 93
15...

output:

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

result:

ok Correct. (4000 test cases)

Test #141:

score: 0
Accepted
time: 376ms
memory: 52640kb

input:

4000
125 151
278 227
62 33
159 75
223 302
39 80
307 99
35 24
151 173
122 113
308 10
27 115
6 43
157 164
328 116
307 302
87 260
173 50
23 61
107 232
134 8
53 13
215 296
336 277
299 240
176 243
282 30
281 105
147 26
187 43
28 196
337 267
349 30
56 229
315 105
24 269
21 256
68 127
190 228
339 170
191 2...

output:

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

result:

ok Correct. (4000 test cases)

Test #142:

score: 0
Accepted
time: 379ms
memory: 52304kb

input:

4000
106 59
149 318
50 289
55 186
237 8
195 155
309 261
195 99
171 288
53 158
136 264
186 93
93 177
173 164
95 336
109 334
227 141
86 203
269 39
265 162
286 81
300 240
28 235
16 213
107 123
232 125
299 321
345 11
274 199
250 70
216 216
8 61
70 207
215 108
7 262
193 156
331 178
296 93
144 10
336 218
...

output:

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

result:

ok Correct. (4000 test cases)

Test #143:

score: 0
Accepted
time: 374ms
memory: 52620kb

input:

4000
261 342
218 37
310 93
26 58
215 326
236 4
242 157
229 39
281 303
80 94
321 64
2 321
201 114
145 203
252 130
274 271
330 279
344 283
311 142
326 69
153 135
76 246
171 294
12 40
245 316
145 242
249 36
323 323
19 200
258 323
19 236
166 64
223 37
258 25
246 215
99 64
57 9
187 188
298 266
250 21
129...

output:

261 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 103 106 109 112 115 115 118 118 121 121 124 124 127 127 130 130 133 133 136 136 139 139 142 142 145 145 148 148 151 151 154 154 157 157 160 160 163 163 166 166 169 169 172 172 175 175 178 178 181 ...

result:

ok Correct. (4000 test cases)

Test #144:

score: 0
Accepted
time: 385ms
memory: 52656kb

input:

4000
78 30
226 49
315 50
34 258
165 319
71 31
222 72
281 211
338 339
104 193
311 152
83 188
23 338
225 104
80 39
258 217
151 279
176 205
212 100
334 213
171 246
221 44
313 210
318 137
55 241
43 333
84 42
346 181
202 315
88 104
65 280
6 12
49 88
277 134
32 350
18 25
90 135
71 262
11 268
249 336
34 17...

output:

45 1 3 5 7 9 11 13 15 17 19 21 23 25 27 27 29 29 31 33 35 37 39 41 43 45 47 49 51 53 53 55 55 57 59 61 63 65 67 69 71 73 75 77 79 81
52 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27

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

result:

ok Correct. (4000 test cases)

Test #145:

score: 0
Accepted
time: 375ms
memory: 52584kb

input:

4000
130 177
188 7
185 76
320 103
72 170
192 329
341 330
227 23
328 44
260 62
35 202
256 25
347 280
346 143
245 190
63 105
203 225
108 277
219 251
41 6
333 81
225 314
118 258
168 331
109 336
282 210
291 73
220 103
308 301
309 200
64 135
129 256
323 341
137 188
307 270
208 101
130 234
124 37
295 166
...

output:

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

result:

ok Correct. (4000 test cases)

Test #146:

score: 0
Accepted
time: 383ms
memory: 52568kb

input:

4000
189 262
74 254
299 81
272 265
257 115
100 154
236 191
2 293
184 133
208 205
266 171
34 266
26 12
264 346
206 212
106 211
211 282
87 227
21 178
7 260
161 253
237 295
185 231
226 36
347 192
49 305
31 300
229 297
282 150
149 227
117 193
9 121
103 86
52 200
41 236
46 20
291 156
215 272
137 282
202 ...

output:

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

result:

ok Correct. (4000 test cases)

Test #147:

score: 0
Accepted
time: 373ms
memory: 52744kb

input:

4000
87 174
181 192
261 346
62 170
243 313
221 26
14 165
90 45
213 60
202 33
202 166
121 19
33 318
21 207
80 104
17 311
73 97
101 261
30 47
160 167
73 43
274 295
233 341
177 189
2 349
118 34
271 134
200 151
325 125
21 347
251 183
226 47
149 151
332 259
165 71
156 106
241 90
119 20
295 232
311 174
12...

output:

87 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 59 61 62 64 65 67 68 70 71 73 74 76 77 79 80 82 83 85 86 89 92 95 98 101 104 107 110 113 116 117 119 120 122 123 125 126 128 129 131 132 134 135 137 138 140 141 143 144 147 150 153 156 159 162 165 168 171 174 177 180 183 186 189 192 195 198...

result:

ok Correct. (4000 test cases)

Test #148:

score: 0
Accepted
time: 243ms
memory: 52344kb

input:

10
335 135
135 250
138 25
75 272
231 17
271 168
188 46
56 308
277 236
274 80

output:

201 1 6 11 16 21 26 31 36 41 46 46 51 51 56 56 61 61 66 66 71 71 76 76 81 81 86 86 91 91 91 96 96 96 101 101 101 106 106 106 111 111 111 116 116 116 121 121 121 126 126 126 131 131 131 136 136 136 141 141 141 146 146 146 151 151 151 156 156 156 161 161 161 166 166 166 171 171 171 176 176 176 181 181...

result:

ok Correct. (10 test cases)

Extra Test:

score: 0
Extra Test Passed