QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#519703 | #7688. Alea Iacta Est | pandapythoner | WA | 813ms | 109232kb | C++23 | 16.3kb | 2024-08-15 00:09:34 | 2024-08-15 00:09:35 |
Judging History
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(1, n / a), get_flex(1, b)));
auto second_dice = get_dice(fft::mul(get_flex(b, m / b), get_flex(n / a, 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; }
assert(g == 1 or frst != -1);
if (frst != -1 and frst < m) {
print_flex(n, m, frst, frst);
continue;
}
bool ok = false;
rep(itr, 2) {
ll a = -1, b = -1;
for (ll i = 2; i < n; i += 1) if (n % i == 0 and gcd(n / i, i) == 1) {
a = i; b = n / i; break;
};
if (a != -1) {
vector<ll> biba(a + b);
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 = len(boba) - 1; i - n >= 0; i -= 1) {
boba[i] -= boba[i - n];
}
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];
}
for (auto x : boba) assert(0 <= x and x <= 1);
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;
}
swap(n, m);
}
if (ok) {
continue;
}
opt = -1;
for (ll x = 1e6 - 1000; 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;
}
详细
Test #1:
score: 100
Accepted
time: 243ms
memory: 52280kb
input:
3 2 8 1 9 2 9
output:
4 1 2 2 3 4 1 3 5 7 3 1 2 3 3 1 4 7 3 1 2 3 6 1 2 4 5 7 8
result:
ok Correct. (3 test cases)
Test #2:
score: 0
Accepted
time: 249ms
memory: 52348kb
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: 237ms
memory: 52256kb
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: 241ms
memory: 52244kb
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: 240ms
memory: 52108kb
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: 241ms
memory: 52152kb
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: 385ms
memory: 52296kb
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: 280ms
memory: 52264kb
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: 283ms
memory: 52304kb
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: 283ms
memory: 52336kb
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: 287ms
memory: 52284kb
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: 788ms
memory: 109100kb
input:
1 1000000 1000000
output:
1000000 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 #13:
score: 0
Accepted
time: 409ms
memory: 69896kb
input:
1 1000000 1
output:
1000 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 100 101...
result:
ok Correct. (1 test case)
Test #14:
score: 0
Accepted
time: 415ms
memory: 69868kb
input:
1 1000000 2
output:
1250 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. (1 test case)
Test #15:
score: 0
Accepted
time: 415ms
memory: 69880kb
input:
1 3 1000000
output:
1600 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 100 101...
result:
ok Correct. (1 test case)
Test #16:
score: 0
Accepted
time: 405ms
memory: 69180kb
input:
1 4 1000000
output:
2000 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 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29 29 2...
result:
ok Correct. (1 test case)
Test #17:
score: 0
Accepted
time: 722ms
memory: 109232kb
input:
1 988027 988027
output:
988027 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 10 10 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15...
result:
ok Correct. (1 test case)
Test #18:
score: 0
Accepted
time: 393ms
memory: 70316kb
input:
1 988027 1
output:
991 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 100 101 ...
result:
ok Correct. (1 test case)
Test #19:
score: 0
Accepted
time: 402ms
memory: 70476kb
input:
1 2 988027
output:
997 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 100 101 ...
result:
ok Correct. (1 test case)
Test #20:
score: 0
Accepted
time: 407ms
memory: 69560kb
input:
1 3 988027
output:
997 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 100 101 ...
result:
ok Correct. (1 test case)
Test #21:
score: 0
Accepted
time: 415ms
memory: 69960kb
input:
1 4 988027
output:
1982 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. (1 test case)
Test #22:
score: 0
Accepted
time: 713ms
memory: 108676kb
input:
1 995779 995779
output:
995779 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 10 10 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15...
result:
ok Correct. (1 test case)
Test #23:
score: 0
Accepted
time: 406ms
memory: 70432kb
input:
1 1 995779
output:
983 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 100 101 ...
result:
ok Correct. (1 test case)
Test #24:
score: 0
Accepted
time: 409ms
memory: 69456kb
input:
1 995779 2
output:
1013 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 100 101...
result:
ok Correct. (1 test case)
Test #25:
score: 0
Accepted
time: 404ms
memory: 70304kb
input:
1 995779 3
output:
1013 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 100 101...
result:
ok Correct. (1 test case)
Test #26:
score: 0
Accepted
time: 413ms
memory: 69808kb
input:
1 995779 4
output:
1966 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. (1 test case)
Test #27:
score: 0
Accepted
time: 787ms
memory: 106512kb
input:
1 720720 720720
output:
720720 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. (1 test case)
Test #28:
score: 0
Accepted
time: 408ms
memory: 69000kb
input:
1 720720 1
output:
840 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 100 101 ...
result:
ok Correct. (1 test case)
Test #29:
score: 0
Accepted
time: 406ms
memory: 70612kb
input:
1 2 720720
output:
1170 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. (1 test case)
Test #30:
score: 0
Accepted
time: 413ms
memory: 68844kb
input:
1 3 720720
output:
1456 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 100 101...
result:
ok Correct. (1 test case)
Test #31:
score: 0
Accepted
time: 413ms
memory: 68968kb
input:
1 4 720720
output:
1680 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 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29 29 2...
result:
ok Correct. (1 test case)
Test #32:
score: 0
Accepted
time: 523ms
memory: 80916kb
input:
1 524288 524288
output:
524288 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. (1 test case)
Test #33:
score: 0
Accepted
time: 317ms
memory: 60384kb
input:
1 1 524288
output:
512 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 100 101 ...
result:
ok Correct. (1 test case)
Test #34:
score: 0
Accepted
time: 406ms
memory: 68604kb
input:
1 2 524288
output:
1024 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. (1 test case)
Test #35:
score: 0
Accepted
time: 408ms
memory: 68772kb
input:
1 3 524288
output:
1024 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 100 101...
result:
ok Correct. (1 test case)
Test #36:
score: 0
Accepted
time: 415ms
memory: 68632kb
input:
1 524288 4
output:
1024 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 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29 29 2...
result:
ok Correct. (1 test case)
Test #37:
score: 0
Accepted
time: 731ms
memory: 102536kb
input:
1 531441 531441
output:
531441 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...
result:
ok Correct. (1 test case)
Test #38:
score: 0
Accepted
time: 397ms
memory: 68644kb
input:
1 1 531441
output:
729 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 100 101 ...
result:
ok Correct. (1 test case)
Test #39:
score: 0
Accepted
time: 407ms
memory: 68760kb
input:
1 2 531441
output:
729 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 100 101 ...
result:
ok Correct. (1 test case)
Test #40:
score: 0
Accepted
time: 410ms
memory: 68912kb
input:
1 531441 3
output:
729 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. (1 test case)
Test #41:
score: 0
Accepted
time: 412ms
memory: 68644kb
input:
1 531441 4
output:
1458 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. (1 test case)
Test #42:
score: 0
Accepted
time: 490ms
memory: 80784kb
input:
1 510510 510510
output:
510510 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. (1 test case)
Test #43:
score: 0
Accepted
time: 309ms
memory: 62072kb
input:
1 510510 1
output:
714 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 100 101 ...
result:
ok Correct. (1 test case)
Test #44:
score: 0
Accepted
time: 310ms
memory: 61276kb
input:
1 510510 2
output:
1001 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 100 101...
result:
ok Correct. (1 test case)
Test #45:
score: 0
Accepted
time: 319ms
memory: 61308kb
input:
1 3 510510
output:
1190 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 100 101...
result:
ok Correct. (1 test case)
Test #46:
score: 0
Accepted
time: 317ms
memory: 61672kb
input:
1 4 510510
output:
1428 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 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29 29 2...
result:
ok Correct. (1 test case)
Test #47:
score: 0
Accepted
time: 457ms
memory: 79020kb
input:
1 279936 279936
output:
279936 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. (1 test case)
Test #48:
score: 0
Accepted
time: 308ms
memory: 60420kb
input:
1 279936 1
output:
486 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 100 101 ...
result:
ok Correct. (1 test case)
Test #49:
score: 0
Accepted
time: 310ms
memory: 60448kb
input:
1 279936 2
output:
729 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 100 101 ...
result:
ok Correct. (1 test case)
Test #50:
score: 0
Accepted
time: 320ms
memory: 60412kb
input:
1 279936 3
output:
864 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. (1 test case)
Test #51:
score: 0
Accepted
time: 308ms
memory: 60556kb
input:
1 4 279936
output:
972 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 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29 29 29...
result:
ok Correct. (1 test case)
Test #52:
score: 0
Accepted
time: 712ms
memory: 108208kb
input:
1 871933 871933
output:
871933 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 10 10 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15...
result:
ok Correct. (1 test case)
Test #53:
score: 0
Accepted
time: 410ms
memory: 70400kb
input:
1 871933 1
output:
101 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 100 101 ...
result:
ok Correct. (1 test case)
Test #54:
score: 0
Accepted
time: 411ms
memory: 69596kb
input:
1 2 871933
output:
202 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. (1 test case)
Test #55:
score: 0
Accepted
time: 422ms
memory: 69032kb
input:
1 3 871933
output:
303 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. (1 test case)
Test #56:
score: 0
Accepted
time: 423ms
memory: 69264kb
input:
1 4 871933
output:
404 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 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29 29 29...
result:
ok Correct. (1 test case)
Test #57:
score: 0
Accepted
time: 333ms
memory: 106408kb
input:
1 1000000 999999
output:
999999 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 18 19 19 19 19 19 19 19...
result:
ok Correct. (1 test case)
Test #58:
score: 0
Accepted
time: 813ms
memory: 109072kb
input:
1 1000000 999998
output:
999998 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. (1 test case)
Test #59:
score: 0
Accepted
time: 347ms
memory: 105524kb
input:
1 1000000 999983
output:
1000000 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 10 10 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 1...
result:
ok Correct. (1 test case)
Test #60:
score: 0
Accepted
time: 714ms
memory: 108304kb
input:
1 1000000 900000
output:
937500 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 10 10 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15...
result:
ok Correct. (1 test case)
Test #61:
score: 0
Accepted
time: 688ms
memory: 107344kb
input:
1 500000 1000000
output:
640000 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 10 10 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15...
result:
ok Correct. (1 test case)
Test #62:
score: 0
Accepted
time: 738ms
memory: 105420kb
input:
1 524288 1000000
output:
655360 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. (1 test case)
Test #63:
score: -100
Wrong Answer
time: 333ms
memory: 52104kb
input:
6 1 4 531441 999983 2 2 1 1 1 6 4 3
output:
2 1 2 2 1 3 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:
wrong answer Jury has a better answer. (test case 3)