QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#300539 | #328. Cycle sort | chy12321 | 100 ✓ | 83ms | 16904kb | C++14 | 2.6kb | 2024-01-08 14:02:27 | 2024-01-08 14:02:28 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
constexpr int N = 2e5 + 10;
int n, s, a[N], b[N], tmp[N], to[N];
int head[N];
struct Edge {
int to, nxt, id;
} e[N];
vector<int> p;
inline void add(int x, int y, int id) {e[id] = Edge{y, head[x], id}, head[x] = id;}
namespace DSU {
int fa[N], sz[N], e[N];
void init(int n) {for (int i = 1; i <= n; i++) fa[i] = i;}
int find(int x) {
if (x == fa[x]) return x;
return fa[x] = find(fa[x]);
}
inline void merge(int x, int y, int id) {
int fx = find(x), fy = find(y);
if (fx != fy) {
if (sz[fx] < sz[fy]) swap(fx, fy);
fa[fy] = fx, sz[fx] += fy;
}
e[fx] = id;
}
}
void dfs(int u) {
while (head[u]) {
int v = e[head[u]].to, id = e[head[u]].id; head[u] = e[head[u]].nxt;
dfs(v); p.emplace_back(id);
}
}
int main() {
ios_base::sync_with_stdio(0); cin.tie(nullptr), cout.tie(nullptr);
cin >> n >> s;
for (int i = 1; i <= n; i++) cin >> a[i], tmp[i] = a[i];
sort(tmp + 1, tmp + n + 1); int m = unique(tmp + 1, tmp + n + 1) - tmp - 1;
if (m == 1) {cout << 0; return 0;}
for (int i = 1; i <= n; i++) b[i] = a[i] = lower_bound(tmp + 1, tmp + m + 1, a[i]) - tmp;
sort(b + 1, b + n + 1); int mink = 0; DSU::init(m);
for (int i = 1; i <= n; i++) if (a[i] != b[i]) DSU::merge(a[i], b[i], i), mink++;
if (!mink) {cout << 0; return 0;}
if (s < mink) {cout << -1; return 0;};
for (int i = 1; i <= m; i++) if (DSU::fa[i] == i && DSU::e[i]) p.emplace_back(DSU::e[i]);
if (p.size() == 1) {
for (int i = 1; i <= n; i++) if (a[i] != b[i]) add(a[i], b[i], i);
p.clear();
for (int i = 1; i <= m; i++) if (head[i]) {dfs(i); break;}
cout << "1\n" << p.size() << '\n';
for (int i : p) cout << i << ' ';
return 0;
}
if (s > mink + 2) {
int merge = min((int)p.size(), s - mink);
cout << p.size() - merge + 2 << '\n' << merge << '\n';
p.erase(p.begin() + merge, p.end());
for (int i : p) cout << i << ' '; cout << '\n';
int ap0 = a[p[merge - 1]];
for (int i = merge - 1; i; i--) a[p[i]] = a[p[i - 1]];
a[p[0]] = ap0;
} else cout << p.size() << '\n';
for (int i = 1; i <= n; i++) if (a[i] != b[i]) add(a[i], b[i], i);
for (int i = 1; i <= m; i++) {
if (head[i]) {
p.clear(), dfs(i);
cout << p.size() << '\n';
for (int i : p) cout << i << ' '; cout << '\n';
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 1ms
memory: 3416kb
input:
1 0 2
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #2:
score: 0
Accepted
time: 0ms
memory: 3368kb
input:
1 2 1
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #3:
score: 0
Accepted
time: 0ms
memory: 3480kb
input:
2 1 2 1
output:
-1
result:
ok OK, no solution
Test #4:
score: 0
Accepted
time: 1ms
memory: 3500kb
input:
2 2 2 1
output:
1 2 1 2
result:
ok OK, answer exists, pans = jans = 1
Test #5:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
2 0 2 1
output:
-1
result:
ok OK, no solution
Test #6:
score: 0
Accepted
time: 0ms
memory: 3472kb
input:
2 0 1 1
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #7:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
2 1 1 1
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #8:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
2 2 2 2
output:
0
result:
ok OK, answer exists, pans = jans = 0
Subtask #2:
score: 5
Accepted
Dependency #1:
100%
Accepted
Test #9:
score: 5
Accepted
time: 0ms
memory: 3472kb
input:
5 0 1000000000 1000000000 1000000000 1000000000 1000000000
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #10:
score: 0
Accepted
time: 0ms
memory: 3412kb
input:
1 0 258769137
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #11:
score: 0
Accepted
time: 1ms
memory: 3596kb
input:
5 0 884430748 884430748 708433020 708433020 708433020
output:
-1
result:
ok OK, no solution
Test #12:
score: 0
Accepted
time: 1ms
memory: 3668kb
input:
5 4 335381650 691981363 691981363 335381650 335381650
output:
1 4 2 4 3 5
result:
ok OK, answer exists, pans = jans = 1
Test #13:
score: 0
Accepted
time: 0ms
memory: 3380kb
input:
5 2 65390026 770505072 65390026 65390026 65390026
output:
1 2 2 5
result:
ok OK, answer exists, pans = jans = 1
Test #14:
score: 0
Accepted
time: 0ms
memory: 3484kb
input:
5 200000 682659092 302185582 518778252 29821187 14969298
output:
2 2 4 5 5 1 5 2 3 4
result:
ok OK, answer exists, pans = jans = 2
Test #15:
score: 0
Accepted
time: 0ms
memory: 3484kb
input:
5 4 167616600 574805150 651016425 150949603 379708534
output:
-1
result:
ok OK, no solution
Test #16:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
5 5 815605413 4894095 624809427 264202135 152952491
output:
2 3 1 5 2 2 3 4
result:
ok OK, answer exists, pans = jans = 2
Test #17:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
5 4 201429826 845081337 219611799 598937628 680006294
output:
1 4 2 5 4 3
result:
ok OK, answer exists, pans = jans = 1
Test #18:
score: 0
Accepted
time: 1ms
memory: 3384kb
input:
5 5 472778319 561757623 989296065 99763286 352037329
output:
1 5 1 3 5 2 4
result:
ok OK, answer exists, pans = jans = 1
Test #19:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
5 6 971458729 608568364 891718769 464295315 98863653
output:
2 2 1 5 3 2 3 4
result:
ok OK, answer exists, pans = jans = 2
Test #20:
score: 0
Accepted
time: 0ms
memory: 3432kb
input:
5 4 579487081 564229995 665920667 665920667 644707366
output:
2 2 1 2 2 3 5
result:
ok OK, answer exists, pans = jans = 2
Test #21:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
5 4 81224924 319704343 319704343 210445208 128525140
output:
1 4 2 4 3 5
result:
ok OK, answer exists, pans = jans = 1
Test #22:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
5 5 641494999 641494999 228574099 535883079 535883079
output:
1 5 1 4 2 5 3
result:
ok OK, answer exists, pans = jans = 1
Test #23:
score: 0
Accepted
time: 1ms
memory: 3652kb
input:
5 4 812067558 674124159 106041640 106041640 674124159
output:
-1
result:
ok OK, no solution
Subtask #3:
score: 5
Accepted
Dependency #1:
100%
Accepted
Test #24:
score: 5
Accepted
time: 9ms
memory: 5152kb
input:
200000 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #25:
score: 0
Accepted
time: 4ms
memory: 4964kb
input:
200000 123456 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #26:
score: 0
Accepted
time: 21ms
memory: 13672kb
input:
200000 200000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
1 200000 1 100001 2 100002 3 100003 4 100004 5 100005 6 100006 7 100007 8 100008 9 100009 10 100010 11 100011 12 100012 13 100013 14 100014 15 100015 16 100016 17 100017 18 100018 19 100019 20 100020 21 100021 22 100022 23 100023 24 100024 25 100025 26 100026 27 100027 28 100028 29 100029 30 100030 ...
result:
ok OK, answer exists, pans = jans = 1
Test #27:
score: 0
Accepted
time: 7ms
memory: 5952kb
input:
200000 199999 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
-1
result:
ok OK, no solution
Test #28:
score: 0
Accepted
time: 18ms
memory: 10816kb
input:
200000 100000 2 2 1 2 2 1 2 2 1 1 2 1 1 1 2 2 1 2 1 1 2 2 1 2 1 1 2 1 1 1 2 1 1 1 1 1 1 1 2 2 2 1 2 1 2 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 2 2 2 1 2 1 2 1 2 1 2 2 1 2 1 1 2 1 1 1 2 1 1 1 1 1 1 2 1 2 1 2 1 2 1 2 1 1 1 2 1 2 2 1 1 1 1 1 1 1 2 1 1 2 1 1 2 2 1 1 2 2 2 1 1 1 1 2 2 1 2 1 2 ...
output:
1 100000 1 130762 2 130764 4 130766 5 130767 7 130769 8 130770 11 130771 15 130773 16 130774 18 130776 21 130777 22 130779 24 130780 27 130781 31 130783 39 130784 40 130785 41 130786 43 130788 45 130789 46 130792 53 130793 62 130794 71 130796 72 130797 73 130799 75 130800 77 130801 79 130802 81 1308...
result:
ok OK, answer exists, pans = jans = 1
Test #29:
score: 0
Accepted
time: 14ms
memory: 5964kb
input:
200000 99998 2 1 2 1 2 1 1 1 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 1 2 2 1 1 1 2 2 1 1 2 2 1 1 1 2 1 1 1 2 1 2 1 1 1 1 1 2 1 2 1 1 2 2 2 1 1 2 2 2 1 2 2 1 2 2 1 1 1 1 1 2 2 2 1 2 1 1 2 2 2 1 2 2 1 2 1 2 1 2 1 2 1 2 2 1 1 1 1 1 2 1 1 2 1 1 1 1 2 1 1 2 1 1 2 1 2 1 2 1 2 1 1 2 1 1 2 1 2 1 2 1 1 1 1 1 1 1 2 2 1...
output:
-1
result:
ok OK, no solution
Test #30:
score: 0
Accepted
time: 7ms
memory: 4956kb
input:
123981 200000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
1 6 69 300 151 70361 196 104722
result:
ok OK, answer exists, pans = jans = 1
Test #31:
score: 0
Accepted
time: 11ms
memory: 5764kb
input:
200000 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
output:
-1
result:
ok OK, no solution
Test #32:
score: 0
Accepted
time: 13ms
memory: 9260kb
input:
200000 43842 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1...
output:
1 43842 5 160001 7 160004 22 160007 24 160009 27 160012 39 160014 41 160016 48 160018 55 160019 58 160022 60 160024 72 160026 78 160027 84 160029 91 160030 103 160033 114 160035 120 160037 126 160039 138 160041 151 160044 154 160045 165 160047 167 160048 170 160050 191 160051 195 160053 198 160055 1...
result:
ok OK, answer exists, pans = jans = 1
Test #33:
score: 0
Accepted
time: 23ms
memory: 13180kb
input:
200000 180200 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 ...
output:
1 180200 1 100001 2 100002 3 100004 4 100005 5 100006 6 100007 7 100008 8 100009 10 100010 11 100011 12 100012 13 100013 14 100014 15 100015 17 100016 18 100018 19 100019 20 100020 21 100021 22 100022 23 100024 24 100025 25 100026 26 100027 27 100028 28 100029 30 100030 31 100031 32 100032 33 100033...
result:
ok OK, answer exists, pans = jans = 1
Test #34:
score: 0
Accepted
time: 12ms
memory: 5936kb
input:
200000 181997 2 2 2 1 2 2 2 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
-1
result:
ok OK, no solution
Test #35:
score: 0
Accepted
time: 16ms
memory: 10376kb
input:
200000 200000 2 1 2 2 1 1 2 2 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 2 2 1 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 2 1 1 1 1 1 2 1 1 1 1 1 2 1 2 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2 1 1 1 1 1 2 1 2 1 1 2 1 2 1 2 2 1 2 2 2 2 1 1 2 1 1 2 1 2 1 1 2 2 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 2 1 1 2 1 1 1 1 1 1 1 2 ...
output:
1 80000 1 120002 3 120010 4 120012 7 120013 8 120015 14 120016 15 120018 24 120019 25 120021 27 120023 30 120025 43 120026 45 120027 47 120030 53 120032 59 120035 61 120036 62 120037 65 120039 77 120040 80 120042 86 120044 88 120046 91 120047 93 120050 95 120053 96 120054 98 120055 99 120059 100 120...
result:
ok OK, answer exists, pans = jans = 1
Test #36:
score: 0
Accepted
time: 6ms
memory: 6624kb
input:
99999 20000 2 1 2 1 2 1 1 2 2 1 1 2 2 1 2 1 2 1 2 1 1 1 1 2 1 1 2 2 2 1 2 1 2 1 2 2 1 1 2 2 2 1 2 1 2 2 1 1 2 1 1 2 2 2 1 2 2 1 1 1 1 1 2 1 1 2 1 1 2 1 2 2 1 2 2 1 1 1 1 1 1 2 1 1 2 1 1 1 1 2 1 1 2 1 1 1 1 1 2 1 2 2 1 1 1 1 2 1 2 1 1 1 1 1 2 1 1 1 1 2 1 2 1 2 1 1 2 1 1 1 1 1 1 1 2 1 1 2 2 2 2 1 1 1 ...
output:
1 20000 1 23782 3 23784 5 23810 8 23813 9 23820 12 23822 13 23833 15 23846 17 23863 19 23865 24 23888 27 23890 28 23892 29 23893 31 23902 33 23916 35 23925 36 23947 39 23949 40 23963 41 23968 43 23970 45 23976 46 23978 49 23995 52 23998 53 24005 54 24009 56 24018 57 24022 63 24025 66 24027 69 24045 ...
result:
ok OK, answer exists, pans = jans = 1
Test #37:
score: 0
Accepted
time: 13ms
memory: 5808kb
input:
200000 155553 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 2 2 2 2 2 2 2 1 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1 2 2 2 2 2 2 ...
output:
-1
result:
ok OK, no solution
Test #38:
score: 0
Accepted
time: 14ms
memory: 13096kb
input:
200000 177776 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
1 177776 1 95001 2 95002 3 95003 4 95005 5 95006 6 95007 7 95009 8 95010 9 95011 10 95012 11 95014 12 95015 13 95016 14 95017 15 95019 16 95020 17 95021 18 95022 19 95023 21 95024 22 95026 23 95027 24 95028 25 95029 26 95030 27 95031 28 95032 29 95033 30 95034 31 95036 32 95037 33 95038 34 95039 35 ...
result:
ok OK, answer exists, pans = jans = 1
Subtask #4:
score: 10
Accepted
Test #39:
score: 10
Accepted
time: 1ms
memory: 3756kb
input:
1234 2468 1067 499 654 607 184 787 1019 515 767 1063 984 1195 810 724 933 98 33 971 783 365 1198 1154 1145 962 1189 123 592 999 1202 646 28 964 144 993 15 79 101 420 898 950 159 469 96 247 780 418 400 62 126 314 789 854 109 951 824 504 634 683 231 924 392 915 408 434 1066 315 751 230 18 590 356 1079...
output:
1 1207 1 1067 756 377 471 545 1129 119 433 580 947 164 776 632 923 413 362 258 608 926 157 651 284 1121 1190 99 1043 352 321 95 1082 353 1033 669 443 843 161 1165 83 24 962 192 864 58 683 694 685 395 819 466 1102 542 287 966 517 107 927 48 62 915 1085 701 1039 642 828 1227 372 425 903 748 128 480 30...
result:
ok OK, answer exists, pans = jans = 1
Test #40:
score: 0
Accepted
time: 33ms
memory: 10200kb
input:
100000 200000 45504 47804 45264 94863 54783 76516 98220 95370 74297 83009 82657 45299 5577 39293 65445 20416 85814 95227 68721 21345 78007 51041 66060 68578 82424 96542 82236 22006 15590 29466 34835 98558 91167 12227 57072 9688 87267 27002 35835 49704 11910 98195 78679 84132 49971 12466 64718 27518 ...
output:
1 100000 1 45504 39588 84164 86429 33285 48431 30702 59653 35448 56543 47177 74100 76575 64712 54340 84165 66600 55711 18675 58392 72414 95016 78244 60686 16438 58523 85097 58446 45996 80024 16538 82229 84692 6337 94666 32775 36219 19330 74342 47562 97082 57983 60479 37086 90199 69010 37482 66380 92...
result:
ok OK, answer exists, pans = jans = 1
Test #41:
score: 0
Accepted
time: 23ms
memory: 7676kb
input:
79239 158478 24252 2 34156 4 5 30636 7 8 63508 19101 52923 12 12791 14 15 16 17 62863 19 20 32392 77158 41183 24 25 74233 27 28 29 17731 16787 2766 42993 33661 35 73932 27374 38 3770 21805 21186 42 43 44 45 63950 47 48 49 50 51 35896 53 54 6830 75850 57 60844 74583 10638 61 62 53921 64 65 66 67 7869...
output:
1 43684 1 24252 20540 79208 14571 46043 21533 38531 33565 23278 38013 8677 10907 3764 20999 9008 38335 52370 66229 33455 19871 24510 48684 51394 48466 74120 16171 53626 70041 12390 20125 70156 77500 29837 71005 67767 48573 75919 49289 52000 49282 27149 39730 41381 38316 57997 43032 6479 5935 46664 3...
result:
ok OK, answer exists, pans = jans = 1
Test #42:
score: 0
Accepted
time: 12ms
memory: 4996kb
input:
100000 200000 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 9...
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #43:
score: 0
Accepted
time: 33ms
memory: 10280kb
input:
100000 200000 89689 95563 64383 51142 36672 54755 54504 10175 78679 72623 41528 40161 98875 48843 86704 46632 55183 16159 16539 1847 5327 70134 44771 70378 37978 19726 52108 81320 64745 15342 64307 40755 49124 32663 13823 30205 62714 9986 61279 82402 40182 25736 56592 97249 97848 36380 46202 83044 4...
output:
2 100 99997 99110 99987 98359 99979 99982 99937 99969 99935 99996 99796 99708 99849 99156 99847 99834 99604 99004 98466 99666 99662 99938 99903 99968 99062 99672 99934 99972 99985 99963 99862 99863 99900 99855 99495 99994 99882 99974 99756 99840 99737 99876 99792 99914 99915 99801 99647 99923 99976 ...
result:
ok OK, answer exists, pans = jans = 2
Test #44:
score: 0
Accepted
time: 33ms
memory: 10124kb
input:
99999 199998 62488 22847 3234 75894 62104 32803 94490 45879 14203 95120 8862 86642 47164 17002 170 80091 61433 88404 70269 77487 39577 82048 2664 34911 76639 70737 54291 64193 69732 63350 7749 31216 49153 30636 16291 20209 56818 77268 1286 90361 90544 74596 35211 74972 97954 14069 49427 50089 49437 ...
output:
2 23 99998 99984 99973 99985 99957 99874 99997 99301 99945 99999 99983 99834 99944 99980 99995 99969 99994 99947 99986 99996 99964 98644 99292 99999 1 62488 22803 58423 48257 10328 98666 93620 99200 90093 89849 89453 73214 85287 51588 73453 19453 94702 86635 82575 42179 20970 68204 90977 5025 63379...
result:
ok OK, answer exists, pans = jans = 2
Test #45:
score: 0
Accepted
time: 33ms
memory: 10108kb
input:
100000 200000 10266 7482 24064 80041 38663 48813 76615 8024 29028 94063 85729 63988 7687 24244 75511 33300 79156 67841 85563 32314 79847 47152 18386 93892 81087 40108 63090 91463 30081 1534 63389 14048 62730 32536 26453 30995 76187 68373 33917 49221 88444 49 99073 5226 81063 19674 56234 98537 32931 ...
output:
2 2 99999 100000 100000 1 10266 13937 20516 81150 65142 33871 72467 77970 15124 43975 40256 73008 42866 50771 64240 48353 68757 48578 6074 93890 3449 16994 82367 37984 57367 52863 14271 59943 54828 53560 30610 27078 83302 89961 20648 66668 86139 84166 80235 3413 46029 92460 81016 90252 96180 64129 ...
result:
ok OK, answer exists, pans = jans = 2
Test #46:
score: 0
Accepted
time: 34ms
memory: 10156kb
input:
100000 200000 40445 91528 94778 36675 95569 93373 14763 65260 61358 87241 49140 76523 74568 13568 11850 74185 98615 475 10484 58033 45739 19986 76289 42276 14504 79705 49740 9877 1639 84842 40913 15597 17969 50218 14308 35281 18905 45122 65025 73388 6027 26651 52766 47425 86182 39346 7473 65855 8063...
output:
2 3 99995 100000 99998 99445 1 40445 12415 86363 99996 37269 23001 61529 71870 2351 2377 95194 54167 74812 58940 41561 9920 86642 49565 26014 87433 44600 81318 12508 25383 28608 56203 21478 16679 61084 96271 42503 86527 16486 96971 44635 5632 5350 28818 15717 55174 80862 70051 97093 1796 37169 6101...
result:
ok OK, answer exists, pans = jans = 2
Test #47:
score: 0
Accepted
time: 43ms
memory: 10112kb
input:
100000 200000 29067 19934 84099 17150 50281 30284 75645 53261 55387 79570 78428 20156 82073 94307 14525 1774 95981 77630 90349 6964 1671 53041 25162 4162 9025 41774 41262 64633 79971 60097 58264 65607 28281 41518 91012 87537 47229 60945 95451 53962 14927 78510 534 58087 44172 19264 186 49721 48256 2...
output:
2 50000 186 534 631 867 878 953 972 1026 1077 1081 1219 1293 1429 1445 1480 1671 1733 1760 1774 1851 1895 1916 1928 1945 2126 2187 2252 2355 2543 2559 2567 2592 2614 2618 2694 2704 2710 2741 2758 2803 2841 2885 2912 2976 2982 2988 3007 3025 3043 3069 3075 3085 3095 3118 3145 3150 3172 3282 3335 3387...
result:
ok OK, answer exists, pans = jans = 2
Test #48:
score: 0
Accepted
time: 32ms
memory: 10196kb
input:
100000 200000 49095 36827 85302 61355 24624 26024 59404 89006 49006 10306 80370 22901 38050 31399 38803 59741 53229 23389 39486 87519 62201 47274 91254 56358 79559 71072 76552 85923 76241 12158 96158 73424 59943 5358 5300 25806 13415 84631 29890 13031 84936 51401 46324 20165 96552 94002 3634 70273 8...
output:
2 23456 69522 39664 52127 52458 6572 28823 11346 87767 44927 1897 98096 94880 66216 20880 89623 94955 98777 35949 63657 58331 54024 56151 78351 61614 21801 75663 93535 2814 80783 95067 72303 92694 81955 84994 29335 41350 55927 55165 48152 30568 57815 84516 57572 98616 3541 83747 61956 71504 93421 72...
result:
ok OK, answer exists, pans = jans = 2
Test #49:
score: 0
Accepted
time: 36ms
memory: 10112kb
input:
100000 200000 41650 36821 23297 32390 10080 57556 22668 22841 65125 48949 71839 20309 97907 11968 86574 47220 44327 63294 82333 67484 87549 95374 91239 32944 14894 44015 35329 80374 95508 62972 15407 97273 44767 26083 71954 76328 87140 17383 38194 5720 27049 93804 63821 46813 8437 11117 16979 17969 ...
output:
2 10239 33294 764 89271 1334 84846 74621 66755 89079 78904 83472 69072 23581 93632 3068 58894 3138 97367 86670 65839 88524 32197 44250 93974 53244 77788 48487 65010 88933 3919 31085 97427 62545 61634 4144 99998 80602 17493 95125 87965 85603 44987 81664 84623 88224 99467 50034 78185 48353 5827 99189 ...
result:
ok OK, answer exists, pans = jans = 2
Test #50:
score: 0
Accepted
time: 30ms
memory: 10124kb
input:
100000 200000 30192 69146 22746 89542 92266 86631 67852 50511 87440 75856 12619 93967 50906 9202 3877 96526 72989 91357 23262 96213 91850 84114 77504 29360 20809 55415 96061 64303 58913 73666 64471 65701 49403 32493 88321 6431 60587 56001 5970 45610 72713 9030 77545 15943 91492 76086 48210 45158 836...
output:
2 531 75965 99186 90658 99761 99870 99595 95477 88906 99659 93932 50961 83050 99542 99615 29028 99769 85748 99653 70006 99992 99944 99975 89929 99902 99712 99838 96883 99551 99925 99496 99324 58524 99997 99548 83303 59996 90898 93062 78084 83912 99125 99938 99987 99998 18310 99882 76718 99967 99935 ...
result:
ok OK, answer exists, pans = jans = 2
Test #51:
score: 0
Accepted
time: 35ms
memory: 9640kb
input:
100000 200000 27471 38584 18082 4 83233 6 63533 88861 9 31649 31919 10375 17599 43081 8672 16 30654 45903 19 31954 10579 14433 22039 13908 1741 26 43017 25212 22417 30 47116 24956 16229 66306 85150 21611 61190 23411 39 48940 40448 15590 43 33476 9471 46 80468 36069 91465 61802 51 52 53 54 99060 56 1...
output:
2 2 100000 95706 76857 1 27471 65890 62663 15159 72957 3385 52622 4100 25334 52502 36882 90403 63663 38122 98895 67292 31995 87004 7409 29381 36512 22407 50856 21625 32686 23657 55058 54398 74179 31270 62097 74281 67777 42857 35698 91668 97198 74663 71577 53071 88878 7856 27877 92512 82224 78692 60...
result:
ok OK, answer exists, pans = jans = 2
Test #52:
score: 0
Accepted
time: 34ms
memory: 10072kb
input:
100000 200000 86686 31504 62871 1129 58174 12126 83998 77175 82340 10557 78263 55088 63526 71664 7107 86659 56548 7035 91674 57204 45256 4829 58520 57846 78771 93594 73892 95020 45391 53546 24860 95840 12431 1397 72617 61658 71267 26450 57573 30293 11494 25591 57812 6561 50070 11886 62697 67344 7205...
output:
2 25000 81949 32944 90585 66699 96322 44432 51677 76044 56055 1239 40889 71554 57052 77579 45649 59912 94917 20926 39761 83815 1809 87163 44363 70237 85319 57350 97838 78307 83361 79057 98377 95975 66997 47508 91679 67698 2477 71358 93044 88546 73830 33060 73383 95184 23600 98108 91159 2870 68201 41...
result:
ok OK, answer exists, pans = jans = 2
Test #53:
score: 0
Accepted
time: 30ms
memory: 10148kb
input:
100000 200000 35822 48325 92691 38539 9283 50834 52990 65545 63889 94252 79908 35428 41572 36935 20084 32100 7880 33345 1675 2393 11874 3961 47185 20080 57756 62808 72923 85698 48390 73294 69640 75616 40208 75270 64412 57472 47119 2773 15730 30108 29688 16358 27443 91768 61096 83728 17043 48316 1277...
output:
2 15000 41206 33351 88389 82175 1155 72205 84145 92980 1826 11164 41890 67112 21074 99847 99329 2639 99503 21388 60085 99250 99946 9556 58883 99734 88138 67279 98521 27865 49127 45359 65152 99693 76409 68877 41260 3236 52202 83947 21637 81097 3534 42159 3605 99498 57056 99997 54499 59043 84383 3711 ...
result:
ok OK, answer exists, pans = jans = 2
Subtask #5:
score: 10
Accepted
Test #54:
score: 10
Accepted
time: 1ms
memory: 3500kb
input:
1000 0 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...
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #55:
score: 0
Accepted
time: 1ms
memory: 3552kb
input:
1000 990 478 218 672 192 577 465 378 574 3 829 632 535 641 822 210 598 541 890 986 256 561 45 567 7 21 539 341 300 555 572 499 223 30 76 519 888 818 291 39 63 671 838 524 827 280 122 898 592 294 327 488 840 657 233 793 792 221 527 940 548 361 705 701 266 839 653 370 564 112 716 172 628 298 588 724 1...
output:
3 419 1 478 689 43 524 203 851 871 78 486 472 194 826 42 838 897 732 714 595 14 822 224 198 391 944 514 690 279 875 392 505 305 650 372 124 718 709 551 74 588 323 659 497 383 232 730 865 18 890 273 570 412 608 131 874 200 581 185 68 564 702 738 934 814 340 969 471 749 534 773 481 65 839 177 831 995 ...
result:
ok OK, answer exists, pans = jans = 3
Test #56:
score: 0
Accepted
time: 1ms
memory: 3544kb
input:
1000 992 198 655 110 228 705 32 472 989 562 670 262 781 438 859 309 733 641 497 76 362 169 11 187 647 177 140 583 417 571 373 594 300 565 792 182 89 853 454 225 28 199 295 570 85 744 112 442 926 397 5 315 695 223 247 649 146 282 858 158 208 473 549 821 249 527 434 132 467 359 895 650 510 61 560 48 7...
output:
3 334 1 198 645 748 738 617 675 480 40 28 417 887 915 706 812 377 763 448 313 978 6 32 300 270 392 870 559 637 882 175 835 939 929 69 359 184 916 201 734 822 391 672 55 649 283 447 540 982 462 65 527 425 77 529 723 95 213 252 440 770 129 636 741 632 406 724 593 279 886 131 176 38 454 759 776 37 853 ...
result:
ok OK, answer exists, pans = jans = 3
Test #57:
score: 0
Accepted
time: 1ms
memory: 3572kb
input:
1000 200000 380 924 762 811 340 994 468 478 462 447 632 479 196 206 285 293 483 423 281 596 189 977 144 932 186 176 597 674 728 866 46 881 686 56 437 863 847 382 39 170 591 101 719 767 933 989 763 886 318 570 211 187 53 621 748 339 354 193 344 265 519 91 71 754 452 864 102 287 409 636 648 249 555 63...
output:
2 3 999 892 1000 990 1 380 962 846 248 920 941 809 154 696 968 773 945 481 973 83 508 673 88 522 28 674 614 198 572 654 461 459 234 320 524 108 865 169 742 372 387 364 683 560 732 997 96 41 591 377 307 322 29 728 539 30 866 960 887 631 839 514 407 498 587 312 286 117 797 255 785 765 122 993 922 741...
result:
ok OK, answer exists, pans = jans = 2
Test #58:
score: 0
Accepted
time: 1ms
memory: 3568kb
input:
1000 1010 328 243 762 995 445 449 336 827 105 237 185 685 942 975 256 82 135 534 77 403 303 688 565 448 453 444 671 667 214 714 130 86 518 304 233 131 437 136 937 676 584 609 193 930 462 144 200 92 333 41 261 458 650 889 1 886 490 741 564 860 665 711 29 728 267 493 903 777 278 481 314 524 948 381 23...
output:
2 2 1000 970 1000 1 328 113 696 411 694 74 381 504 770 873 127 834 171 863 260 898 206 276 484 772 909 612 334 661 958 331 883 830 71 314 189 698 148 765 641 218 207 265 640 891 21 303 865 618 606 394 251 107 571 512 349 651 971 679 552 177 327 62 711 255 47 200 946 531 134 638 400 849 813 443 823 ...
result:
ok OK, answer exists, pans = jans = 2
Test #59:
score: 0
Accepted
time: 1ms
memory: 3508kb
input:
1000 999 849 773 53 451 832 243 491 5 50 880 704 513 825 63 627 329 674 893 268 85 580 922 131 532 465 680 253 256 267 416 882 528 530 119 787 523 392 282 195 683 738 774 855 435 603 136 708 320 318 724 162 49 302 65 852 644 695 341 360 375 896 641 942 567 681 776 409 265 613 842 753 566 308 620 541...
output:
-1
result:
ok OK, no solution
Test #60:
score: 0
Accepted
time: 1ms
memory: 3508kb
input:
1000 899 849 30 612 427 515 90 446 700 482 894 706 955 72 341 979 325 876 744 19 909 89 573 23 773 668 493 428 724 87 86 682 852 468 359 35 420 967 279 957 577 144 555 567 990 371 976 793 795 49 873 674 197 805 915 925 56 987 607 344 490 61 775 63 64 551 492 311 652 907 280 738 766 889 764 511 322 7...
output:
-1
result:
ok OK, no solution
Test #61:
score: 0
Accepted
time: 1ms
memory: 3440kb
input:
1000 951 214 707 974 784 266 397 7 601 626 558 927 12 948 920 689 961 10 18 19 426 623 772 825 418 148 96 166 26 529 30 489 750 178 954 35 20 880 183 619 138 152 326 699 858 429 998 90 963 869 375 457 52 561 54 140 176 1 702 719 555 533 62 63 849 598 99 116 170 69 889 345 662 802 547 678 451 658 281...
output:
51 51 718 386 856 673 780 935 941 934 736 908 574 648 986 978 980 971 979 814 992 486 944 628 836 902 923 891 889 996 965 536 802 859 720 653 840 984 894 975 804 931 757 899 883 989 991 870 997 952 853 799 777 41 1 214 321 896 286 360 578 323 201 956 294 679 737 153 341 962 414 284 392 410 936 498 ...
result:
ok OK, answer exists, pans = jans = 51
Test #62:
score: 0
Accepted
time: 1ms
memory: 3552kb
input:
1000 1000 469 836 645 201 533 235 605 717 739 454 743 609 51 604 847 885 990 638 490 892 592 359 472 161 158 240 121 724 159 390 476 387 746 980 47 866 487 537 424 62 862 975 689 336 733 326 35 197 554 900 13 948 515 417 405 438 243 287 211 940 498 40 742 683 997 929 70 239 867 67 188 339 191 352 93...
output:
500 2 1 469 2 2 836 2 3 645 2 4 201 2 5 533 2 6 235 2 7 605 2 8 717 2 9 739 2 10 454 2 11 743 2 12 609 2 13 51 2 14 604 2 15 847 2 16 885 2 17 990 2 18 638 2 19 490 2 20 892 2 21 592 2 22 359 2 23 472 2 24 161 2 25 158 2 26 240 2 27 121 2 28 724 2 29 159 2 30 390 2 31 4...
result:
ok OK, answer exists, pans = jans = 500
Test #63:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
1000 1239 487 932 31 515 908 434 517 612 113 803 581 711 159 613 84 165 534 969 865 942 429 695 529 258 970 794 773 703 230 881 3 927 962 596 294 362 48 100 91 494 209 473 565 964 687 81 524 37 463 643 571 992 85 848 552 806 971 152 167 861 163 397 351 426 766 321 440 87 420 645 899 523 131 677 660 ...
output:
263 239 31 48 81 84 85 87 91 100 113 128 131 137 140 152 159 160 163 165 167 168 171 184 185 190 193 196 209 214 217 219 224 230 251 258 259 261 263 267 270 275 286 294 301 304 310 320 321 325 326 331 345 346 348 351 353 355 357 359 360 361 362 367 368 373 376 381 383 394 397 400 402 404 408 410 412...
result:
ok OK, answer exists, pans = jans = 263
Test #64:
score: 0
Accepted
time: 1ms
memory: 3736kb
input:
1000 890 67 538 816 774 110 606 195 8 9 10 474 918 479 351 525 233 256 88 953 841 364 986 217 855 520 808 458 849 182 79 413 32 306 691 720 495 283 739 51 132 883 42 587 799 45 566 245 860 593 511 58 852 145 633 811 755 612 485 655 128 187 450 63 850 493 72 756 68 451 527 127 725 73 784 299 27 857 2...
output:
39 13 79 887 933 738 825 921 530 487 687 388 394 820 672 712 1 67 756 670 382 391 552 443 910 442 680 572 955 423 225 373 885 478 795 303 257 24 855 169 569 393 810 992 441 504 785 769 21 364 631 62 450 715 420 397 170 310 819 64 850 456 613 731 444 896 348 459 203 326 498 634 939 120 213 289 380 8...
result:
ok OK, answer exists, pans = jans = 39
Test #65:
score: 0
Accepted
time: 1ms
memory: 3396kb
input:
1000 968 793 673 970 151 243 965 585 872 185 704 664 305 70 729 865 463 315 306 829 985 884 955 572 921 174 161 785 546 46 540 204 318 875 472 75 90 246 226 982 578 582 917 926 766 22 74 747 561 409 422 297 233 288 111 914 195 254 734 617 929 334 846 779 452 424 933 322 416 867 490 923 137 475 819 6...
output:
-1
result:
ok OK, no solution
Test #66:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
1000 487 1 633 3 752 5 6 438 154 9 407 11 8 914 256 933 583 872 107 19 20 108 353 23 24 217 26 587 484 29 706 676 285 33 983 35 36 37 750 39 40 41 42 283 472 201 46 47 48 671 284 51 851 810 54 114 974 57 58 357 60 61 62 271 52 65 910 67 705 69 588 71 72 14 74 89 76 385 78 482 596 81 82 83 84 85 86 8...
output:
5 18 995 148 155 983 242 812 974 396 997 991 996 979 977 990 786 613 891 985 461 2 633 27 587 254 236 984 501 957 333 167 16 583 713 179 513 10 407 209 474 49 671 68 705 562 903 569 581 44 472 768 207 996 663 111 856 123 471 586 632 98 143 840 680 832 423 294 666 842 600 549 836 540 363 106 210 77 ...
result:
ok OK, answer exists, pans = jans = 5
Test #67:
score: 0
Accepted
time: 1ms
memory: 3552kb
input:
1000 0 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...
output:
-1
result:
ok OK, no solution
Test #68:
score: 0
Accepted
time: 1ms
memory: 3572kb
input:
999 1000 831 697 655 509 919 134 583 432 898 446 240 9 348 947 159 364 129 316 999 677 576 984 978 312 804 739 911 723 624 566 269 799 421 596 710 760 679 38 350 127 943 42 915 162 45 46 895 959 850 50 904 322 659 542 714 989 744 726 52 200 413 460 740 64 371 774 662 707 178 445 287 72 807 916 612 3...
output:
1 900 1 831 198 960 905 785 805 501 126 552 385 133 964 540 276 970 293 567 926 374 104 295 713 923 689 586 637 260 772 307 90 172 729 776 447 70 445 344 815 753 183 358 906 443 732 794 842 609 602 503 584 768 750 603 575 939 310 444 161 433 117 93 234 622 518 135 724 711 399 832 619 616 883 531 297...
result:
ok OK, answer exists, pans = jans = 1
Subtask #6:
score: 15
Accepted
Dependency #5:
100%
Accepted
Test #69:
score: 15
Accepted
time: 24ms
memory: 6552kb
input:
200000 0 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...
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #70:
score: 0
Accepted
time: 38ms
memory: 11980kb
input:
200000 27899 1 2 3 190882 5 6 7 8 9 129484 11 97800 13 134424 15 16 17 18 19 20 21 175824 23 24 25 26 27 28 29 30 31 32 135997 121012 35 36 37 120912 119681 40 41 42 43 16366 45 46 47 48 84946 50 51 52 53 54 55 188738 57 138274 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 124576...
output:
3 6955 4 190882 185615 155103 157239 57401 108521 65600 23829 169685 79108 152689 127305 21819 197690 68600 174169 53718 58411 76648 75388 95417 138385 133420 127030 16589 39719 180327 93383 133671 7281 57282 67877 137134 184455 141364 46588 16358 64609 92670 102658 182778 51632 122444 95668 40221 5...
result:
ok OK, answer exists, pans = jans = 3
Test #71:
score: 0
Accepted
time: 29ms
memory: 6548kb
input:
200000 0 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...
output:
-1
result:
ok OK, no solution
Test #72:
score: 0
Accepted
time: 48ms
memory: 13164kb
input:
200000 132101 194594 2 3 4 5 127602 10715 8 9 10 11 12 13 122973 180611 100812 178251 11178 19 11314 21 145480 23 9855 25 26 27 28 29 30 127664 32 33 152205 167814 36 28833 38 39 40 29372 42 43 44 45 46 47 48 49 50 192705 52 195393 54 7651 110267 57 58 59 60 180448 62 63 18714 65 66 67 184602 69 70 ...
output:
2 3 199978 199999 199932 67899 1 194594 29269 23951 130677 121061 139443 167651 127981 166890 9781 58019 140120 143925 153211 188806 867 92693 53826 116963 27173 13158 180397 15816 134896 2596 29803 97683 30876 99439 42593 150582 51968 133437 55661 22885 176704 181758 36299 83094 96000 27842 29232 ...
result:
ok OK, answer exists, pans = jans = 2
Test #73:
score: 0
Accepted
time: 75ms
memory: 14504kb
input:
200000 200000 27350 197231 35384 139092 41842 58950 23291 51815 195076 159286 106305 21258 107228 153086 119872 143757 159958 187144 20521 21290 158785 187111 77497 32847 117004 85943 127041 82568 47679 12894 101632 112816 59485 46266 39186 88038 23646 38027 133589 147765 86191 157619 117869 114259 ...
output:
2 121236 1 27350 41638 132462 61151 40649 78988 88151 107320 139500 48557 140681 90758 17479 35349 192003 12747 76775 145242 160115 25721 81432 96600 177665 101165 162184 195413 99458 156671 151815 97041 166580 144917 110431 166472 41647 188502 158803 108214 123237 60578 140619 82144 110968 48392 18...
result:
ok OK, answer exists, pans = jans = 2
Test #74:
score: 0
Accepted
time: 59ms
memory: 8276kb
input:
200000 199999 124474 155985 182156 173928 156511 58661 178987 151169 162461 51042 155499 37039 68711 198860 116904 90818 110321 53945 196315 182028 191028 4595 124714 75672 35323 96765 180267 44664 116290 8548 191620 13180 170809 89576 172029 157464 61851 183136 38638 70676 129287 181999 130911 1472...
output:
-1
result:
ok OK, no solution
Test #75:
score: 0
Accepted
time: 54ms
memory: 8328kb
input:
200000 176222 141700 198245 168427 44649 5 189063 177173 76996 188538 156463 102614 175687 12160 137742 153461 58598 80907 106264 19 114542 70801 175726 184677 29365 24849 473 181468 3588 149809 9353 31 102170 135965 84045 93096 60387 41352 107090 194252 6927 1348 73019 89364 184284 116546 25992 47 ...
output:
-1
result:
ok OK, no solution
Test #76:
score: 0
Accepted
time: 64ms
memory: 14144kb
input:
170001 200000 71821 37502 62828 90645 2350 115400 58178 22478 88210 28232 167745 105482 97079 14187 166287 43734 29668 32724 54720 152438 77376 42146 107695 46790 11411 115642 88370 36279 49424 63661 25305 149681 54311 59793 12984 32461 82904 100779 137672 73267 70574 80050 113797 25255 75533 14036 ...
output:
9880 30122 144510 5790 100172 130947 66054 157188 40178 111742 96700 1685 21167 162754 131096 162741 119015 2183 127040 51886 2626 2672 79569 2794 88368 31879 75704 2983 129395 95258 3097 166134 165650 16514 3395 3411 95505 160475 165325 118655 108615 18553 109614 58414 153003 151453 86656 157778 16...
result:
ok OK, answer exists, pans = jans = 9880
Test #77:
score: 0
Accepted
time: 64ms
memory: 12300kb
input:
190055 200000 178149 31604 33005 152324 38601 27194 60769 32733 93099 24313 3297 174750 30179 64185 182608 189755 32535 19463 112270 37964 80455 5028 158265 122679 40277 100405 73723 10803 174822 90127 66923 35711 164055 136168 155290 96055 5910 161357 14074 139638 72477 96886 112855 133315 135182 2...
output:
39686 10316 149383 49204 13417 72986 61797 42162 2489 6705 33540 40283 11811 3138 186519 40436 82253 3849 3859 134126 127529 149807 16026 4097 4106 92096 51357 4328 60293 123741 113989 35674 55537 186683 4427 179551 4538 4543 32262 4624 143459 4741 157346 95531 12330 5368 27155 41043 8436 5653 34548...
result:
ok OK, answer exists, pans = jans = 39686
Test #78:
score: 0
Accepted
time: 76ms
memory: 11492kb
input:
200000 200000 39018 143114 105231 123355 103194 147756 131868 108627 16847 82863 121458 13103 14076 159140 111429 165648 38699 153023 114872 33889 26001 47652 163364 186475 163949 177924 157516 75919 87498 172178 120690 29065 175191 117636 198913 190747 161155 102427 121169 199878 172762 173494 1596...
output:
100000 2 1 39018 2 2 143114 2 3 105231 2 4 123355 2 5 103194 2 6 147756 2 7 131868 2 8 108627 2 9 16847 2 10 82863 2 11 121458 2 12 13103 2 13 14076 2 14 159140 2 15 111429 2 16 165648 2 17 38699 2 18 153023 2 19 114872 2 20 33889 2 21 26001 2 22 47652 2 23 163364 2 24 186475 ...
result:
ok OK, answer exists, pans = jans = 100000
Test #79:
score: 0
Accepted
time: 62ms
memory: 12648kb
input:
171231 200000 164075 13270 127502 118540 86179 162747 132435 97890 140248 153160 130815 166933 11652 98093 133833 153128 170990 159885 112731 68240 154107 45613 93201 642 130201 26599 64195 109779 60578 17611 433 118324 156800 170323 42633 120175 166052 151165 72779 54663 39524 83663 2587 89304 1301...
output:
31229 28774 36109 6745 433 556 642 95205 949 108357 1034 1262 94639 1569 123794 33991 95752 29987 52775 97099 154035 95756 155575 144667 2618 2856 2879 106203 125970 98118 35389 96643 123190 137629 99611 3540 133841 139642 3792 67187 143513 4167 58869 147941 93756 58288 4371 132121 51336 4448 4496 1...
result:
ok OK, answer exists, pans = jans = 31229
Test #80:
score: 0
Accepted
time: 73ms
memory: 16224kb
input:
200000 176700 82162 7286 16985 63125 171227 170147 33948 68016 137824 166954 18436 8558 181542 22876 197545 126761 161241 18 19 78853 9801 61543 56129 41921 24448 86706 118776 88935 30701 106671 39630 101061 81049 34 183953 111250 43590 106969 132955 80677 167190 42 43 5726 86145 49093 165059 166629...
output:
149 153 196000 186512 197189 192239 189481 168986 20574 197290 193936 137524 196393 24833 183534 187123 27654 190992 185249 106031 72801 187040 160232 186048 116956 183004 192622 84645 80548 39918 181150 196503 149597 42627 137165 168308 122115 160476 46117 88614 145019 194685 198924 106753 177788 1...
result:
ok OK, answer exists, pans = jans = 149
Test #81:
score: 0
Accepted
time: 56ms
memory: 8152kb
input:
200000 199968 46198 147998 57712 78498 130848 17009 107698 79187 179361 170921 59899 59129 158004 33356 7310 75064 164030 163834 59237 80267 66346 88742 198266 86641 132072 67825 49627 173829 116003 75735 51140 80812 166026 25340 174304 135368 187981 93432 49479 56209 49701 78806 1114 142449 173493 ...
output:
-1
result:
ok OK, no solution
Test #82:
score: 0
Accepted
time: 62ms
memory: 14068kb
input:
200000 187233 1 148466 3 8692 85910 15258 7 190599 9 17592 11 12 3921 14 189788 16 17 18 19 20 196436 22 95184 24 25 182578 27 127108 137456 30 31 32 159636 34 167209 36 158540 33013 100572 14634 87435 42 95540 44 45 46 47 68587 49 50 51 52 78103 85726 28841 161930 154438 58 160716 60 141490 62 1627...
output:
1 100000 2 148466 25521 180636 54766 102475 134162 116577 76589 129225 21447 145121 26262 81370 144719 29742 192344 77392 25320 178853 74583 5487 54620 84675 125526 140677 52422 86782 74029 25663 199086 77143 118677 177896 161109 47435 105634 1607 176431 19457 82370 176184 90353 91784 27337 145125 1...
result:
ok OK, answer exists, pans = jans = 1
Test #83:
score: 0
Accepted
time: 34ms
memory: 10236kb
input:
100000 101980 99336 32943 79842 11941 9317 1950 19284 87024 19783 2472 19267 40432 98653 84155 9213 94124 70008 93944 40581 70944 6175 62909 92613 7037 34221 21622 29705 94586 5497 8037 88857 44331 61638 55461 28160 67123 27390 56024 47572 86234 21100 49023 95568 15247 18240 82605 64338 28881 19522 ...
output:
12 1990 52125 55218 99921 98101 78823 98670 44669 92974 89689 37027 3517 34780 64120 57125 86800 90170 79819 34838 87999 89141 37470 81980 46730 57689 43528 94559 92319 84363 50214 63493 98347 99494 83980 58233 35823 95628 89541 88414 96796 88869 90938 88005 99663 77636 80088 14512 89326 79963 60884...
result:
ok OK, answer exists, pans = jans = 12
Subtask #7:
score: 15
Accepted
Test #84:
score: 15
Accepted
time: 8ms
memory: 4376kb
input:
100000 200000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 ...
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #85:
score: 0
Accepted
time: 12ms
memory: 6752kb
input:
90000 180000 394900285 370831702 394900285 394900285 394900285 394900285 370831702 370831702 394900285 394900285 394900285 370831702 370831702 394900285 394900285 394900285 370831702 394900285 394900285 394900285 394900285 394900285 394900285 370831702 394900285 394900285 394900285 394900285 3708317...
output:
1 42506 1 30001 3 30003 4 30005 5 30009 6 30010 9 30012 10 30013 11 30015 14 30020 15 30024 16 30026 18 30027 19 30036 20 30038 21 30040 22 30042 23 30047 25 30050 26 30052 27 30054 28 30057 30 30059 31 30062 32 30070 34 30071 35 30074 36 30078 38 30083 39 30084 40 30088 41 30091 43 30094 44 30095 4...
result:
ok OK, answer exists, pans = jans = 1
Test #86:
score: 0
Accepted
time: 34ms
memory: 10128kb
input:
100000 200000 395100935 543127001 214182856 175873925 19706134 480647883 870552582 237481220 260946803 73589446 818830474 688586052 203606711 902863796 491264362 465384742 991398781 240973455 300045766 90084210 678241812 252011760 151160135 639822565 925021802 341465602 50360948 442786518 180897343 ...
output:
2 20000 58641 15017 22354 49808 18232 46794 84087 1452 74703 21642 59836 33129 47301 56156 95791 2075 2218 62206 88277 13677 51408 50797 60731 89143 85901 98839 4017 32978 8063 3390 14696 29432 3496 73062 77608 43314 35547 16011 3656 69482 77346 3774 30384 89958 51568 34593 70213 38915 3960 78756 91...
result:
ok OK, answer exists, pans = jans = 2
Test #87:
score: 0
Accepted
time: 40ms
memory: 10260kb
input:
100000 200000 125856453 297520881 753034948 537623372 167966995 622048312 340996890 823840623 693104917 530852062 909622355 610889018 93585301 90998424 835922804 268018088 770532873 591264492 397113920 745727319 171873536 871157799 641502063 920828329 802364446 286243826 103194514 478073659 85031657...
output:
2 30000 45607 438 98358 49486 741 61694 1190 83115 42854 53229 46449 1456 54100 59041 30091 97725 60632 87092 1961 28161 2176 96644 67235 90645 58336 48928 35493 98110 59391 2465 2498 38259 87417 2724 2766 2784 67944 19294 82685 94674 94339 2975 62820 53744 21345 3135 3152 70731 19879 66682 73547 32...
result:
ok OK, answer exists, pans = jans = 2
Test #88:
score: 0
Accepted
time: 18ms
memory: 8112kb
input:
100000 200000 97096 168734 218280 287877 381527 410003 588814 617450 688731 834572 936503 989217 1395837 1416032 1469041 1582283 1659828 1780747 1919538 1998378 2094941 2142068 2146812 2228046 2395174 2434685 2599234 2638724 2672852 2896600 2979329 2994040 3047230 3261426 3264744 3313607 3326946 335...
output:
1 80000 108 1230 336 1410 347 1436 631 1470 777 1472 1016 1666 1029 1751 142 2395 1785 157 2444 1791 180 2559 1945 247 2604 2096 585 2367 718 2418 789 2435 806 2491 808 2597 941 2624 993 2734 1178 2885 1263 3121 1295 3201 1351 3209 1373 3257 1636 2769 114 3650 1656 2939 141 3730 2035 2989 164 3878 2...
result:
ok OK, answer exists, pans = jans = 1
Test #89:
score: 0
Accepted
time: 19ms
memory: 8636kb
input:
100000 200000 106952015 540317333 689198453 744540707 205922854 689198453 767316057 767316057 744540707 106952015 689198453 689198453 689198453 689198453 744540707 744540707 767316057 911684655 767316057 767316057 767316057 689198453 767316057 540317333 911684655 767316057 767316057 689198453 744540...
output:
1 99000 1 11162 10 11168 37 11169 39 11190 40 11192 46 11206 49 11210 55 11218 58 11232 92 11245 94 11247 101 11250 109 11262 110 11268 121 11274 126 11280 129 11282 132 11296 150 11297 172 11300 182 11307 185 11310 189 11326 190 11334 196 11344 200 11350 203 11356 210 11357 212 11369 228 11378 231 ...
result:
ok OK, answer exists, pans = jans = 1
Test #90:
score: 0
Accepted
time: 22ms
memory: 8512kb
input:
100000 200000 506842 1779764 1933447 2171605 3112388 3433827 5168160 6113572 7262768 7880988 8052232 9148442 9358188 10076583 11196775 12185919 12281427 14797620 16226353 16494431 16527666 17897613 18706842 19278334 19497587 22444094 23318255 23615842 26484981 27112508 27522401 28188717 28946741 317...
output:
1 99000 64 4598 77 4617 105 4619 212 4669 220 4699 221 4758 231 4763 237 4764 273 4793 298 4808 400 4809 438 4829 440 4845 450 4858 472 4882 480 4890 485 4942 488 4949 511 4964 536 4967 557 4980 558 5009 563 5033 571 5050 581 5056 585 5070 610 5071 615 5079 686 5092 698 5109 699 5152 705 5154 706 51...
result:
ok OK, answer exists, pans = jans = 1
Test #91:
score: 0
Accepted
time: 24ms
memory: 8452kb
input:
100000 200000 129170573 326521052 57109036 365576384 401125977 834873988 946667628 91034943 399956809 620966594 603886909 795522832 138312729 266380357 15244710 620089609 899350641 689624026 476215460 508843921 113672418 816677517 810384223 492261534 523292122 441279408 242083950 975858389 365576384...
output:
1 99000 15 979 827 239 2202 640 271 2241 497 1444 276 353 4434 962 4340 562 4754 999 1328 773 335 1511 1417 1886 1438 812 1125 127 2457 1355 483 3412 2118 3 6050 918 1615 1943 278 4263 1366 1491 417 3788 2108 1955 215 1688 1512 1319 1082 3078 272 5240 46 5543 1430 6062 863 3740 177 5544 504 4164 197...
result:
ok OK, answer exists, pans = jans = 1
Test #92:
score: 0
Accepted
time: 31ms
memory: 9100kb
input:
100000 200000 240339255 195016556 490388035 940956586 958784806 27967641 692089801 267902323 92927259 194409707 563118753 97732524 501399880 591850724 983812591 119911804 265518074 186003408 601807133 20049622 417345246 964586607 405806879 936689225 666503711 227157965 807465092 308006413 137888232 ...
output:
1 100000 1 24121 68310 23173 41221 31058 62592 34655 23258 42889 80703 61861 31774 1723 32839 2598 4195 26199 27271 37996 17113 2711 5700 9158 18831 20857 10519 873 11236 5521 27572 2355 24877 12535 1720 24276 16086 552 96830 36698 9733 36134 2774 48267 9628 62336 7384 88661 14299 4402 531 8017 4636...
result:
ok OK, answer exists, pans = jans = 1
Test #93:
score: 0
Accepted
time: 18ms
memory: 8148kb
input:
100000 200000 25185 924086257 924086257 25185 924086257 40200 40200 924086257 924086257 141563 924086257 924086257 924086257 924086257 394717 924086257 924086257 441503 924086257 924086257 522164 522164 924086257 924086257 556761 556761 924086257 585767 924086257 924086257 665042 924086257 678244 92...
output:
1 70000 2 65201 3 91506 5 82212 8 78073 9 78517 11 87770 12 86320 13 90989 14 60753 16 66118 17 69992 19 77664 20 85129 23 77621 24 73620 27 72566 29 94878 30 69419 32 78608 34 85901 35 82383 36 79827 39 86399 40 85464 42 62630 44 90681 45 92242 46 74916 50 74189 52 73762 53 64291 56 70152 57 67911 ...
result:
ok OK, answer exists, pans = jans = 1
Test #94:
score: 0
Accepted
time: 15ms
memory: 8476kb
input:
100000 200000 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 812481158 2141670 812481158 812481158 812481158 812481158 812481158 812481158 81248115...
output:
1 99000 1 41330 2 41648 3 42460 4 43527 5 43738 6 44901 7 46125 8 46496 9 46989 10 47332 11 48769 12 49201 13 49235 14 50198 15 51151 16 52617 17 52860 18 54667 19 55606 20 56530 21 58076 23 59796 24 61937 25 62044 26 62625 27 64489 28 64623 29 64957 30 65017 31 65696 32 65788 33 65913 34 66286 35 6...
result:
ok OK, answer exists, pans = jans = 1
Test #95:
score: 0
Accepted
time: 18ms
memory: 7928kb
input:
100000 200000 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590820 851590...
output:
2 2 99834 100000 99000 1 56619 2 58554 3 62337 4 62720 5 69034 6 72506 7 75154 8 76111 9 80543 10 83377 11 83561 12 84631 13 86061 14 88020 15 90905 16 56146 17 59961 18 60127 19 64554 20 67344 21 68600 22 68658 23 68964 24 73378 25 74643 26 74932 27 77561 28 82150 29 82324 30 88472 31 57609 32 591...
result:
ok OK, answer exists, pans = jans = 2
Test #96:
score: 0
Accepted
time: 29ms
memory: 7444kb
input:
100000 200000 642843205 642843205 35449 35449 35449 36793 57234 743553971 57234 118176 118176 573856453 118176 51837383 158902 174498 64228397 225784050 65762692 223536 223536 224935 243350666 800469566 800469566 769552754 324571698 332653 958433359 332653 388319 345399435 777871915 654727480 624677...
output:
2 15000 65111 627 87347 27148 19374 69106 1458 1668 1769 88850 60547 11527 86123 81100 86620 92544 2664 83187 2824 40633 2914 54225 3040 59835 47080 42094 3250 10968 57621 3488 77220 3524 3596 3636 3659 3690 97725 34346 43214 45283 8392 43329 4098 4099 30442 4104 54950 4232 83388 56085 93453 67358 9...
result:
ok OK, answer exists, pans = jans = 2
Test #97:
score: 0
Accepted
time: 17ms
memory: 8652kb
input:
100000 200000 675483739 455029327 543069712 26152534 26152534 543069712 295587124 295587124 543069712 455029327 840201238 438815790 550813586 295587124 455029327 26152534 922462836 840201238 455029327 840201238 675483739 295587124 543069712 675483739 26152534 295587124 543069712 922462836 550813586 ...
output:
2 2 99997 89960 99000 4 10015 5 10027 16 10029 25 10063 34 10066 46 10067 48 10069 73 10070 100 10076 101 10092 117 10098 123 10119 135 10122 139 10140 149 10143 150 10150 153 10174 155 10179 172 10185 179 10190 185 10196 190 10199 191 10204 194 10217 195 10221 199 10228 209 10232 259 10238 265 102...
result:
ok OK, answer exists, pans = jans = 2
Test #98:
score: 0
Accepted
time: 13ms
memory: 8376kb
input:
100000 200000 53073 103110 239930 275707 811947 1081674 1383757 1877145 2071787 2120937 2131271 2313444 2551068 2878142 3016310 3543092 3549565 3601546 3866946 4066570 4139836 4359674 5113129 5137679 5260696 5993190 6073241 6187014 6270847 6428691 6491926 6583820 6643105 6768826 6942865 7106852 7107...
output:
2 2 99893 99654 90000 409 54554 410 54557 411 54570 412 54574 413 54576 414 54579 415 54599 416 54620 417 54634 418 54649 419 54650 420 54654 421 54658 422 54660 423 54661 424 54668 425 54684 426 54690 427 54692 428 54694 429 54697 430 54709 431 54714 432 54722 433 54724 435 54729 436 54735 437 547...
result:
ok OK, answer exists, pans = jans = 2
Subtask #8:
score: 15
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #5:
100%
Accepted
Test #99:
score: 15
Accepted
time: 1ms
memory: 3416kb
input:
1000 0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000...
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #100:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
1000 313 477411548 253961823 477411548 477411548 477411548 253961823 477411548 477411548 253961823 477411548 477411548 253961823 477411548 477411548 253961823 477411548 253961823 477411548 477411548 253961823 253961823 477411548 477411548 477411548 253961823 477411548 253961823 477411548 477411548 4...
output:
-1
result:
ok OK, no solution
Test #101:
score: 0
Accepted
time: 1ms
memory: 3492kb
input:
1000 200000 361387188 361387188 365233459 365233459 365233459 365233459 361387188 361387188 361387188 365233459 361387188 361387188 361387188 365233459 361387188 365233459 361387188 365233459 365233459 361387188 361387188 361387188 365233459 365233459 365233459 361387188 365233459 361387188 36138718...
output:
1 600 3 701 4 702 5 703 6 704 10 705 14 706 16 707 18 708 19 709 23 710 24 711 25 712 27 713 30 714 31 715 33 716 36 717 39 718 45 719 46 720 48 721 53 722 54 723 57 724 58 725 61 726 65 727 70 728 73 729 77 730 81 731 82 732 84 733 86 734 88 735 89 736 91 737 93 738 98 739 102 740 105 741 108 742 1...
result:
ok OK, answer exists, pans = jans = 1
Test #102:
score: 0
Accepted
time: 1ms
memory: 3680kb
input:
1000 1000 28399625 782623364 367497325 54532240 918094680 5995692 380749646 194899601 705789507 9792610 426463549 5228190 134906551 16629399 567271934 175006296 57936214 23483010 24640942 25065581 166982510 26956493 636891937 726020649 313050314 4248649 613465011 31920131 450185514 331897119 9954973...
output:
2 100 992 709 606 995 904 942 983 956 987 211 1000 752 231 801 275 997 996 638 305 911 991 789 320 866 998 678 883 719 957 944 938 925 697 978 989 821 963 675 690 533 775 546 985 965 927 670 828 814 653 598 936 882 750 627 645 986 837 881 898 798 720 729 818 912 733 739 758 754 757 763 773 777 778 9...
result:
ok OK, answer exists, pans = jans = 2
Test #103:
score: 0
Accepted
time: 1ms
memory: 3440kb
input:
1000 950 714545526 684960269 2999777 669283783 11446456 641436288 402090153 138154146 963427426 5972556 626246226 896812746 401239772 50655455 645635251 182135148 332848906 307021050 18761885 15556858 586221003 167019567 471514613 486507738 301600632 513128411 596036611 25274645 839565657 23539650 3...
output:
152 50 345 68 960 550 466 835 456 790 995 879 170 841 992 373 193 194 219 402 505 794 867 998 603 932 999 627 984 977 772 917 857 875 310 978 947 904 320 737 612 881 844 620 973 360 361 560 834 377 621 958 247 1 726 105 291 4 676 780 917 226 423 165 290 441 772 161 286 977 613 250 175 281 516 892 7...
result:
ok OK, answer exists, pans = jans = 152
Test #104:
score: 0
Accepted
time: 1ms
memory: 3512kb
input:
1000 499 819317737 827509452 763079147 3763324 707315731 990757603 462008366 5526552 797752356 814820734 8392903 703553629 408639450 453157739 337283460 377136345 16679800 18562917 468914076 21258677 22879602 678956637 27866718 28584704 29654365 96739360 176105323 37044379 37166208 808993949 9573138...
output:
-1
result:
ok OK, no solution
Test #105:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
1000 500 839214525 453946685 5425894 6363039 6981415 155633145 692613557 958067854 12764819 15528909 999686340 18413418 945012221 898941051 324598638 563272918 24615033 24699142 24750701 522668165 26900451 28168252 28337388 30905164 30988333 31804894 148411947 35800078 731867961 36489441 36559264 36...
output:
1 500 1 835 444 704 644 262 188 258 916 715 89 460 153 155 51 11 1000 806 178 869 406 14 899 741 761 535 402 596 280 919 581 95 226 895 122 973 329 976 858 647 979 698 13 952 948 917 512 450 664 2 436 358 240 827 702 666 868 440 477 673 579 302 832 455 36 766 430 980 456 911 8 961 167 904 259 124 49...
result:
ok OK, answer exists, pans = jans = 1
Test #106:
score: 0
Accepted
time: 1ms
memory: 3576kb
input:
1000 1001 73982052 110920170 797990346 477955396 944330769 108861853 506326319 229810093 121098278 260830147 639144369 430457797 97277703 782082660 695917899 579169033 464628175 955611313 713255254 426096522 195350098 693685083 470478177 504928437 469664787 516376294 504692903 940130643 501885255 40...
output:
1 1000 1 82 304 12 404 941 929 498 289 217 732 83 639 600 686 942 212 575 198 292 913 596 272 864 20 402 572 653 879 414 281 789 441 341 591 467 782 311 881 176 991 513 188 726 743 171 779 670 777 159 210 241 683 53 514 346 199 134 920 692 637 71 428 135 214 668 373 968 125 784 319 489 473 767 523 8...
result:
ok OK, answer exists, pans = jans = 1
Test #107:
score: 0
Accepted
time: 1ms
memory: 3544kb
input:
1000 1000 474165987 823692123 643219331 192387203 535936059 235048151 602900321 706431267 731334927 462392076 732659039 606294265 41278082 602588740 834907353 879792176 992814074 635138592 490222702 886619975 586260565 361920069 476210762 152159842 148990529 237521752 106118473 717177262 150350656 3...
output:
500 2 1 469 2 2 836 2 3 645 2 4 201 2 5 533 2 6 235 2 7 605 2 8 717 2 9 739 2 10 454 2 11 743 2 12 609 2 13 51 2 14 604 2 15 847 2 16 885 2 17 990 2 18 638 2 19 490 2 20 892 2 21 592 2 22 359 2 23 472 2 24 161 2 25 158 2 26 240 2 27 121 2 28 724 2 29 159 2 30 390 2 31 4...
result:
ok OK, answer exists, pans = jans = 500
Test #108:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
1000 1499 693923505 90041091 386655223 707935432 529191375 406743461 954146122 358840646 258158701 308411665 965571161 871309678 67724352 751678236 751306405 465074548 531488308 280705839 843662555 378006949 188919396 382067038 38089079 460107103 107265724 889434000 565300376 343415362 364921583 393...
output:
3 499 43 68 74 89 103 105 116 118 122 126 131 135 147 166 169 171 172 177 194 195 202 209 211 228 232 234 239 251 258 259 262 266 270 275 278 279 283 289 291 294 296 297 298 299 306 314 315 316 317 322 323 325 329 333 339 341 343 344 345 352 361 365 366 371 378 380 385 388 390 391 392 394 400 402 40...
result:
ok OK, answer exists, pans = jans = 3
Test #109:
score: 0
Accepted
time: 1ms
memory: 3476kb
input:
1000 1000 311574534 311574534 311574534 311574534 311574534 311574534 311574534 311574534 311574534 311574534 59551172 451639069 858015244 68504455 808125414 68504455 808125414 858015244 68504455 858015244 808125414 17898685 17898685 663714456 585526066 175859257 209508538 209508538 209508538 175859...
output:
22 20 718 439 991 690 422 358 451 730 783 731 947 685 496 862 726 946 779 846 624 852 459 1 336 2 339 3 340 4 342 5 343 6 346 7 347 8 355 9 357 10 335 151 337 152 338 153 341 154 344 155 345 156 348 157 349 158 350 159 351 160 352 161 353 162 354 163 356 164 358 265 77 269 78 270 79 271 80 264 99 2...
result:
ok OK, answer exists, pans = jans = 22
Test #110:
score: 0
Accepted
time: 0ms
memory: 3524kb
input:
1000 1000 1451896 935173526 369163552 630949488 782383640 308720498 464825543 490300387 983158139 631590538 540981240 691540150 913709197 913709197 913709197 558001422 431133804 431133804 660833524 364297994 813021208 760855696 289046472 289046472 994467214 808171584 808171584 808171584 808171584 80...
output:
22 20 872 844 952 885 368 848 998 655 918 843 951 970 858 895 958 917 983 906 695 996 11 3 393 57 394 691 155 2 948 690 138 395 37 5 778 128 90 211 131 350 129 215 210 805 130 52 464 208 51 6 325 351 216 53 781 324 4 628 209 629 348 630 54 780 212 779 465 804 782 349 573 7 513 10 638 514 9 983 48...
result:
ok OK, answer exists, pans = jans = 22
Test #111:
score: 0
Accepted
time: 1ms
memory: 3468kb
input:
1000 980 442938664 166963157 535359404 451351059 900776401 41221328 260781618 260781618 260781618 260781618 260781618 725802590 888047430 888047430 436081040 454997508 149215654 966843315 58271379 365547006 365547006 62334232 62334232 83577057 819462091 819462091 83577057 83577057 819462091 83577057...
output:
40 12 1 420 2 142 418 369 143 419 370 421 368 865 10 4 430 101 431 3 491 100 489 429 490 11 5 933 722 536 720 934 721 935 723 936 724 38 7 252 8 253 9 254 10 256 11 243 539 246 540 247 541 248 542 249 543 250 544 251 545 242 655 244 656 245 657 255 658 258 659 259 660 260 661 257 25 15 411 16 43...
result:
ok OK, answer exists, pans = jans = 40
Test #112:
score: 0
Accepted
time: 1ms
memory: 3420kb
input:
1000 981 4010961 532002638 532002638 532002638 532002638 532002638 532002638 532002638 545119772 941475422 545119772 941475422 941475422 545119772 545119772 941475422 545119772 545119772 545119772 14041543 663844471 432673694 432673694 699259914 663844471 988609596 653486843 560159811 800964544 5601...
output:
40 27 2 501 201 3 502 4 503 5 506 6 509 7 510 8 500 858 504 859 505 860 507 861 508 862 511 863 512 26 9 531 11 532 14 533 15 535 17 537 10 921 12 922 13 924 16 925 18 530 926 19 534 923 536 927 12 22 417 23 418 21 661 25 662 24 721 416 722 15 26 990 614 174 985 175 989 176 991 177 986 195 987 19...
result:
ok OK, answer exists, pans = jans = 40
Test #113:
score: 0
Accepted
time: 1ms
memory: 3496kb
input:
1000 979 6107173 426537130 426537130 426537130 426537130 426537130 426537130 426537130 426537130 426537130 426537130 426537130 426537130 426537130 426537130 426537130 669586879 669586879 669586879 669586879 669586879 669586879 276550655 661707257 530301950 742991633 570845377 676549445 676549445 676...
output:
-1
result:
ok OK, no solution
Test #114:
score: 0
Accepted
time: 1ms
memory: 3632kb
input:
1000 0 118915 824721 2565382 5295212 5692286 9207935 9811845 12262169 13328574 13706177 16007027 16531408 18508476 18952064 20562118 21259970 21315776 21652716 25977236 27004462 27813022 28852654 28941913 31560923 31806178 33004426 33492493 33761459 33771996 33807920 36750441 36851444 37570259 38486...
output:
-1
result:
ok OK, no solution
Test #115:
score: 0
Accepted
time: 1ms
memory: 3528kb
input:
1000 1000 534094254 939858322 534094254 939858322 46903207 46903207 46903207 937140712 46903207 458324925 922337130 641236713 515821304 690369406 690369406 690369406 690369406 181077134 850361555 850361555 149777219 508502318 951006113 951006113 951006113 666892884 666892884 666892884 925729960 1788...
output:
125 8 1 555 3 556 2 944 4 945 12 5 35 6 36 8 940 7 37 941 9 38 942 6 10 473 11 925 474 926 4 13 535 12 668 11 14 716 324 15 714 16 715 17 718 323 717 3 18 177 483 6 19 858 537 20 859 538 3 21 129 799 9 22 517 23 949 518 24 947 25 948 10 26 692 434 27 694 435 28 695 436 693 3 29 928 863 10...
result:
ok OK, answer exists, pans = jans = 125
Test #116:
score: 0
Accepted
time: 1ms
memory: 3480kb
input:
1000 1000 238358940 693462713 898240279 693462713 982419228 694258450 253740707 693462713 146582997 238358940 153206887 238358940 238358940 693462713 982419228 624475493 405553909 809344066 859672830 759049446 915158772 948581654 859672830 354063664 354063664 216822596 36168522 859672830 216822596 9...
output:
3 19 908 1000 789 405 904 597 954 926 577 653 851 956 751 978 955 975 906 929 977 978 11 243 1 323 10 324 12 327 13 331 9 224 332 7 340 241 231 341 239 531 247 234 347 16 589 248 226 329 227 325 536 326 537 322 345 543 2 657 334 221 584 6 677 240 592 4 672 321 594 8 666 3 920 328 582 337 223 678 24...
result:
ok OK, answer exists, pans = jans = 3
Test #117:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
1000 1000 688099747 399662791 638522894 502069985 403143567 878381963 788126958 326282707 778040233 115436998 456315544 299597783 519087828 38278087 778040233 187075039 502069985 209982168 688099747 11418125 1770863 403143567 1770863 467441837 467441837 467441837 638522894 39163712 935223472 8490670...
output:
3 19 978 1000 758 990 419 743 501 923 568 909 628 636 741 770 970 742 769 846 971 973 2 401 208 18 212 24 484 209 404 28 50 642 213 52 595 25 488 601 21 3 655 27 659 23 4 510 709 17 512 593 1 719 716 19 727 712 594 5 416 652 407 723 6 926 7 838 22 412 721 402 54 413 51 863 26 486 53 866 597 55 835 ...
result:
ok OK, answer exists, pans = jans = 3
Test #118:
score: 0
Accepted
time: 1ms
memory: 3540kb
input:
1000 1000 58270380 394664784 109243892 241759163 236132743 925992515 23962060 156116447 236132743 447482905 602734228 394664784 394664784 16842718 972840951 764767036 16842718 602734228 317455814 412780260 930747784 882813981 698606878 882813981 290449258 67122827 62288619 197656413 444873767 295792...
output:
3 19 813 799 747 981 988 984 983 722 1000 567 730 953 544 836 713 814 980 943 979 977 1 42 124 44 419 41 683 43 813 876 37 885 38 903 39 847 91 855 92 913 125 914 126 854 176 857 177 887 178 890 179 921 180 924 181 881 200 931 201 861 211 863 212 875 213 879 214 899 215 911 216 918 217 925 219 846 ...
result:
ok OK, answer exists, pans = jans = 3
Test #119:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
1000 1000 615975329 615975329 731588326 731588326 622770400 404920142 331607727 759909660 350105712 830151301 830151301 830151301 830151301 830151301 830151301 830151301 830151301 830151301 830151301 365574885 72646768 830151301 830151301 830151301 830151301 830151301 734782237 72646768 350105712 47...
output:
3 19 995 979 603 957 423 497 820 848 601 940 784 939 792 937 806 849 1000 938 948 806 7 331 9 348 33 188 34 190 29 339 472 32 358 1 582 40 553 5 605 39 618 35 192 620 31 692 38 193 329 338 334 197 356 349 195 556 6 411 194 694 30 466 198 357 558 2 580 189 838 36 405 346 464 342 613 187 410 355 467 ...
result:
ok OK, answer exists, pans = jans = 3
Test #120:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
1000 1000 344063362 19707976 19707976 19707976 860291186 739924779 494596921 751401448 90666286 287242140 890937541 90666286 90666286 757353223 62122133 757353223 694373590 61042681 626552104 614524746 626552104 890937541 61042681 890937541 614524746 694373590 999713185 617358092 617358092 370670764...
output:
3 19 1000 185 993 422 605 709 994 736 704 737 474 784 579 580 881 880 708 714 892 805 1 367 297 396 299 704 370 289 372 468 371 736 350 369 352 770 351 520 994 306 174 305 406 308 458 307 550 309 709 293 96 292 291 159 295 288 294 605 101 276 422 196 109 213 110 228 111 240 112 242 113 247 114 270 ...
result:
ok OK, answer exists, pans = jans = 3
Test #121:
score: 0
Accepted
time: 1ms
memory: 3488kb
input:
1000 1000 493614601 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 903519606 ...
output:
7 5 270 421 184 513 422 16 1 272 513 88 184 182 179 183 421 90 180 270 185 331 422 273 967 2 528 3 535 4 552 5 556 6 559 7 563 8 568 9 571 10 572 11 573 12 574 13 585 14 587 15 589 16 590 17 598 18 604 19 608 20 615 21 618 22 620 23 633 24 640 25 644 26 646 27 650 28 654 29 661 30 672 31 673 32 67...
result:
ok OK, answer exists, pans = jans = 7
Test #122:
score: 0
Accepted
time: 1ms
memory: 3540kb
input:
1000 1000 719047098 146929333 502402097 591360862 232133457 70999990 571942963 394997007 332804793 733111349 109324604 44290831 778835413 900375910 986529665 697260962 558927640 418641157 856957430 147714543 424257206 34175768 947012837 878022486 502498930 199597286 322092537 848960036 716704032 573...
output:
97 5 210 212 90 878 412 5 1 414 86 134 85 22 2 49 90 42 177 11 41 212 119 22 6 21 210 53 95 54 412 92 269 31 91 878 3 3 265 105 3 4 311 131 3 5 106 259 5 7 302 116 301 744 3 8 195 12 5 9 137 89 816 136 4 10 420 750 419 5 13 798 112 799 111 4 14 888 875 889 2 15 961 5 16 406 209 129 407 ...
result:
ok OK, answer exists, pans = jans = 97
Test #123:
score: 0
Accepted
time: 1ms
memory: 3656kb
input:
1000 1000 67443 935908652 133918450 578737010 471893157 578737010 531129674 471893157 578737010 471893157 788470533 133918450 420924469 935908652 133918450 788470533 420924469 531129674 420924469 133918450 578737010 788470533 788470533 236921491 580990032 580990032 443006117 302288737 647918461 4628...
output:
2 10 1000 938 976 961 854 949 983 950 931 982 990 3 124 12 130 15 131 20 126 296 136 294 13 369 298 17 371 301 19 375 309 125 386 132 400 133 380 284 434 141 393 290 431 303 436 282 387 437 305 5 448 307 8 449 308 10 455 302 394 426 395 439 129 452 442 370 7 524 443 376 18 530 440 138 459 128 532 1...
result:
ok OK, answer exists, pans = jans = 2
Test #124:
score: 0
Accepted
time: 1ms
memory: 3488kb
input:
1000 1000 393415 28090118 28090118 186131995 186131995 325625188 329059311 329059311 169415225 221199506 221199506 822733931 38848113 309411627 221199506 36711422 589521528 759363679 542564518 442148694 16025117 128839683 466622328 128839683 235820137 235820137 186131995 325625188 1749589 1749589 57...
output:
2 100 466 792 746 745 836 347 827 285 876 751 471 569 364 514 453 852 703 942 820 952 555 468 956 815 601 674 768 900 676 940 516 930 528 587 663 701 557 728 829 853 644 651 982 790 743 640 649 654 719 672 680 683 961 760 949 899 699 787 710 941 720 865 731 734 933 888 828 782 797 803 809 963 981 93...
result:
ok OK, answer exists, pans = jans = 2
Test #125:
score: 0
Accepted
time: 1ms
memory: 3496kb
input:
1000 990 33528487 224623560 394828590 667709896 882786136 439933807 391646429 700758829 402826562 502566794 780346415 19017532 36156105 566098096 257805109 667709896 391646429 473273447 421011880 224623560 931036941 212247422 382679378 608595706 941788169 780346415 238451722 125006536 92119925 56494...
output:
1 990 1 55 150 13 60 29 134 358 15 289 298 56 235 46 320 101 105 49 507 99 176 118 198 37 211 33 127 66 22 259 35 159 173 28 165 478 103 138 311 203 10 546 98 252 182 144 249 31 451 27 278 181 61 195 148 490 53 272 93 566 97 214 368 4 719 58 277 52 126 184 253 67 280 47 318 174 292 48 158 441 7 388 ...
result:
ok OK, answer exists, pans = jans = 1
Test #126:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
1000 990 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 896046493 8...
output:
1 990 1 509 2 547 3 694 4 768 5 892 6 899 7 463 8 474 9 595 10 601 11 614 12 679 13 697 14 479 15 659 16 535 17 585 18 624 19 683 20 805 21 836 22 841 23 917 24 554 25 586 26 776 27 484 28 580 29 658 30 708 31 817 32 898 33 522 34 594 35 653 36 838 37 457 38 524 39 603 40 656 41 716 42 476 43 541 44...
result:
ok OK, answer exists, pans = jans = 1
Test #127:
score: 0
Accepted
time: 1ms
memory: 3556kb
input:
1000 200000 199492796 199492796 512957172 666540612 52705184 447367584 52705184 824543897 666540612 241619013 675576252 447367584 824543897 512957172 113895088 824543897 675576252 241619013 447367584 675576252 824543897 675576252 205487902 447367584 241619013 447367584 447367584 199492796 675576252 ...
output:
1 900 15 120 41 121 45 128 54 141 62 146 64 152 72 172 74 180 83 184 90 190 104 191 1 250 193 2 223 28 236 30 254 35 257 53 260 56 263 69 273 84 281 85 292 23 300 32 310 36 319 39 326 42 335 47 339 58 341 61 348 89 355 94 259 123 360 101 284 129 316 140 343 143 349 150 350 163 357 173 379 10 393 18 ...
result:
ok OK, answer exists, pans = jans = 1
Test #128:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
1000 900 27213604 38142442 371314068 286123026 725665335 585831235 480055354 249138097 795035646 415328097 595528397 375944137 850556022 375944137 280512099 180222581 180222581 468053716 608011846 863151884 249138097 585831235 39131326 505374298 987054664 261333031 286123026 850556022 468053716 5825...
output:
1 900 12 298 46 252 48 73 64 8 155 75 4 228 88 268 167 26 196 15 223 27 240 3 283 7 407 16 103 429 18 375 24 441 17 105 60 409 33 446 32 362 44 242 291 94 519 14 294 169 59 573 19 605 10 319 171 52 485 30 536 38 221 63 642 6 542 40 620 39 722 21 147 129 232 53 614 31 104 306 91 739 20 814 29 370 65 ...
result:
ok OK, answer exists, pans = jans = 1
Subtask #9:
score: 20
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
100%
Accepted
Dependency #7:
100%
Accepted
Dependency #8:
100%
Accepted
Test #129:
score: 20
Accepted
time: 14ms
memory: 5204kb
input:
200000 0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 10000...
output:
0
result:
ok OK, answer exists, pans = jans = 0
Test #130:
score: 0
Accepted
time: 19ms
memory: 5824kb
input:
200000 39998 669810484 669810484 669810484 669810484 49585045 669810484 49585045 669810484 669810484 669810484 49585045 669810484 49585045 669810484 669810484 49585045 669810484 669810484 49585045 669810484 669810484 669810484 49585045 49585045 669810484 669810484 49585045 669810484 669810484 669810...
output:
-1
result:
ok OK, no solution
Test #131:
score: 0
Accepted
time: 18ms
memory: 12440kb
input:
200000 146248 418288544 418288544 418288544 418288544 418288544 418288544 418288544 418288544 418288544 418288544 335629260 418288544 418288544 418288544 418288544 418288544 418288544 418288544 418288544 418288544 418288544 418288544 418288544 418288544 418288544 418288544 335629260 418288544 418288...
output:
1 146246 1 80001 2 80002 3 80005 4 80008 5 80009 6 80010 7 80011 8 80013 9 80015 10 80017 12 80018 13 80019 14 80021 15 80023 16 80025 17 80026 18 80029 19 80033 20 80034 21 80035 22 80036 23 80039 24 80040 25 80041 26 80043 28 80044 29 80046 30 80047 31 80050 32 80051 33 80053 34 80054 35 80055 37 ...
result:
ok OK, answer exists, pans = jans = 1
Test #132:
score: 0
Accepted
time: 76ms
memory: 14808kb
input:
200000 200000 1669 335919197 14416 992295708 600956250 748292729 34526 845105590 356854358 207513877 580032971 77792 566318890 539138273 179145160 96966 557400688 957498013 300082825 867572496 102800641 4800971 586656202 621370101 619350378 861815015 146451 645208985 836531389 157671 164075 97538308...
output:
16073 23929 199750 70320 92777 22858 161943 79202 1992 2461 2607 47316 2742 2871 57906 2948 192618 3099 27026 192466 165895 3460 35066 184304 13353 3669 49443 41038 3952 60402 4063 74495 139730 178623 74629 198394 94418 4800 4803 118372 52392 189297 4928 75805 5026 5044 39241 187846 5209 159667 5338...
result:
ok OK, answer exists, pans = jans = 16073
Test #133:
score: 0
Accepted
time: 75ms
memory: 13972kb
input:
200000 199950 403157156 970867640 883668862 710532149 599369030 772615980 540288068 632861821 735600637 892455380 521864684 688265382 918311157 292189662 225058081 721895419 897469362 419749525 637333457 811165760 294395529 816935938 167107968 14558705 160100225 596184710 814035285 343666957 9815241...
output:
52 50 199115 199972 199908 199963 199922 195397 199779 199957 199884 199951 199984 199896 199749 199784 199914 199728 199855 199975 199829 199912 199987 199967 199623 199923 199653 199935 199629 199860 199936 199943 199835 199111 199918 199991 199993 199976 197907 199965 199989 199942 199973 199995 ...
result:
ok OK, answer exists, pans = jans = 52
Test #134:
score: 0
Accepted
time: 71ms
memory: 16904kb
input:
200000 199000 933681371 120960928 358991519 98660894 390922955 282815623 569329457 32632012 861940505 819766798 784230194 217874594 161016805 560299988 134545306 481931053 191022685 735652080 518771941 690545269 899572828 295935966 479212027 444255222 651922684 889043649 263110517 607521027 87406001...
output:
1 199000 1 186849 95137 96317 88736 110794 21383 3576 7703 163382 18225 76167 49088 169361 162920 72446 155939 118262 181186 137653 4971 150661 135146 42178 84370 84579 164213 10159 167701 5804 173005 49221 31783 93309 88356 26287 87715 29256 179751 63124 198937 191926 48823 181998 88934 59751 46739...
result:
ok OK, answer exists, pans = jans = 1
Test #135:
score: 0
Accepted
time: 52ms
memory: 8328kb
input:
200000 198999 701889248 25967262 760887547 56642962 27707686 618460234 335806426 756738255 594711931 527675595 740966314 978944005 973297725 668754361 814684047 760490557 456853064 927108678 723428123 175746040 733926390 457627567 395978082 172580570 910928733 989271645 854157429 851119671 325227242...
output:
-1
result:
ok OK, no solution
Test #136:
score: 0
Accepted
time: 80ms
memory: 11636kb
input:
200000 200000 195774097 715338233 526691196 617269630 516449963 738477488 659200495 543925246 83998600 415447933 607541007 65623172 70563702 795539225 557749752 828089434 194226646 765036906 574746759 169740782 129909916 239033675 817037528 932190328 819746394 889365547 787422728 381057459 438556866...
output:
100000 2 1 39018 2 2 143114 2 3 105231 2 4 123355 2 5 103194 2 6 147756 2 7 131868 2 8 108627 2 9 16847 2 10 82863 2 11 121458 2 12 13103 2 13 14076 2 14 159140 2 15 111429 2 16 165648 2 17 38699 2 18 153023 2 19 114872 2 20 33889 2 21 26001 2 22 47652 2 23 163364 2 24 186475 ...
result:
ok OK, answer exists, pans = jans = 100000
Test #137:
score: 0
Accepted
time: 77ms
memory: 12296kb
input:
200000 200000 970753994 187567902 118987121 188667202 702100951 945803301 159475686 835711341 730196498 260188496 691607208 43650142 570900797 201773308 372479631 177460208 91778075 453719941 844473366 58937550 32488913 174928955 500820451 85988742 705983216 210529301 12009632 878230271 55796133 915...
output:
2 3 200000 199988 199995 199997 3 23788 9846 42787 123460 738 59447 10108 37283 6475 22002 28512 33628 52332 85635 35263 31035 36137 32615 21726 9475 33698 25556 16584 18108 68309 67379 109153 38603 35617 55067 4400 26999 70218 180159 34431 182962 37199 14873 32031 27047 52882 140283 34011 14295 87...
result:
ok OK, answer exists, pans = jans = 2
Test #138:
score: 0
Accepted
time: 42ms
memory: 10700kb
input:
200000 200000 673363164 673363164 707313276 707313276 374875544 673363164 673363164 707313276 374875544 374875544 374875544 707313276 673363164 673363164 673363164 707313276 673363164 673363164 673363164 707313276 707313276 707313276 673363164 673363164 673363164 673363164 673363164 673363164 673363...
output:
3 66666 1 123848 2 130165 6 130425 7 101142 13 120158 14 129351 15 110208 17 108727 18 129807 19 103289 23 107160 24 124700 25 105272 26 103202 27 121336 28 122889 29 102936 31 122113 32 103169 34 120226 36 132977 37 108192 41 112292 42 125684 44 128148 50 133559 51 101300 60 125761 61 100382 63 103...
result:
ok OK, answer exists, pans = jans = 3
Test #139:
score: 0
Accepted
time: 69ms
memory: 11532kb
input:
200000 200000 714872913 654502510 87872538 805606050 258984811 16069178 831245083 938166374 946370058 441076278 270514255 741437192 879267792 39107712 795435198 657074943 252399176 131890058 961420716 511509248 14276272 321079992 58612814 422236835 354277514 564429487 905340590 21576501 287273805 91...
output:
2 99999 2 131038 174936 16679 43380 20296 73095 6898 33478 60966 1412 57213 53652 19696 24233 23747 20488 18123 77203 14806 15549 10149 3223 142271 12844 11208 108745 44719 1251 30979 48947 91187 2411 41962 24848 24209 26449 3253 55782 30664 16922 48105 7843 22501 16352 149821 1014 28790 43129 48522...
result:
ok OK, answer exists, pans = jans = 2
Test #140:
score: 0
Accepted
time: 51ms
memory: 12136kb
input:
200000 200000 205979750 900522426 927109572 450383099 345594524 950313250 291783275 410191517 681310917 38984006 727328297 18676089 354445094 72259574 906879101 2725928 636823401 18676089 596416961 601314194 295689977 658311815 18676089 18676089 18676089 18676089 18676089 18676089 821681852 96680835...
output:
2 99999 1 80818 99620 80588 186553 59641 153472 90116 78057 115404 167525 158263 82027 76237 836 66043 109404 61001 79189 94578 61341 1766 102049 92732 1037 111506 102728 78890 126343 118868 90285 54942 93670 120002 98349 107328 70360 67504 121009 74082 137653 119189 167254 69383 61237 91901 126822 ...
result:
ok OK, answer exists, pans = jans = 2
Test #141:
score: 0
Accepted
time: 62ms
memory: 12448kb
input:
200000 200000 616183072 524192834 33674938 566977347 84628727 92139789 551031252 624114927 406074439 183001165 240080633 264010495 958325698 47385748 628695217 778138236 693641777 457677901 160872485 347561342 723502231 381564161 737924126 631811263 795604661 811445991 377243426 973792541 264388272 ...
output:
3 3 199993 200000 199963 169876 3 7142 32710 3954 27241 1008 31309 41818 42159 24297 18460 61635 24211 172 23199 22202 11534 11955 921 7040 3325 10376 8566 20003 22026 12635 21781 4853 20602 9748 10602 13914 11861 2223 9147 11966 40563 661 4463 1419 26889 12715 18517 22973 5860 30298 11616 476 7135...
result:
ok OK, answer exists, pans = jans = 3
Test #142:
score: 0
Accepted
time: 83ms
memory: 11388kb
input:
200000 200000 822070971 974226008 242994591 556634370 298098543 419250531 160659071 868126137 824126791 874835358 703169220 808888526 999573674 996451235 410078665 697207185 408752368 816610732 268763815 563123919 50533988 763087682 568970514 94157683 295325151 636866270 592090122 651977943 50039153...
output:
2 4 199993 200000 199984 199998 199996 1 164594 199204 156409 67498 29992 67623 52025 23548 56441 50955 179086 6372 47611 40337 129409 24711 37227 9752 13446 53664 74984 109396 108720 88183 69617 121680 94935 44549 41031 24716 172910 9138 6494 1196 88595 130554 15587 3949 19495 28461 13149 38411 20...
result:
ok OK, answer exists, pans = jans = 2
Test #143:
score: 0
Accepted
time: 70ms
memory: 11116kb
input:
200000 200000 224151331 533132410 616442576 768115198 521773315 778831077 465586252 774370290 73471631 54571283 996259978 18407287 110643512 578379222 701311989 348208705 57092292 326751203 186051152 789123022 546055087 919174381 730208664 173628895 330085949 843199240 26650706 799013184 817909652 4...
output:
4 3 199998 199970 199996 97580 1 41587 14735 19759 46654 8514 23751 6146 23497 16589 42666 83739 10024 6635 13054 33064 22942 102345 70446 40173 22873 74565 42027 29388 44129 44998 34933 39773 15170 18053 17180 20431 28805 42647 24902 31648 11090 46888 29355 31553 26715 2160 63865 5451 1850 26482 1...
result:
ok OK, answer exists, pans = jans = 4
Test #144:
score: 0
Accepted
time: 41ms
memory: 10576kb
input:
200000 200000 737859726 415741610 415741610 848330823 848330823 848330823 848330823 415741610 415741610 790484054 790484054 790484054 848330823 737859726 790484054 737859726 737859726 737859726 737859726 848330823 848330823 790484054 790484054 848330823 848330823 737859726 737859726 737859726 415741...
output:
2 5 199982 197102 199996 199998 200000 199995 1 119171 14 101675 16 102151 17 107888 18 119139 19 101025 26 103386 27 119096 28 99820 31 110386 32 106070 34 108791 35 103246 47 119843 48 121857 49 107634 53 117064 54 120472 55 99281 57 116239 58 114255 66 120902 67 100711 70 107785 71 100266 72 106...
result:
ok OK, answer exists, pans = jans = 2
Test #145:
score: 0
Accepted
time: 54ms
memory: 10164kb
input:
200000 200000 242995467 242995467 242995467 662284868 662284868 88850577 662284868 662284868 799310826 662284868 889331207 848754264 88850577 726475571 88850577 708810046 391279161 391279161 391279161 391279161 810636987 538546034 655684697 655684697 278957427 655684697 278957427 538546034 655684697...
output:
2 2000 179131 168771 140335 182320 57858 177882 171702 172470 174796 187858 177300 121389 170784 191451 178500 178582 188901 121247 140175 84352 128244 157328 169326 188514 170174 179483 188310 171279 192410 15491 133354 175211 188173 190169 168502 179142 125097 132920 194173 17447 104013 119363 172...
result:
ok OK, answer exists, pans = jans = 2
Test #146:
score: 0
Accepted
time: 35ms
memory: 13616kb
input:
200000 200000 2839432 3565613 4288691 5520091 6663067 6743571 7022525 7530145 7811432 9570990 10574753 10592451 11091807 11460061 11573746 15969036 16290550 18814628 19561794 21858619 23612495 25459004 25503872 26663526 26860177 27329474 29073956 29177352 30604153 30879064 31082698 32319557 33641024...
output:
1 198000 53 95353 54 95368 55 95403 56 95440 57 95449 58 95450 59 95480 60 95516 61 95536 62 95548 63 95567 64 95580 65 95603 66 95606 67 95616 68 95684 69 95686 70 95717 71 95723 72 95742 73 95764 74 95814 75 95832 76 95835 77 95856 78 95907 79 95924 80 95957 81 95968 82 95992 83 96015 84 96043 85 ...
result:
ok OK, answer exists, pans = jans = 1
Test #147:
score: 0
Accepted
time: 48ms
memory: 8572kb
input:
200000 198000 635183777 635183777 247127149 247127149 247127149 247127149 635183777 247127149 635183777 247127149 247127149 247127149 247127149 635183777 247127149 635183777 247127149 247127149 635183777 247127149 635183777 635183777 635183777 247127149 247127149 247127149 635183777 247127149 635183...
output:
2000 118 3 48542 4 48543 5 48544 6 48545 8 48546 10 48547 11 48548 12 48549 13 48550 15 48551 17 48552 18 48553 20 48554 24 48555 25 48556 26 48557 28 48558 31 48559 32 48560 35 48561 37 48562 39 48563 41 48564 42 48565 45 48566 46 48567 47 48568 48 48569 50 48570 51 48571 52 48572 53 48573 54 48574...
result:
ok OK, answer exists, pans = jans = 2000
Test #148:
score: 0
Accepted
time: 48ms
memory: 8576kb
input:
200000 198001 46967278 950649273 404331695 557477604 192709403 976267040 46967278 46967278 404331695 557477604 557477604 192709403 192709403 135982561 544901495 544901495 84241844 544901495 151299679 195958522 84241844 135982561 544901495 151299679 84241844 73747767 135982561 544901495 195958522 842...
output:
2000 85 1 9959 7 9960 5 38915 4 110560 10 110563 12 38910 134207 8 9961 188863 13 38921 188865 2 190035 3 79792 38913 9958 190039 11 110559 38918 9962 110557 9964 110561 9965 110562 38912 110564 38920 110568 9963 190036 9966 190041 6 194735 9 79788 110566 38916 79790 110569 38914 190037 79794 110571...
result:
ok OK, answer exists, pans = jans = 2000
Test #149:
score: 0
Accepted
time: 39ms
memory: 5928kb
input:
200000 197999 508355950 510015335 756069990 508355950 219813 510015335 732488756 732488756 732488756 732488756 732488756 732488756 732488756 732488756 732488756 732488756 732488756 732488756 732488756 732488756 732488756 732488756 562981757 372308 309767158 931936016 668518342 725199431 81019034 409...
output:
-1
result:
ok OK, no solution
Test #150:
score: 0
Accepted
time: 33ms
memory: 7276kb
input:
100000 199900 560162419 991214677 691500094 964852927 964852927 964852927 964852927 816165712 373772852 832603713 13506770 86234148 832603713 650625936 373772852 178752 181587 992609524 169874165 867352511 510321796 635610571 917762772 917762772 917762772 917762772 917762772 917762772 917762772 9177...
output:
2 4000 71326 79072 93326 65088 79603 92843 91732 97674 75313 79981 99273 99845 72906 96757 41710 88010 74643 82032 62461 53720 74433 4307 80188 88701 95456 90684 87386 78671 81413 73941 98018 94577 97080 84783 97862 99504 72388 79022 42270 91771 76766 92686 96061 82665 99413 98756 75498 93410 6885 7...
result:
ok OK, answer exists, pans = jans = 2
Test #151:
score: 0
Accepted
time: 70ms
memory: 10396kb
input:
180000 180239 635490489 540776226 86859942 921038725 392464497 255839026 895853436 743273586 444091432 265634079 691551208 866402967 866402967 866402967 294128498 578727421 253391975 490570847 779368513 779368513 47383519 710598882 826726703 616898368 553409351 659687362 793250045 191654448 95519814...
output:
59763 239 97340 177175 126754 1220 131868 155578 92147 30571 4768 5349 70005 70535 129300 2096 2331 2355 2375 99659 2575 10517 137726 2822 73628 2992 159365 163405 3122 3142 161137 3470 3536 106326 74168 3734 3737 3765 3811 3824 3865 139727 150786 3966 3994 4046 4064 85857 4195 4228 100744 44232 513...
result:
ok OK, answer exists, pans = jans = 59763
Test #152:
score: 0
Accepted
time: 67ms
memory: 12136kb
input:
200000 200000 22993 355263421 697849331 546003948 691283464 376899319 851712838 734188955 34648 219005468 620446028 733850287 320206498 231517908 901497067 901497067 979248043 314680881 349183651 108463 123032 123032 345650831 366862484 366862484 901742577 138336 98299445 359949655 846322030 3517990...
output:
30002 20000 58831 987 20963 1121 1288 1335 1530 180637 27584 18928 86145 80301 173323 70834 50934 54776 2913 3111 111832 54652 34484 3368 186620 3627 105275 57548 87375 3987 110536 13054 48184 146239 58555 4691 121116 105323 190140 141662 66012 5030 136788 47213 78223 143242 136199 5420 5427 117188 ...
result:
ok OK, answer exists, pans = jans = 30002
Test #153:
score: 0
Accepted
time: 44ms
memory: 10204kb
input:
200000 200000 144351459 999791877 363529181 904915526 472579601 640000647 33054972 229202098 400739707 533839516 247977468 980802709 625582854 346793279 667166668 100652754 118226993 929599210 234899919 467543595 837277107 265988270 980802709 837277107 929599210 133930557 429866412 234899919 2317467...
output:
2 50 197289 193798 199997 197020 198094 184579 192098 199978 197021 197290 198091 199995 197294 194740 199999 194744 194743 196306 164384 192097 194738 183668 194486 193802 197288 191760 199980 196302 194468 200000 177468 192110 194489 191069 196667 199990 198437 199994 196298 192545 192108 185310 1...
result:
ok OK, answer exists, pans = jans = 2
Test #154:
score: 0
Accepted
time: 61ms
memory: 9876kb
input:
200000 200000 336782308 798076653 738999708 442717359 51935125 917878901 474870638 157897919 668048851 13917224 742300241 315969171 832017248 180032926 214350136 525512727 733271054 311719876 603953467 621574468 354318366 309910791 691584702 506469613 787004837 259641722 221011305 490018273 71853538...
output:
3 49 174321 199766 199776 200000 197213 194256 199486 199093 195626 196330 195901 199693 193681 184404 198676 199905 196928 199031 199940 199072 199319 196830 198573 199855 199362 199868 194687 189462 192785 197974 199380 198318 199647 198593 199033 199307 199941 199885 189813 199965 162676 187330 1...
result:
ok OK, answer exists, pans = jans = 3
Test #155:
score: 0
Accepted
time: 47ms
memory: 10028kb
input:
200000 200000 153896307 153896307 153896307 153896307 153896307 153896307 153896307 153896307 153896307 153896307 269937309 269937309 269937309 269937309 269937309 269937309 269937309 269937309 269937309 269937309 269937309 269937309 269937309 269937309 432718324 564270138 846042083 45207985 7121969...
output:
4 48 195462 118380 193946 196791 192758 199790 191109 195997 199987 199942 199035 198875 199451 187799 189846 199799 195081 198065 196869 199487 199750 199272 193006 199697 199895 100332 199381 199271 197350 159397 199929 200000 198054 198862 199827 195913 189068 197289 199971 195948 160685 199438 1...
result:
ok OK, answer exists, pans = jans = 4
Test #156:
score: 0
Accepted
time: 55ms
memory: 10580kb
input:
200000 200000 134733140 7431105 528521861 854239254 702986671 607007584 986693270 646421627 646421627 85093217 85093217 274450482 583046840 867583582 646421627 364425403 594601455 330674898 851462462 838050291 646421627 358097258 274209505 938653774 500532820 736086406 689381614 479859084 754112069 ...
output:
5 47 199969 199320 199922 199918 195893 199706 200000 197644 191905 199989 176495 199980 191189 198520 157296 187681 196646 198184 196562 192869 188419 182837 185839 199984 199152 194617 193933 198371 162647 199870 196280 199423 197572 193427 157985 148890 199994 193303 198924 196192 175003 196044 1...
result:
ok OK, answer exists, pans = jans = 5
Test #157:
score: 0
Accepted
time: 47ms
memory: 13352kb
input:
200000 200000 813967662 335549812 922674608 922674608 922674608 922674608 922674608 922674608 922674608 531176142 531176142 531176142 531176142 531176142 531176142 531176142 531176142 531176142 994541668 994541668 994541668 994541668 870008780 870008780 555840820 555840820 555840820 606557244 690428...
output:
2 500 188670 135418 176712 177559 188823 188741 188711 176770 188704 175049 189221 177567 150619 188702 175934 163381 188312 188686 163703 138385 189151 177182 150567 187825 176182 174325 188328 199702 187776 176129 187693 138579 199835 176541 163719 188851 176709 189022 175665 177282 199542 174928 ...
result:
ok OK, answer exists, pans = jans = 2
Test #158:
score: 0
Accepted
time: 36ms
memory: 13280kb
input:
200000 200000 672092018 612108660 622168717 18338545 755076926 474654027 192455922 621780221 934331844 693081079 997132558 535120236 221213643 694826055 317948421 788430737 458979804 390630407 849982681 538967352 591715909 102858128 375186353 706098369 535120236 210419977 863273352 16866847 31794842...
output:
3 499 197627 196347 197790 191498 192607 6220 189244 197716 199778 199795 199898 199921 196416 199799 189493 199901 196103 184017 198787 198867 197550 193818 199753 176202 197728 199983 198751 197677 199717 194747 181584 193776 198736 198856 197626 199972 197737 182823 199928 185280 199975 199978 13...
result:
ok OK, answer exists, pans = jans = 3
Test #159:
score: 0
Accepted
time: 46ms
memory: 13288kb
input:
200000 200000 721203757 326892389 164518998 406264651 320187500 623386456 798011827 860681530 18556934 525339498 354539033 458969046 164518998 460304692 555323507 826112277 113887913 85404180 158488968 541480667 143605007 450326179 944557998 206832265 349445784 2670104 617200939 591032373 98110085 7...
output:
2 500 196166 196974 192649 192302 199995 199668 199885 190460 192296 190906 198670 185129 191717 191451 176901 197990 184441 199669 193100 198916 195579 197172 199583 192279 193548 180225 195287 158573 192550 194643 198920 196389 195170 196745 195953 194563 199887 197906 197169 190013 199076 196735 ...
result:
ok OK, answer exists, pans = jans = 2
Test #160:
score: 0
Accepted
time: 54ms
memory: 13476kb
input:
200000 200000 906290493 755915792 496067029 447013681 992883163 535143325 535143325 535143325 535143325 535143325 275948319 728885563 535143325 535143325 535143325 535143325 535143325 535143325 535143325 535143325 535143325 535143325 535143325 535143325 535143325 535143325 535143325 535143325 256272...
output:
3 499 175848 194640 198495 199170 198526 199686 192112 198013 199703 194435 196180 195236 198598 199996 159440 198975 194575 197839 195166 196966 194404 199765 197942 193420 197222 193942 180973 198536 199905 198518 198169 197935 197474 191664 199579 192148 199730 195938 199161 199031 47570 173025 1...
result:
ok OK, answer exists, pans = jans = 3
Test #161:
score: 0
Accepted
time: 48ms
memory: 14284kb
input:
200000 200000 569316528 569316528 569316528 569316528 188778549 536594768 532628105 220800341 466949833 243611442 186381618 109723451 785482820 7165628 598896376 201722560 54155919 269144775 27307432 320173323 480953599 951684612 177955379 636976190 364509542 427692988 928663821 360226937 980541530 ...
output:
2 500 197843 198463 198112 199783 196984 198556 198987 199205 176845 194414 196135 165560 195423 199802 199832 197410 197682 171796 175586 199412 196647 192948 198871 197311 196515 191090 198971 194496 199811 56523 195893 193367 196835 198764 198437 191378 199128 198045 199689 191478 199742 193432 1...
result:
ok OK, answer exists, pans = jans = 2
Test #162:
score: 0
Accepted
time: 58ms
memory: 11628kb
input:
200000 200000 771455301 122019265 768401870 291305469 291305469 672850592 958352057 836525765 10257678 522579878 136661 925648170 745263942 307784523 737401686 603942955 681321280 254577 443100213 712023859 639652946 780107946 573204972 293464 545393386 405193 888956657 778948386 469406 547739906 56...
output:
2 10000 127742 198664 161935 195923 188641 128432 42973 195990 154928 148084 193246 4529 184454 135037 175833 190437 5323 143030 141917 180196 167443 149808 194972 124137 121566 188778 143100 169243 192248 126858 6719 191802 6943 158510 36041 199852 196118 198056 110314 170313 22353 191407 176673 13...
result:
ok OK, answer exists, pans = jans = 2
Test #163:
score: 0
Accepted
time: 56ms
memory: 11052kb
input:
200000 200000 557472292 878537199 76822031 479742848 84890200 313652217 966402259 145184494 754061382 425139619 412545081 679485868 850627363 182188441 91838 90296771 160244629 947930102 938538267 251628221 301117421 31144298 881793046 39176346 951742333 128348525 752198018 941454076 815482857 59811...
output:
1002 4000 70098 111812 199608 187569 197459 188892 177254 138563 84729 167341 199951 154249 152602 132673 196401 191478 145947 190812 196105 146204 157576 90049 176145 166986 181616 198399 156536 104521 164624 152791 199282 197776 199151 199770 134751 172608 182673 155793 176011 170634 110349 166332...
result:
ok OK, answer exists, pans = jans = 1002
Test #164:
score: 0
Accepted
time: 71ms
memory: 12124kb
input:
200000 200000 286129563 147784014 124955057 905617182 661704301 154179729 201708637 94839869 693202321 328316784 806312690 248137750 37828653 618799377 737015416 264691981 198584331 633273714 680807383 105325575 173732149 691479073 858487180 188444 435342042 250546534 239875017 90147019 949068561 15...
output:
2 1000 199961 199918 177999 174342 191365 146672 199805 199750 199976 199940 186776 146256 199321 199833 138072 199799 199003 197116 199832 105485 199793 199907 187240 199975 126844 199823 182766 193757 138483 189262 199730 199446 170581 191065 181112 199418 199721 165485 198258 193528 199781 176208...
result:
ok OK, answer exists, pans = jans = 2
Test #165:
score: 0
Accepted
time: 73ms
memory: 11372kb
input:
200000 200000 953874019 887781059 987406678 837760808 802554157 527837321 180082425 952145241 468169836 14900046 353729481 887282193 855402973 386472368 280007416 952566443 501943764 335735062 740549443 12153783 376816083 871559010 762617067 258666634 16047144 783509341 664549868 118011850 901948430...
output:
9763 239 196974 192626 34179 199238 197715 187432 129662 162923 163578 154594 125647 197275 170198 180186 96707 149903 145780 183787 152193 195173 139368 158824 169090 193537 197903 99680 165107 199534 198537 184455 197805 177154 192895 199994 181356 178538 194173 73209 7756 189350 65516 161132 4860...
result:
ok OK, answer exists, pans = jans = 9763
Test #166:
score: 0
Accepted
time: 50ms
memory: 7412kb
input:
200000 189999 370738334 944556307 774188996 279210144 142440354 629135772 28937 225698405 597170915 622537551 787205199 703460980 997628525 674452087 754817215 146235817 461754871 805307795 290457885 905447169 535223665 511778710 800278463 164670600 370765680 520868033 652624013 809071072 455827642 ...
output:
-1
result:
ok OK, no solution
Test #167:
score: 0
Accepted
time: 68ms
memory: 14788kb
input:
200000 190000 907599816 917874087 930191854 498889686 898049386 474775341 543505738 326630863 672070914 282609179 155207888 534352086 534511369 606224686 861663633 962280892 533074855 833142719 11392941 876312426 86568 593826256 792888677 361172432 920481631 351872797 438117005 815625647 698925742 7...
output:
1 190000 1 181904 120497 55502 139563 15955 131365 151888 123970 32214 97652 86190 13430 13989 138441 132980 28726 73775 162447 6343 192252 49560 48110 31471 23252 15071 87447 11606 41779 26555 95000 66466 21355 66775 41605 18137 67304 12900 56588 1928 62440 15643 160303 19779 95026 12935 2802 16923...
result:
ok OK, answer exists, pans = jans = 1
Test #168:
score: 0
Accepted
time: 23ms
memory: 6572kb
input:
200000 0 504 17456 24790 36985 38752 39625 40448 40727 45562 47954 51066 58092 62142 63594 65504 66940 69506 88473 98961 99354 101155 103043 104981 105380 135499 144803 145704 168436 170442 180037 188283 194839 196964 203155 204003 206671 208102 210350 221209 222930 227880 229298 231639 239466 24197...
output:
-1
result:
ok OK, no solution
Test #169:
score: 0
Accepted
time: 60ms
memory: 13764kb
input:
200000 200000 846258126 198487980 47865693 652575554 250286109 161158 179595901 315924148 155231697 43123676 353324969 232746490 46489873 559653689 406343771 286017631 56560549 174131 567204077 48854923 723144403 174131 718525243 40537795 125159942 828837956 931871180 526194124 550500047 281063562 7...
output:
1 190000 3 9636 448 22358 6400 10156 6029 22931 8611 12791 44182 24873 2576 7771 25229 32112 112364 1323 28017 75219 41178 5021 47313 18160 2514 54975 4209 17930 8778 6320 18545 19914 2850 11806 24229 13599 13299 4458 493 24484 21968 28651 1938 2594 27556 22596 19940 46060 3089 2420 22474 3245 9684 ...
result:
ok OK, answer exists, pans = jans = 1
Test #170:
score: 0
Accepted
time: 54ms
memory: 13676kb
input:
200000 190000 26869 77986 571618666 571618666 571618666 129439 199191 571618666 571618666 571618666 571618666 571618666 571618666 248178 253473 571618666 571618666 571618666 571618666 571618666 571618666 571618666 571618666 571618666 571618666 571618666 571618666 571618666 571618666 571618666 571618...
output:
1 190000 3 123642 4 124286 5 62626 8 81996 9 90374 10 114228 11 124547 12 145629 13 63343 16 67052 17 68234 18 71937 19 85076 20 112200 21 127463 22 150426 23 66666 24 78777 25 92476 26 107170 27 151887 28 93865 29 98003 30 114359 31 134735 32 134803 33 62520 35 87486 36 97614 37 107662 38 143028 39...
result:
ok OK, answer exists, pans = jans = 1
Test #171:
score: 0
Accepted
time: 48ms
memory: 11000kb
input:
200000 100000 37415 29993549 37415 37415 37415 37415 102985063 37415 90880304 37415 140461294 379828779 667386043 197232652 37415 37415 132822159 342306 238437512 681412943 366150470 342306 334182750 914142821 498233158 91027542 827384964 928403180 342306 996719811 993439901 80408885 342306 47489973...
output:
1 100000 9 19248 23139 531 38244 10193 125455 2261 16806 8881 10652 38441 11945 1270 57424 12773 2749 12285 9749 16827 10965 5141 46958 19952 43753 56542 42003 3976 25588 9212 17090 33622 61523 24661 14878 18440 25153 2726 8782 10522 45509 5220 20943 7677 12215 5130 1564 21846 44246 26543 27634 3057...
result:
ok OK, answer exists, pans = jans = 1
Test #172:
score: 0
Accepted
time: 69ms
memory: 13600kb
input:
200000 200000 669972406 96100638 815142583 440643953 875674808 299019510 826309916 17949983 999146006 679356395 219214107 123520179 930944649 116669050 413839591 310598704 24660443 995197649 136210846 619890072 60543028 809938592 46170441 530167875 371176655 944294658 590223664 171375 171375 1656213...
output:
10002 20000 100402 134445 939 120306 199999 142356 180774 90763 150971 32185 189236 164897 156202 110676 173279 136765 111453 135771 175333 191161 3572 121187 199133 119864 4056 184848 104282 192436 139017 66489 176770 173968 181572 197837 140030 172573 184310 16566 198522 88429 98048 131643 5213 14...
result:
ok OK, answer exists, pans = jans = 10002
Test #173:
score: 0
Accepted
time: 45ms
memory: 7204kb
input:
200000 199999 924460167 605110448 304797961 923147788 721148613 732840720 487913813 574917045 178402386 600838252 565114399 578355654 291589135 51268256 405931895 812449561 416123806 435947010 435947010 311898730 420861134 615282131 647107441 604488514 156475051 849212137 796648905 709494166 9316310...
output:
-1
result:
ok OK, no solution
Test #174:
score: 0
Accepted
time: 79ms
memory: 11076kb
input:
200000 199999 273231797 181164733 729238254 445904352 156595678 363621984 39326807 552883104 837895726 847963520 516583926 912841400 153126637 295444358 854469628 336079188 924610264 264647708 879902838 388421728 306787852 234498539 792117888 963206166 808868480 633773728 918645800 793376861 6364879...
output:
39993 9 102022 159044 187997 1899 44800 139561 178157 134368 156398 2 1 54499 5 2 36215 120088 94143 67998 4 3 145693 158160 24333 5 4 89088 186233 172971 133431 3 5 31404 106703 5 6 72734 69801 68983 3029 4 7 7861 46379 122522 2 8 110607 5 9 167514 95185 166391 175980 4 10 169431 42356 16...
result:
ok OK, answer exists, pans = jans = 39993
Test #175:
score: 0
Accepted
time: 57ms
memory: 11908kb
input:
200000 200000 737762705 306907445 49543 720678148 106888478 64062 478025196 220454400 176369775 105735 198668731 121318 93284497 121318 121318 742667931 126857 126857 126857 191491945 372237865 147879 728397049 153539 403033414 812884115 746207429 160045 160045 161474 161474 212032246 176783 5620645...
output:
2 20000 183962 166396 181790 187074 192330 139689 149366 109845 111435 3328 168909 165095 124494 187542 187826 172930 176786 102549 191980 141793 188443 5158 5252 5274 168246 162631 190516 161119 194695 122251 5974 132528 6170 146746 6301 175528 155405 139177 100022 123136 111173 7062 15445 117028 1...
result:
ok OK, answer exists, pans = jans = 2
Extra Test:
score: 0
Extra Test Passed