QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#246619 | #7688. Alea Iacta Est | hos_lyric | WA | 123ms | 37588kb | C++14 | 5.7kb | 2023-11-10 23:15:16 | 2023-11-10 23:15:17 |
Judging History
answer
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using Int = long long;
template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")
// (1 - x^a)
void mul(vector<int> &fs, int a) {
const int fsLen = fs.size();
fs.resize(fsLen + a, 0);
for (int i = fsLen; --i >= 0; ) fs[i + a] -= fs[i];
}
void div(vector<int> &fs, int a) {
const int fsLen = fs.size();
assert(fsLen >= a);
fs.resize(fsLen - a, 0);
for (int i = 0; i < fsLen - a; ++i) fs[i + a] += fs[i];
}
int N[2];
Int opt;
vector<int> ans[2];
vector<int> pss[2], dss[2];
void solve() {
opt = 2 * N[0] + N[1];
ans[0].assign(N[0], 2);
ans[1].assign(N[1], 1);
for (int s = 0; s < 2; ++s) {
pss[s].clear();
dss[s].clear();
{
int n = N[s];
for (int p = 2; p * p <= n; ++p) if (n % p == 0) {
pss[s].push_back(p);
do { n /= p; } while (n % p == 0);
}
if (n > 1) pss[s].push_back(n);
}
for (int d = 1; d * d <= N[s]; ++d) if (N[s] % d == 0) {
dss[s].push_back(d);
if (d != N[s] / d) dss[s].push_back(N[s] / d);
}
sort(dss[s].begin(), dss[s].end());
}
/*
(x^0 + x^1 + ... + x^(d-1)) (x^0 + x^d + ... + x^(n-d))
= ((1 - x^d) / (1 - x)) ((1 - x^n) / (1 - x^d))
*/
Int bound = N[0] + N[1];
{
int cs[2] = {-1, -1};
int ds[2] = {-1, -1};
for (int c0 = 1; c0 <= 2; ++c0) for (int c1 = 1; c0 * c1 <= 2; ++c1) {
for (const int d0 : dss[0]) for (const int d1 : dss[1]) {
const Int nn0 = 1LL * c0 * d0 * d1;
const Int nn1 = 1LL * c1 * (N[0] / d0) * (N[1] / d1);
chmin(bound, nn0 + nn1);
if ((nn0 == N[0] && nn1 == N[1]) || (nn0 == N[1] && nn1 == N[0])) {
if (d0 == 1 || d1 == 1) continue;
}
if (chmin(opt, nn0 + nn1)) {
cs[0] = c0; cs[1] = c1;
ds[0] = d0; ds[1] = d1;
}
}
}
if (~cs[0]) {
for (int s = 0; s < 2; ++s) {
ans[s] = {cs[s]};
}
for (int s = 0; s < 2; ++s) {
mul(ans[0], ds[s]);
div(ans[0], 1);
mul(ans[1], N[s]);
div(ans[1], ds[s]);
}
}
}
if (opt == bound) return;
/*
1 - x^n =: \prod[d|n] F[d](x)
F[n](x) = \prod[d|n] (1 - x^d)^mu(n/d)
F[1](1) = 0, F[p^e](1) = p, F[composite](1) = 1
move \prod[d|d'|n] F[d'](x) for some d
*/
for (int s = 0; s < 2; ++s) {
vector<pair<int, int>> cands;
for (const int d : dss[s]) {
int pop = 0;
for (const int p : pss[s]) if (d % p == 0) ++pop;
if (pop >= 2) {
cands.emplace_back(pop, d);
}
}
sort(cands.begin(), cands.end());
for (const auto &cand : cands) {
const int d = cand.second;
int ddsLen = 1;
vector<Int> dds{N[s]};
for (const int p : pss[s]) if (d % p == 0) {
int pp = p;
for (int n = N[s] / d; n % p == 0; n /= p) pp *= p;
dds.resize(ddsLen << 1);
for (int h = 0; h < ddsLen; ++h) dds[ddsLen + h] = dds[h] / pp;
ddsLen <<= 1;
}
vector<int> tmp[2];
for (int ss = 0; ss < 2; ++ss) {
tmp[ss] = {1};
mul(tmp[ss], N[ss]);
div(tmp[ss], 1);
}
for (int h = 0; h < ddsLen; ++h) mul(tmp[s ^ 1 ^ __builtin_parity(h)], dds[h]);
for (int h = 0; h < ddsLen; ++h) div(tmp[s ^ __builtin_parity(h)], dds[h]);
bool ok = true;
for (int ss = 0; ss < 2; ++ss) {
for (int i = 0; i < (int)tmp[ss].size(); ++i) {
ok = ok && (tmp[ss][i] >= 0);
}
}
// cerr<<dds<<" "<<tmp[0]<<" "<<tmp[1]<<endl;
if (ok) {
opt = N[0] + N[1];
for (int ss = 0; ss < 2; ++ss) {
ans[ss] = tmp[ss];
}
return;
}
}
}
}
int main() {
for (int numCases; ~scanf("%d", &numCases); ) { for (int caseId = 1; caseId <= numCases; ++caseId) {
if (caseId > 1) puts("");
scanf("%d%d", &N[0], &N[1]);
if (N[0] > N[1]) swap(N[0], N[1]);
solve();
#ifdef LOCAL
cerr<<COLOR("33")<<N[0]<<" "<<N[1]<<": "<<opt<<COLOR()<<endl;
#endif
for (int s = 0; s < 2; ++s) {
for (int i = 0; i < (int)ans[s].size(); ++i) {
assert(ans[s][i] >= 0);
}
}
for (int s = 0; s < 2; ++s) {
int sum = 0;
for (int i = 0; i < (int)ans[s].size(); ++i) {
sum += ans[s][i];
}
printf("%d", sum);
for (int i = 0; i < (int)ans[s].size(); ++i) {
for (int j = 0; j < ans[s][i]; ++j) {
printf(" %d", i + 1);
}
}
puts("");
}
}
#ifndef LOCAL
break;
#endif
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3644kb
input:
3 2 8 1 9 2 9
output:
4 1 2 3 4 4 1 2 5 6 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: 6ms
memory: 3760kb
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: 2ms
memory: 3672kb
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: 2ms
memory: 3672kb
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: 0ms
memory: 3696kb
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: 3ms
memory: 3700kb
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: 123ms
memory: 10976kb
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: 49ms
memory: 6916kb
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: 44ms
memory: 6960kb
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: 49ms
memory: 7084kb
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: 45ms
memory: 7004kb
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: 84ms
memory: 18896kb
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: 4ms
memory: 10976kb
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: 2ms
memory: 10972kb
input:
1 1000000 2
output:
1250 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 #15:
score: 0
Accepted
time: 0ms
memory: 10852kb
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: 0ms
memory: 10968kb
input:
1 4 1000000
output:
2000 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 #17:
score: 0
Accepted
time: 79ms
memory: 18768kb
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: 4ms
memory: 10904kb
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: 0ms
memory: 10924kb
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: 4ms
memory: 10908kb
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: 2ms
memory: 10888kb
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: 93ms
memory: 18620kb
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: 0ms
memory: 10928kb
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: 0ms
memory: 10908kb
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: 0ms
memory: 10968kb
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: 4ms
memory: 10856kb
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: 55ms
memory: 14468kb
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: 0ms
memory: 8756kb
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: 0ms
memory: 8844kb
input:
1 2 720720
output:
1170 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 #30:
score: 0
Accepted
time: 0ms
memory: 8864kb
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: 3ms
memory: 8912kb
input:
1 4 720720
output:
1680 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 #32:
score: 0
Accepted
time: 41ms
memory: 11244kb
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: 0ms
memory: 7416kb
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: 3ms
memory: 7348kb
input:
1 2 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 #35:
score: 0
Accepted
time: 0ms
memory: 7280kb
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: 0ms
memory: 7384kb
input:
1 524288 4
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 #37:
score: 0
Accepted
time: 50ms
memory: 11364kb
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: 0ms
memory: 7420kb
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: 3ms
memory: 7416kb
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: 0ms
memory: 7292kb
input:
1 531441 3
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 #41:
score: 0
Accepted
time: 3ms
memory: 7356kb
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: 50ms
memory: 11184kb
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: 3ms
memory: 7064kb
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: 0ms
memory: 6980kb
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: 0ms
memory: 7084kb
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: 3ms
memory: 6992kb
input:
1 4 510510
output:
1430 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 #47:
score: 0
Accepted
time: 26ms
memory: 7548kb
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: 2ms
memory: 5184kb
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: 2ms
memory: 5140kb
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: 2ms
memory: 5220kb
input:
1 279936 3
output:
864 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 #51:
score: 0
Accepted
time: 2ms
memory: 5184kb
input:
1 4 279936
output:
972 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 #52:
score: 0
Accepted
time: 80ms
memory: 16840kb
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: 0ms
memory: 9860kb
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: 4ms
memory: 10152kb
input:
1 2 871933
output:
8633 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 #55:
score: 0
Accepted
time: 4ms
memory: 10124kb
input:
1 3 871933
output:
8633 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 #56:
score: 0
Accepted
time: 4ms
memory: 9812kb
input:
1 4 871933
output:
8633 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 #57:
score: 0
Accepted
time: 95ms
memory: 36136kb
input:
1 1000000 999999
output:
999999 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 1...
result:
ok Correct. (1 test case)
Test #58:
score: 0
Accepted
time: 93ms
memory: 18640kb
input:
1 1000000 999998
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 #59:
score: 0
Accepted
time: 100ms
memory: 37588kb
input:
1 1000000 999983
output:
999983 1 65 129 193 257 321 385 449 513 577 641 705 769 833 897 961 1025 1089 1153 1217 1281 1345 1409 1473 1537 1601 1665 1729 1793 1857 1921 1985 2049 2113 2177 2241 2305 2369 2433 2497 2561 2625 2689 2753 2817 2881 2945 3009 3073 3137 3201 3265 3329 3393 3457 3521 3585 3649 3713 3777 3841 3905 39...
result:
ok Correct. (1 test case)
Test #60:
score: 0
Accepted
time: 94ms
memory: 17952kb
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: 52ms
memory: 14776kb
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: 63ms
memory: 15048kb
input:
1 524288 1000000
output:
800000 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...
result:
ok Correct. (1 test case)
Test #63:
score: 0
Accepted
time: 90ms
memory: 9260kb
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:
ok Correct. (6 test cases)
Test #64:
score: 0
Accepted
time: 81ms
memory: 9232kb
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 2 2 3 4 1 3 3 5 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: 78ms
memory: 11576kb
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:
10338 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 12 13 13 13 13 13 13 14 14 14 14 14 14 15 15 15 15 15 15 16 16 16 16 16 16 17 17 17 17 17 17 18 18 18 18 18 18 19 19 19 19 19 19 20 20 20 20 20 20 21 21 21 21 21 21 ...
result:
ok Correct. (42 test cases)
Test #66:
score: 0
Accepted
time: 84ms
memory: 32344kb
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 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 8...
result:
ok Correct. (9 test cases)
Test #67:
score: 0
Accepted
time: 98ms
memory: 28988kb
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: 96ms
memory: 9908kb
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: 93ms
memory: 18764kb
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 41 1 2 3 4 5 6 7 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 49 50 51 52 53 54 55 42 1 2 3 4 5 6 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 23 24 25 26 27 28 11 1 2 3 4 5 6 7 8 9 10 11 4 1 2 12 13 671 1 2 2 3...
result:
ok Correct. (29 test cases)
Test #70:
score: 0
Accepted
time: 88ms
memory: 30692kb
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:
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 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 2 ...
result:
ok Correct. (25 test cases)
Test #71:
score: 0
Accepted
time: 96ms
memory: 31788kb
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 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 118 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17...
result:
ok Correct. (34 test cases)
Test #72:
score: 0
Accepted
time: 108ms
memory: 31328kb
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:
828 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 12 13 13 13 13 13 13 14 14 14 14 14 14 15 15 15 15 15 15 16 16 16 16 16 16 17 17 17 17 17 17 18 18 18 18 18 18 19 19 19 19 19 19 20 20 20 20 20 20 21 21 21 21 21 21 22...
result:
ok Correct. (28 test cases)
Test #73:
score: 0
Accepted
time: 104ms
memory: 30652kb
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: 86ms
memory: 17496kb
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 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 2...
result:
ok Correct. (6 test cases)
Test #75:
score: 0
Accepted
time: 86ms
memory: 29800kb
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 799993 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 326 331...
result:
ok Correct. (5 test cases)
Test #76:
score: 0
Accepted
time: 69ms
memory: 9564kb
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 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 22 1 3 5 7 9 11 13 14 15 16 17 18 19 20 21 22 24 26 28 30 32 34 2945 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...
result:
ok Correct. (47 test cases)
Test #77:
score: 0
Accepted
time: 53ms
memory: 8908kb
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 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. (47 test cases)
Test #78:
score: 0
Accepted
time: 57ms
memory: 9124kb
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:
2522 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. (45 test cases)
Test #79:
score: 0
Accepted
time: 47ms
memory: 8324kb
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 143997 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 3...
result:
ok Correct. (40 test cases)
Test #80:
score: 0
Accepted
time: 42ms
memory: 10984kb
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 14 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 1 3 5 7 8 10 12 14 2 1 2 6 1 2 3 3 4 5 16 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 16 1 3 5 7 9 9 11 11 13 13 15 15 17 19 21 23 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: 46ms
memory: 11104kb
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:
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 18 1 2 3 4 5 6 7 8 9 30 31 32 33 34 35 36 37 38 428 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 ...
result:
ok Correct. (26 test cases)
Test #82:
score: 0
Accepted
time: 46ms
memory: 11028kb
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 503 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...
result:
ok Correct. (25 test cases)
Test #83:
score: 0
Accepted
time: 42ms
memory: 11032kb
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 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 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 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64...
result:
ok Correct. (30 test cases)
Test #84:
score: 0
Accepted
time: 52ms
memory: 11028kb
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 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 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 16 16 16 16 16 16 17 17 17 17 17 18 18 18...
result:
ok Correct. (37 test cases)
Test #85:
score: 0
Accepted
time: 8ms
memory: 10544kb
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 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. (30 test cases)
Test #86:
score: 0
Accepted
time: 52ms
memory: 10556kb
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:
41 1 8 10 15 17 19 22 24 26 28 29 31 33 35 36 37 38 40 43 44 45 46 47 50 52 53 54 55 57 59 61 62 64 66 68 71 73 75 80 82 89 63 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 11 11 11 11 11 12 12 12 12 13 13 13 14 14 15 14 1 1 2 2 3 3 4 4 5 5 6 ...
result:
ok Correct. (41 test cases)
Test #87:
score: 0
Accepted
time: 7ms
memory: 11476kb
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 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 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 2 1 1 1 1 2 1 1 1 1 4 1 2 3 4 6 1 2 3 5 6 7 2 1 1 3 1 2 ...
result:
ok Correct. (12 test cases)
Test #88:
score: 0
Accepted
time: 74ms
memory: 8872kb
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 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 10...
result:
ok Correct. (41 test cases)
Test #89:
score: 0
Accepted
time: 68ms
memory: 15160kb
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: 96ms
memory: 18724kb
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 2 2 3 3 3 4 4 4 5 5 5 6 6 7 20 1 4 6 7 9 10 11 12 13 14 15 16 17 18 19 20 22 23 25 28 399 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 ...
result:
ok Correct. (29 test cases)
Test #91:
score: 0
Accepted
time: 66ms
memory: 14824kb
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 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 54 55 55 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 72 73 73 74 74 75 75 76 76 77 77 7...
result:
ok Correct. (36 test cases)
Test #92:
score: 0
Accepted
time: 61ms
memory: 14848kb
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:
14373 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 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15 15 16 16 16 16 16 16 16 16 16 17 17 17 17 17 ...
result:
ok Correct. (31 test cases)
Test #93:
score: 0
Accepted
time: 69ms
memory: 12660kb
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 615 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...
result:
ok Correct. (36 test cases)
Test #94:
score: 0
Accepted
time: 76ms
memory: 12116kb
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 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 62 63 63 64 64 65 65 66 66 67 67 68 68 69 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 ...
result:
ok Correct. (36 test cases)
Test #95:
score: 0
Accepted
time: 69ms
memory: 12064kb
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:
952 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. (40 test cases)
Test #96:
score: 0
Accepted
time: 85ms
memory: 12880kb
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 2 3 4 5 6 7 10 1 2 3 4 5 8 9 10 11 12 26 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 28 1 2 3 4 5 6 7 8 9 10 11 12 13 14 27 28 29 30 31 32 33 34 35 36 37 38 39 40 71109 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 1...
result:
ok Correct. (41 test cases)
Test #97:
score: 0
Accepted
time: 91ms
memory: 15764kb
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 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 163 1 3 5 7 9 11 13 ...
result:
ok Correct. (34 test cases)
Test #98:
score: 0
Accepted
time: 102ms
memory: 16720kb
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:
17 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 14 1 2 18 19 35 36 52 53 69 70 86 87 103 104 9 1 2 3 4 5 6 7 8 9 51 1 2 3 4 5 6 7 8 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 28 29 30 31 32 33 34 35 3 1 2 3 4 1 2 4 5 2 1 1 1 1 2 1 1 1 1 ...
result:
ok Correct. (36 test cases)
Test #99:
score: 0
Accepted
time: 89ms
memory: 14528kb
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:
858 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. (40 test cases)
Test #100:
score: 0
Accepted
time: 53ms
memory: 6656kb
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 447 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 3...
result:
ok Correct. (44 test cases)
Test #101:
score: -100
Wrong Answer
time: 65ms
memory: 3824kb
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 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 66 1 3 5 7 9 11 13 15 17 19 21 23 25 25 27 27 29 29 31 31 33 33 35 35 37 37 39 39 41 41 43 43 45 47 49 49 51 51 53 53 55 55 57 57 59 59 61 61 63 63 65 65 67 67 69 71 73 7...
result:
wrong answer Jury has a better answer. (test case 804)