QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#190524 | #6735. Tree | ucup-team004 | AC ✓ | 1734ms | 75180kb | C++20 | 5.6kb | 2023-09-29 02:21:29 | 2023-09-29 02:21:29 |
Judging History
answer
#include <bits/stdc++.h>
using i64 = long long;
constexpr i64 inf = 1E18;
struct Info {
i64 ans = 0;
i64 len = -inf;
i64 vl = -inf;
i64 vr = -inf;
};
constexpr int N = 1 << 19;
Info info[N];
Info operator+(const Info &a, const Info &b) {
if (a.vl < 0) {
return b;
}
if (b.vl < 0) {
return a;
}
Info c;
c.ans = std::max({a.ans, b.ans, a.vr + b.vl});
c.len = std::max(-inf, a.len + b.len);
c.vl = std::max(a.vl, a.len + b.vl);
c.vr = std::max(b.vr, a.vr + b.len);
return c;
}
Info query(int p, int l, int r, int x, int y) {
if (l >= y || r <= x) {
return {};
}
if (l >= x && r <= y) {
return info[p];
}
int m = (l + r) / 2;
return query(2 * p, l, m, x, y) + query(2 * p + 1, m, r, x, y);
}
void pull(int p) {
info[p] = info[2 * p] + info[2 * p + 1];
}
void modify(int p, int l, int r, int x, const Info &v) {
if (r - l == 1) {
info[p] = v;
return;
}
int m = (l + r) / 2;
if (x < m) {
modify(2 * p, l, m, x, v);
} else {
modify(2 * p + 1, m, r, x, v);
}
pull(p);
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int n, q;
std::cin >> n >> q;
std::vector<int> a(n);
for (int i = 0; i < n; i++) {
std::cin >> a[i];
}
std::vector<int> p(n);
p[0] = -1;
for (int i = 1; i < n; i++) {
std::cin >> p[i];
p[i]--;
}
std::vector<int> c(n);
for (int i = 1; i < n; i++) {
std::cin >> c[i];
}
std::vector<int> w(n);
for (int i = 1; i < n; i++) {
std::cin >> w[i];
}
std::vector<int> dep(n), siz(n), in(n), top(n), bot(n);
std::vector<std::vector<int>> adj(n);
for (int i = 1; i < n; i++) {
adj[p[i]].push_back(i);
}
auto dfs1 = [&](auto self, int x) -> void {
siz[x] = 1;
for (auto &y : adj[x]) {
dep[y] = dep[x] + 1;
self(self, y);
siz[x] += siz[y];
if (siz[y] > siz[adj[x][0]]) {
std::swap(y, adj[x][0]);
}
}
};
dfs1(dfs1, 0);
std::vector<std::multiset<std::pair<std::pair<int, int>, i64>>> chain(n);
std::vector<std::multiset<std::pair<int, i64>>> val(n);
auto get = [&](int x = 0) {
return query(1, 0, n, in[x], in[bot[x]] + 1);
};
auto getmax = [&](const auto &s, const auto &v, int cnt = 1) {
i64 ans = 0;
auto it = s.upper_bound({v, inf});
while (cnt-- && it != s.begin()) {
it--;
if (it->first == v) {
ans += it->second;
}
}
return ans;
};
auto add = [&](int x, int a, int c, i64 v) {
i64 res = getmax(chain[x], std::make_pair(a, c), 2);
val[x].extract({a, res});
chain[x].emplace(std::make_pair(a, c), v);
res = getmax(chain[x], std::make_pair(a, c), 2);
if (res) {
val[x].emplace(a, res);
}
};
auto del = [&](int x, int a, int c, i64 v) {
i64 res = getmax(chain[x], std::make_pair(a, c), 2);
val[x].extract({a, res});
chain[x].extract({std::make_pair(a, c), v});
res = getmax(chain[x], std::make_pair(a, c), 2);
if (res) {
val[x].emplace(a, res);
}
};
auto insert = [&](int x) {
if (!x) {
return;
}
int y = p[x];
auto res = get(x);
add(y, a[x], c[x], res.vl);
if (res.ans) {
val[y].emplace(-1, res.ans);
}
};
auto erase = [&](int x) {
if (!x) {
return;
}
int y = p[x];
auto res = get(x);
del(y, a[x], c[x], res.vl);
if (res.ans) {
val[y].extract({-1, res.ans});
}
};
auto update = [&](int x) {
Info v;
v.ans = std::max(getmax(val[x], a[x]), getmax(val[x], -1));
if (!adj[x].empty()) {
int y = adj[x][0];
if (a[x] == a[y]) {
v.vr = getmax(chain[x], std::make_pair(a[y], c[y]));
}
if (a[y] == a[x] && c[y] == c[x]) {
v.len = w[x];
}
}
v.vl = w[x] + getmax(chain[x], std::make_pair(a[x], c[x]));
modify(1, 0, n, in[x], v);
};
int cur = 0;
auto dfs2 = [&](auto self, int x) -> void {
in[x] = cur++;
for (auto y : adj[x]) {
top[y] = y == adj[x][0] ? top[x] : y;
self(self, y);
if (y != adj[x][0]) {
insert(y);
}
}
bot[x] = adj[x].empty() ? x : bot[adj[x][0]];
update(x);
};
dfs2(dfs2, 0);
auto change = [&](int x, int y) {
for (int i = x; i != -1; i = p[top[i]]) {
erase(top[i]);
}
a[x] = y;
if (top[x] != x) {
update(p[x]);
}
if (!adj[x].empty()) {
update(adj[x][0]);
}
for (int i = x; i != -1; i = p[top[i]]) {
update(i);
insert(top[i]);
}
};
auto answer = [&]() {
std::cout << get().ans << "\n";
};
answer();
while (q--) {
int x, y;
std::cin >> x >> y;
x--;
change(x, y);
answer();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3600kb
input:
5 5 5 4 3 4 5 1 2 3 1 2 2 2 2 4 9 2 6 2 5 4 5 5 4 3 5 2 1
output:
6 10 10 4 15 2
result:
ok 6 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
13 21 1 2 1 2 4 4 2 1 4 2 3 6 1 1 1 2 3 2 6 7 8 9 10 8 8 2 13 1 1 1 2 2 1 2 1 2 1 472868230 94771637 209247951 483753517 822923242 938504499 413445582 328056598 487969741 355938152 902390974 28610378 2 4 7 4 10 1 8 4 2 3 5 2 11 4 9 3 6 2 6 1 4 1 6 1 2 3 8 2 5 2 6 2 8 4 8 2 1 4 11 4 12 2
output:
209247951 822923242 938504499 938504499 1351950081 1351950081 1351950081 1351950081 1351950081 413445582 413445582 413445582 413445582 413445582 94771637 94771637 94771637 413445582 94771637 0 0 902390974
result:
ok 22 numbers
Test #3:
score: 0
Accepted
time: 1281ms
memory: 72612kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 199...
result:
ok 200000 numbers
Test #4:
score: 0
Accepted
time: 862ms
memory: 64316kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 199...
result:
ok 199999 numbers
Test #5:
score: 0
Accepted
time: 1291ms
memory: 72600kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 199...
result:
ok 200000 numbers
Test #6:
score: 0
Accepted
time: 852ms
memory: 63568kb
input:
199999 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 199...
result:
ok 200001 numbers
Test #7:
score: 0
Accepted
time: 1107ms
memory: 68288kb
input:
199999 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 199...
result:
ok 200001 numbers
Test #8:
score: 0
Accepted
time: 894ms
memory: 64132kb
input:
200000 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 199...
result:
ok 199999 numbers
Test #9:
score: 0
Accepted
time: 895ms
memory: 64216kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 199...
result:
ok 200000 numbers
Test #10:
score: 0
Accepted
time: 1212ms
memory: 68904kb
input:
199998 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 199...
result:
ok 200001 numbers
Test #11:
score: 0
Accepted
time: 878ms
memory: 64672kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 199...
result:
ok 199999 numbers
Test #12:
score: 0
Accepted
time: 1310ms
memory: 71804kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 199...
result:
ok 199999 numbers
Test #13:
score: 0
Accepted
time: 1279ms
memory: 64716kb
input:
200000 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 ...
result:
ok 200001 numbers
Test #14:
score: 0
Accepted
time: 1272ms
memory: 64756kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 ...
result:
ok 199999 numbers
Test #15:
score: 0
Accepted
time: 1252ms
memory: 64548kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 ...
result:
ok 200000 numbers
Test #16:
score: 0
Accepted
time: 1319ms
memory: 64580kb
input:
200000 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 ...
result:
ok 199999 numbers
Test #17:
score: 0
Accepted
time: 1287ms
memory: 64624kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 ...
result:
ok 199999 numbers
Test #18:
score: 0
Accepted
time: 1286ms
memory: 64640kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 973...
result:
ok 199999 numbers
Test #19:
score: 0
Accepted
time: 1305ms
memory: 64568kb
input:
199998 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 ...
result:
ok 200001 numbers
Test #20:
score: 0
Accepted
time: 1277ms
memory: 64688kb
input:
200000 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 ...
result:
ok 199999 numbers
Test #21:
score: 0
Accepted
time: 1266ms
memory: 64520kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 ...
result:
ok 199999 numbers
Test #22:
score: 0
Accepted
time: 1253ms
memory: 64592kb
input:
199999 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 ...
result:
ok 200001 numbers
Test #23:
score: 0
Accepted
time: 597ms
memory: 67264kb
input:
199998 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 560467...
result:
ok 200001 numbers
Test #24:
score: 0
Accepted
time: 641ms
memory: 67288kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
8730169189068 8730169189068 8730169189068 8730169189068 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6498003008733 6498003008733 649800...
result:
ok 199999 numbers
Test #25:
score: 0
Accepted
time: 621ms
memory: 67120kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
16964972670721 16390048684544 16390048684544 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 7849037632647 7849037632647 7849037632647 784...
result:
ok 200000 numbers
Test #26:
score: 0
Accepted
time: 610ms
memory: 67028kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10119248263503 10119248263503 10119248263503 10119248263503 10119248263503 8542130343519 8542130343519 8542130343519 8542130343519 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6...
result:
ok 200000 numbers
Test #27:
score: 0
Accepted
time: 614ms
memory: 67204kb
input:
199998 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
16872130560892 16872130560892 16872130560892 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 ...
result:
ok 200001 numbers
Test #28:
score: 0
Accepted
time: 643ms
memory: 67028kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
8838414514239 8838414514239 8838414514239 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 6995924779246 6995924779246 6995924779246 6995924779246 699592...
result:
ok 200000 numbers
Test #29:
score: 0
Accepted
time: 654ms
memory: 67128kb
input:
200000 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
7701141318718 7701141318718 7701141318718 7701141318718 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 441887...
result:
ok 199999 numbers
Test #30:
score: 0
Accepted
time: 640ms
memory: 67296kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
17022193248209 17022193248209 17022193248209 17022193248209 17022193248209 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 6123864764662 6123864764662 6123864764662 6123864764662 6123864764662 61238...
result:
ok 200000 numbers
Test #31:
score: 0
Accepted
time: 631ms
memory: 67044kb
input:
199999 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 11083692627808 11083692627808 11083692627808 11083692627808 11083692627808 ...
result:
ok 200001 numbers
Test #32:
score: 0
Accepted
time: 628ms
memory: 67204kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
8839751622015 8839751622015 8839751622015 8839751622015 8839751622015 8839751622015 8839751622015 8127355953055 8127355953055 8127355953055 8127355953055 8127355953055 8127355953055 8127355953055 8127355953055 8127355953055 6876528315124 6876528315124 6876528315124 6876528315124 6876528315124 687652...
result:
ok 199999 numbers
Test #33:
score: 0
Accepted
time: 282ms
memory: 75152kb
input:
200000 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 972...
result:
ok 200001 numbers
Test #34:
score: 0
Accepted
time: 279ms
memory: 75180kb
input:
199998 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 ...
result:
ok 200000 numbers
Test #35:
score: 0
Accepted
time: 274ms
memory: 75028kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 475...
result:
ok 199999 numbers
Test #36:
score: 0
Accepted
time: 274ms
memory: 75108kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 ...
result:
ok 200000 numbers
Test #37:
score: 0
Accepted
time: 268ms
memory: 75176kb
input:
199999 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 ...
result:
ok 200001 numbers
Test #38:
score: 0
Accepted
time: 1597ms
memory: 68524kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 ...
result:
ok 200000 numbers
Test #39:
score: 0
Accepted
time: 1614ms
memory: 69048kb
input:
200000 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 ...
result:
ok 200001 numbers
Test #40:
score: 0
Accepted
time: 1607ms
memory: 68992kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 ...
result:
ok 199999 numbers
Test #41:
score: 0
Accepted
time: 1640ms
memory: 68792kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 ...
result:
ok 200000 numbers
Test #42:
score: 0
Accepted
time: 1629ms
memory: 69172kb
input:
200000 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 ...
result:
ok 199999 numbers
Test #43:
score: 0
Accepted
time: 1598ms
memory: 68592kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 ...
result:
ok 200000 numbers
Test #44:
score: 0
Accepted
time: 1705ms
memory: 71744kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 589...
result:
ok 200000 numbers
Test #45:
score: 0
Accepted
time: 1730ms
memory: 72036kb
input:
200000 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 458...
result:
ok 200001 numbers
Test #46:
score: 0
Accepted
time: 1705ms
memory: 71900kb
input:
200000 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 582...
result:
ok 200001 numbers
Test #47:
score: 0
Accepted
time: 1712ms
memory: 70928kb
input:
199998 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 ...
result:
ok 200000 numbers
Test #48:
score: 0
Accepted
time: 1714ms
memory: 70448kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 ...
result:
ok 200000 numbers
Test #49:
score: 0
Accepted
time: 1734ms
memory: 71820kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 695...
result:
ok 199999 numbers
Test #50:
score: 0
Accepted
time: 1706ms
memory: 71040kb
input:
199998 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 ...
result:
ok 200001 numbers
Test #51:
score: 0
Accepted
time: 1725ms
memory: 71512kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 889...
result:
ok 199999 numbers
Test #52:
score: 0
Accepted
time: 1617ms
memory: 69196kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 ...
result:
ok 199999 numbers
Test #53:
score: 0
Accepted
time: 1301ms
memory: 65832kb
input:
200000 199998 49441 37885 24128 648 776 55 32583 34146 15473 59281 3478 8998 15132 88193 8815 94360 22342 8413 19377 16187 38814 15720 33706 48309 1393 4424 10729 4675 4420 33459 15552 29757 32030 4361 16053 18663 22470 13941 7275 2255 8 47975 18888 38456 23806 80532 2893 1446 3890 34427 68534 32984...
output:
669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 ...
result:
ok 199999 numbers
Test #54:
score: 0
Accepted
time: 1306ms
memory: 65976kb
input:
199999 199999 40518 8211 65911 33288 105868 65619 149729 113811 189467 173883 29621 110825 179103 93030 187332 14245 190242 111183 145983 140740 140034 61807 7766 78468 143624 135365 60429 62403 69629 35943 74390 120590 170604 115104 195260 45050 138351 67444 16049 79825 114806 27255 139603 49410 16...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 200000 numbers
Test #55:
score: 0
Accepted
time: 576ms
memory: 66196kb
input:
199998 200000 229 32 1283 61 797 225 5 1812 209 48 79 1 13 754 9 15 21 15 377 330 4 212 66 40 1899 20 3 1707 789 744 7 1812 355 6 85 285 1 4 664 442 2589 90 29 1574 855 83 26 160 601 973 3 136 100 51 989 7667 1361 790 21 13 72 3 263 1354 3749 32 248 64 9 11 2932 54 125 18 11 1480 12 540 11 195 239 2...
output:
999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 ...
result:
ok 200001 numbers
Test #56:
score: 0
Accepted
time: 571ms
memory: 66252kb
input:
199999 199999 139 512 1541 6 409 3761 9 2 1607 38 1 17 64 245 1458 1 261 19 4 123 1276 870 97 1 206 142 31 6 312 4 41 92 21 376 40 2 10 946 26 16 96 4 405 1 3 21 1489 104 91 53 10 14 233 2062 3255 15 1 1939 483 81 8 6 100 283 676 30 864 58 117 19 12 84 98 11 162 1334 28 1 3 397 14 196 192 5332 23 8 ...
output:
999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 ...
result:
ok 200000 numbers
Test #57:
score: 0
Accepted
time: 591ms
memory: 67384kb
input:
200000 199998 1 2 1 1 1 2 4 1 1 2 1 1 1 1 2 4 2 1 1 3 3 1 3 1 1 2 2 1 1 1 2 1 2 2 1 1 1 1 4 3 1 3 3 3 2 1 3 2 1 1 1 4 1 2 1 2 4 2 1 1 3 2 2 1 1 1 1 1 2 2 1 1 1 2 1 4 2 1 2 1 4 1 1 3 3 3 1 4 1 3 1 2 2 1 3 1 3 1 3 2 1 2 2 2 1 1 3 1 1 2 1 3 1 1 2 2 1 4 2 2 1 1 2 1 2 2 1 3 3 3 1 3 2 1 1 1 1 3 2 1 1 3 1 ...
output:
4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 486...
result:
ok 199999 numbers
Test #58:
score: 0
Accepted
time: 1664ms
memory: 66896kb
input:
200000 199998 1 1 1 1 3 2 1 1 1 1 2 2 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 2 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 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 2 2 2 1 1 1 1 1 3 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 ...
output:
12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 ...
result:
ok 199999 numbers
Test #59:
score: 0
Accepted
time: 1679ms
memory: 70228kb
input:
199999 199999 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 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:
11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 ...
result:
ok 200000 numbers
Test #60:
score: 0
Accepted
time: 1570ms
memory: 67496kb
input:
200000 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 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 1 ...
output:
14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 ...
result:
ok 200001 numbers