QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#625756 | #508. Nice sequence | maspy | 100 ✓ | 86ms | 20728kb | C++20 | 15.7kb | 2024-10-09 20:51:30 | 2024-10-09 20:51:30 |
Judging History
answer
#line 1 "/home/maspy/compro/library/my_template.hpp"
#if defined(LOCAL)
#include <my_template_compiled.hpp>
#else
// https://codeforces.com/blog/entry/96344
#pragma GCC optimize("Ofast,unroll-loops")
// いまの CF だとこれ入れると動かない?
// #pragma GCC target("avx2,popcnt")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using u8 = uint8_t;
using u16 = uint16_t;
using u32 = uint32_t;
using u64 = uint64_t;
using i128 = __int128;
using u128 = unsigned __int128;
using f128 = __float128;
template <class T>
constexpr T infty = 0;
template <>
constexpr int infty<int> = 1'010'000'000;
template <>
constexpr ll infty<ll> = 2'020'000'000'000'000'000;
template <>
constexpr u32 infty<u32> = infty<int>;
template <>
constexpr u64 infty<u64> = infty<ll>;
template <>
constexpr i128 infty<i128> = i128(infty<ll>) * 2'000'000'000'000'000'000;
template <>
constexpr double infty<double> = infty<ll>;
template <>
constexpr long double infty<long double> = infty<ll>;
using pi = pair<ll, ll>;
using vi = vector<ll>;
template <class T>
using vc = vector<T>;
template <class T>
using vvc = vector<vc<T>>;
template <class T>
using vvvc = vector<vvc<T>>;
template <class T>
using vvvvc = vector<vvvc<T>>;
template <class T>
using vvvvvc = vector<vvvvc<T>>;
template <class T>
using pq = priority_queue<T>;
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;
#define vv(type, name, h, ...) vector<vector<type>> name(h, vector<type>(__VA_ARGS__))
#define vvv(type, name, h, w, ...) vector<vector<vector<type>>> name(h, vector<vector<type>>(w, vector<type>(__VA_ARGS__)))
#define vvvv(type, name, a, b, c, ...) \
vector<vector<vector<vector<type>>>> name(a, vector<vector<vector<type>>>(b, vector<vector<type>>(c, vector<type>(__VA_ARGS__))))
// https://trap.jp/post/1224/
#define FOR1(a) for (ll _ = 0; _ < ll(a); ++_)
#define FOR2(i, a) for (ll i = 0; i < ll(a); ++i)
#define FOR3(i, a, b) for (ll i = a; i < ll(b); ++i)
#define FOR4(i, a, b, c) for (ll i = a; i < ll(b); i += (c))
#define FOR1_R(a) for (ll i = (a)-1; i >= ll(0); --i)
#define FOR2_R(i, a) for (ll i = (a)-1; i >= ll(0); --i)
#define FOR3_R(i, a, b) for (ll i = (b)-1; i >= ll(a); --i)
#define overload4(a, b, c, d, e, ...) e
#define overload3(a, b, c, d, ...) d
#define FOR(...) overload4(__VA_ARGS__, FOR4, FOR3, FOR2, FOR1)(__VA_ARGS__)
#define FOR_R(...) overload3(__VA_ARGS__, FOR3_R, FOR2_R, FOR1_R)(__VA_ARGS__)
#define FOR_subset(t, s) for (ll t = (s); t >= 0; t = (t == 0 ? -1 : (t - 1) & (s)))
#define all(x) x.begin(), x.end()
#define len(x) ll(x.size())
#define elif else if
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define stoi stoll
int popcnt(int x) { return __builtin_popcount(x); }
int popcnt(u32 x) { return __builtin_popcount(x); }
int popcnt(ll x) { return __builtin_popcountll(x); }
int popcnt(u64 x) { return __builtin_popcountll(x); }
int popcnt_mod_2(int x) { return __builtin_parity(x); }
int popcnt_mod_2(u32 x) { return __builtin_parity(x); }
int popcnt_mod_2(ll x) { return __builtin_parityll(x); }
int popcnt_mod_2(u64 x) { return __builtin_parityll(x); }
// (0, 1, 2, 3, 4) -> (-1, 0, 1, 1, 2)
int topbit(int x) { return (x == 0 ? -1 : 31 - __builtin_clz(x)); }
int topbit(u32 x) { return (x == 0 ? -1 : 31 - __builtin_clz(x)); }
int topbit(ll x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
int topbit(u64 x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
// (0, 1, 2, 3, 4) -> (-1, 0, 1, 0, 2)
int lowbit(int x) { return (x == 0 ? -1 : __builtin_ctz(x)); }
int lowbit(u32 x) { return (x == 0 ? -1 : __builtin_ctz(x)); }
int lowbit(ll x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }
int lowbit(u64 x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }
template <typename T>
T floor(T a, T b) {
return a / b - (a % b && (a ^ b) < 0);
}
template <typename T>
T ceil(T x, T y) {
return floor(x + y - 1, y);
}
template <typename T>
T bmod(T x, T y) {
return x - y * floor(x, y);
}
template <typename T>
pair<T, T> divmod(T x, T y) {
T q = floor(x, y);
return {q, x - q * y};
}
template <typename T, typename U>
T SUM(const vector<U> &A) {
T sm = 0;
for (auto &&a: A) sm += a;
return sm;
}
#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define LB(c, x) distance((c).begin(), lower_bound(all(c), (x)))
#define UB(c, x) distance((c).begin(), upper_bound(all(c), (x)))
#define UNIQUE(x) sort(all(x)), x.erase(unique(all(x)), x.end()), x.shrink_to_fit()
template <typename T>
T POP(deque<T> &que) {
T a = que.front();
que.pop_front();
return a;
}
template <typename T>
T POP(pq<T> &que) {
T a = que.top();
que.pop();
return a;
}
template <typename T>
T POP(pqg<T> &que) {
T a = que.top();
que.pop();
return a;
}
template <typename T>
T POP(vc<T> &que) {
T a = que.back();
que.pop_back();
return a;
}
template <typename F>
ll binary_search(F check, ll ok, ll ng, bool check_ok = true) {
if (check_ok) assert(check(ok));
while (abs(ok - ng) > 1) {
auto x = (ng + ok) / 2;
(check(x) ? ok : ng) = x;
}
return ok;
}
template <typename F>
double binary_search_real(F check, double ok, double ng, int iter = 100) {
FOR(iter) {
double x = (ok + ng) / 2;
(check(x) ? ok : ng) = x;
}
return (ok + ng) / 2;
}
template <class T, class S>
inline bool chmax(T &a, const S &b) {
return (a < b ? a = b, 1 : 0);
}
template <class T, class S>
inline bool chmin(T &a, const S &b) {
return (a > b ? a = b, 1 : 0);
}
// ? は -1
vc<int> s_to_vi(const string &S, char first_char) {
vc<int> A(S.size());
FOR(i, S.size()) { A[i] = (S[i] != '?' ? S[i] - first_char : -1); }
return A;
}
template <typename T, typename U>
vector<T> cumsum(vector<U> &A, int off = 1) {
int N = A.size();
vector<T> B(N + 1);
FOR(i, N) { B[i + 1] = B[i] + A[i]; }
if (off == 0) B.erase(B.begin());
return B;
}
// stable sort
template <typename T>
vector<int> argsort(const vector<T> &A) {
vector<int> ids(len(A));
iota(all(ids), 0);
sort(all(ids), [&](int i, int j) { return (A[i] == A[j] ? i < j : A[i] < A[j]); });
return ids;
}
// A[I[0]], A[I[1]], ...
template <typename T>
vc<T> rearrange(const vc<T> &A, const vc<int> &I) {
vc<T> B(len(I));
FOR(i, len(I)) B[i] = A[I[i]];
return B;
}
template <typename T, typename... Vectors>
void concat(vc<T> &first, const Vectors &... others) {
vc<T> &res = first;
(res.insert(res.end(), others.begin(), others.end()), ...);
}
#endif
#line 1 "/home/maspy/compro/library/other/io.hpp"
#define FASTIO
#include <unistd.h>
// https://judge.yosupo.jp/submission/21623
namespace fastio {
static constexpr uint32_t SZ = 1 << 17;
char ibuf[SZ];
char obuf[SZ];
char out[100];
// pointer of ibuf, obuf
uint32_t pil = 0, pir = 0, por = 0;
struct Pre {
char num[10000][4];
constexpr Pre() : num() {
for (int i = 0; i < 10000; i++) {
int n = i;
for (int j = 3; j >= 0; j--) {
num[i][j] = n % 10 | '0';
n /= 10;
}
}
}
} constexpr pre;
inline void load() {
memcpy(ibuf, ibuf + pil, pir - pil);
pir = pir - pil + fread(ibuf + pir - pil, 1, SZ - pir + pil, stdin);
pil = 0;
if (pir < SZ) ibuf[pir++] = '\n';
}
inline void flush() {
fwrite(obuf, 1, por, stdout);
por = 0;
}
void rd(char &c) {
do {
if (pil + 1 > pir) load();
c = ibuf[pil++];
} while (isspace(c));
}
void rd(string &x) {
x.clear();
char c;
do {
if (pil + 1 > pir) load();
c = ibuf[pil++];
} while (isspace(c));
do {
x += c;
if (pil == pir) load();
c = ibuf[pil++];
} while (!isspace(c));
}
template <typename T>
void rd_real(T &x) {
string s;
rd(s);
x = stod(s);
}
template <typename T>
void rd_integer(T &x) {
if (pil + 100 > pir) load();
char c;
do
c = ibuf[pil++];
while (c < '-');
bool minus = 0;
if constexpr (is_signed<T>::value || is_same_v<T, i128>) {
if (c == '-') { minus = 1, c = ibuf[pil++]; }
}
x = 0;
while ('0' <= c) { x = x * 10 + (c & 15), c = ibuf[pil++]; }
if constexpr (is_signed<T>::value || is_same_v<T, i128>) {
if (minus) x = -x;
}
}
void rd(int &x) { rd_integer(x); }
void rd(ll &x) { rd_integer(x); }
void rd(i128 &x) { rd_integer(x); }
void rd(u32 &x) { rd_integer(x); }
void rd(u64 &x) { rd_integer(x); }
void rd(u128 &x) { rd_integer(x); }
void rd(double &x) { rd_real(x); }
void rd(long double &x) { rd_real(x); }
void rd(f128 &x) { rd_real(x); }
template <class T, class U>
void rd(pair<T, U> &p) {
return rd(p.first), rd(p.second);
}
template <size_t N = 0, typename T>
void rd_tuple(T &t) {
if constexpr (N < std::tuple_size<T>::value) {
auto &x = std::get<N>(t);
rd(x);
rd_tuple<N + 1>(t);
}
}
template <class... T>
void rd(tuple<T...> &tpl) {
rd_tuple(tpl);
}
template <size_t N = 0, typename T>
void rd(array<T, N> &x) {
for (auto &d: x) rd(d);
}
template <class T>
void rd(vc<T> &x) {
for (auto &d: x) rd(d);
}
void read() {}
template <class H, class... T>
void read(H &h, T &... t) {
rd(h), read(t...);
}
void wt(const char c) {
if (por == SZ) flush();
obuf[por++] = c;
}
void wt(const string s) {
for (char c: s) wt(c);
}
void wt(const char *s) {
size_t len = strlen(s);
for (size_t i = 0; i < len; i++) wt(s[i]);
}
template <typename T>
void wt_integer(T x) {
if (por > SZ - 100) flush();
if (x < 0) { obuf[por++] = '-', x = -x; }
int outi;
for (outi = 96; x >= 10000; outi -= 4) {
memcpy(out + outi, pre.num[x % 10000], 4);
x /= 10000;
}
if (x >= 1000) {
memcpy(obuf + por, pre.num[x], 4);
por += 4;
} else if (x >= 100) {
memcpy(obuf + por, pre.num[x] + 1, 3);
por += 3;
} else if (x >= 10) {
int q = (x * 103) >> 10;
obuf[por] = q | '0';
obuf[por + 1] = (x - q * 10) | '0';
por += 2;
} else
obuf[por++] = x | '0';
memcpy(obuf + por, out + outi + 4, 96 - outi);
por += 96 - outi;
}
template <typename T>
void wt_real(T x) {
ostringstream oss;
oss << fixed << setprecision(15) << double(x);
string s = oss.str();
wt(s);
}
void wt(int x) { wt_integer(x); }
void wt(ll x) { wt_integer(x); }
void wt(i128 x) { wt_integer(x); }
void wt(u32 x) { wt_integer(x); }
void wt(u64 x) { wt_integer(x); }
void wt(u128 x) { wt_integer(x); }
void wt(double x) { wt_real(x); }
void wt(long double x) { wt_real(x); }
void wt(f128 x) { wt_real(x); }
template <class T, class U>
void wt(const pair<T, U> val) {
wt(val.first);
wt(' ');
wt(val.second);
}
template <size_t N = 0, typename T>
void wt_tuple(const T t) {
if constexpr (N < std::tuple_size<T>::value) {
if constexpr (N > 0) { wt(' '); }
const auto x = std::get<N>(t);
wt(x);
wt_tuple<N + 1>(t);
}
}
template <class... T>
void wt(tuple<T...> tpl) {
wt_tuple(tpl);
}
template <class T, size_t S>
void wt(const array<T, S> val) {
auto n = val.size();
for (size_t i = 0; i < n; i++) {
if (i) wt(' ');
wt(val[i]);
}
}
template <class T>
void wt(const vector<T> val) {
auto n = val.size();
for (size_t i = 0; i < n; i++) {
if (i) wt(' ');
wt(val[i]);
}
}
void print() { wt('\n'); }
template <class Head, class... Tail>
void print(Head &&head, Tail &&... tail) {
wt(head);
if (sizeof...(Tail)) wt(' ');
print(forward<Tail>(tail)...);
}
// gcc expansion. called automaticall after main.
void __attribute__((destructor)) _d() { flush(); }
} // namespace fastio
using fastio::read;
using fastio::print;
using fastio::flush;
#if defined(LOCAL)
#define SHOW(...) SHOW_IMPL(__VA_ARGS__, SHOW6, SHOW5, SHOW4, SHOW3, SHOW2, SHOW1)(__VA_ARGS__)
#define SHOW_IMPL(_1, _2, _3, _4, _5, _6, NAME, ...) NAME
#define SHOW1(x) print(#x, "=", (x)), flush()
#define SHOW2(x, y) print(#x, "=", (x), #y, "=", (y)), flush()
#define SHOW3(x, y, z) print(#x, "=", (x), #y, "=", (y), #z, "=", (z)), flush()
#define SHOW4(x, y, z, w) print(#x, "=", (x), #y, "=", (y), #z, "=", (z), #w, "=", (w)), flush()
#define SHOW5(x, y, z, w, v) print(#x, "=", (x), #y, "=", (y), #z, "=", (z), #w, "=", (w), #v, "=", (v)), flush()
#define SHOW6(x, y, z, w, v, u) print(#x, "=", (x), #y, "=", (y), #z, "=", (z), #w, "=", (w), #v, "=", (v), #u, "=", (u)), flush()
#else
#define SHOW(...)
#endif
#define INT(...) \
int __VA_ARGS__; \
read(__VA_ARGS__)
#define LL(...) \
ll __VA_ARGS__; \
read(__VA_ARGS__)
#define U32(...) \
u32 __VA_ARGS__; \
read(__VA_ARGS__)
#define U64(...) \
u64 __VA_ARGS__; \
read(__VA_ARGS__)
#define STR(...) \
string __VA_ARGS__; \
read(__VA_ARGS__)
#define CHAR(...) \
char __VA_ARGS__; \
read(__VA_ARGS__)
#define DBL(...) \
double __VA_ARGS__; \
read(__VA_ARGS__)
#define VEC(type, name, size) \
vector<type> name(size); \
read(name)
#define VV(type, name, h, w) \
vector<vector<type>> name(h, vector<type>(w)); \
read(name)
void YES(bool t = 1) { print(t ? "YES" : "NO"); }
void NO(bool t = 1) { YES(!t); }
void Yes(bool t = 1) { print(t ? "Yes" : "No"); }
void No(bool t = 1) { Yes(!t); }
void yes(bool t = 1) { print(t ? "yes" : "no"); }
void no(bool t = 1) { yes(!t); }
#line 1 "/home/maspy/compro/library/ds/unionfind/potentialized_unionfind.hpp"
template <typename Group>
struct Potentialized_UnionFind {
using E = typename Group::value_type;
int N;
int n_comp;
vc<E> vals;
vc<int> par;
vc<int> size;
Potentialized_UnionFind(int N) : N(N), n_comp(N), vals(N, Group::unit()), size(N, 1) {
par.resize(N);
iota(all(par), 0);
}
// (root, P[root]^{-1}P[v])
pair<int, E> get(int v) {
E res = Group::unit();
while (v != par[v]) {
res = Group::op(vals[v], res);
res = Group::op(vals[par[v]], res);
vals[v] = Group::op(vals[par[v]], vals[v]);
v = par[v] = par[par[v]];
}
return {v, res};
}
pair<int, E> operator[](int v) { return get(v); }
// is_same / path value
pair<bool, E> get_path(int u, int v) {
auto [ru, xu] = get(u);
auto [rv, xv] = get(v);
if (ru != rv) return {false, Group::unit()};
return {true, Group::op(Group::inverse(xu), xv)};
}
// if same : do nothing.
// P[to]==P[frm]x
bool merge(int frm, int to, E x) {
auto [v1, x1] = get(frm);
auto [v2, x2] = get(to);
if (v1 == v2) return false; // same
if (size[v1] < size[v2]) {
swap(v1, v2);
swap(x1, x2);
x = Group::inverse(x);
}
x = Group::op(x1, x);
x = Group::op(x, Group::inverse(x2));
vals[v2] = x;
par[v2] = v1;
size[v1] += size[v2];
--n_comp;
return true;
}
};
#line 2 "/home/maspy/compro/library/alg/monoid/add.hpp"
template <typename E>
struct Monoid_Add {
using X = E;
using value_type = X;
static constexpr X op(const X &x, const X &y) noexcept { return x + y; }
static constexpr X inverse(const X &x) noexcept { return -x; }
static constexpr X power(const X &x, ll n) noexcept { return X(n) * x; }
static constexpr X unit() { return X(0); }
static constexpr bool commute = true;
};
#line 5 "main.cpp"
void solve() {
LL(N, M);
ll g = gcd(N, M);
ll n = N + M - g;
Potentialized_UnionFind<Monoid_Add<int>> uf(n);
FOR(i, n - N) uf.merge(i, i + N, -1);
FOR(i, n - M) uf.merge(i, i + M, +1);
vi add(n);
ll S = 0;
FOR(i, n) {
if (uf.get(i).fi != i) continue;
add[i] = S;
S += 2 * uf.size[i];
}
vi A(n);
FOR(i, n) A[i] = uf.get(i).se + add[uf.get(i).fi];
vi B(n - 1);
FOR(i, n - 1) B[i] = A[i + 1] - A[i];
print(len(B));
print(B);
}
signed main() {
INT(T);
FOR(T) solve();
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 6
Accepted
Test #1:
score: 6
Accepted
time: 0ms
memory: 3884kb
input:
3 3 1 2 3 1 1
output:
2 1 1 3 2 -3 2 0
result:
ok Ok
Test #2:
score: 6
Accepted
time: 0ms
memory: 3672kb
input:
10 1 1 1 2 1 3 1 4 1 5 6 1 7 1 8 1 9 1 100 1
output:
0 1 -1 2 -1 -1 3 -1 -1 -1 4 -1 -1 -1 -1 5 1 1 1 1 1 6 1 1 1 1 1 1 7 1 1 1 1 1 1 1 8 1 1 1 1 1 1 1 1 99 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
result:
ok Ok
Test #3:
score: 6
Accepted
time: 0ms
memory: 3696kb
input:
10 60 1 70 1 1 60 1 70 1 50 39 1 41 1 23 1 1 99 87 3
output:
59 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 69 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 59 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...
result:
ok Ok
Test #4:
score: 6
Accepted
time: 0ms
memory: 3916kb
input:
10 94 94 27 54 31 31 28 28 76 76 35 35 89 89 57 57 90 18 13 39
output:
93 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 53 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 -105 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4...
result:
ok Ok
Test #5:
score: 6
Accepted
time: 0ms
memory: 3696kb
input:
10 67 67 64 64 82 82 16 96 74 74 37 37 90 90 59 59 66 66 14 7
output:
66 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 63 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 81 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
result:
ok Ok
Test #6:
score: 6
Accepted
time: 0ms
memory: 3996kb
input:
10 49 98 15 90 14 56 54 18 67 67 50 100 90 90 85 85 94 94 65 65
output:
97 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 -193 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 89 12 12 12 12 12 12 12 12 12 12 12 12 12 12 -169 12 12 12 12 12 12 12 12 12 12 12 12 12 12 -169 12 ...
result:
ok Ok
Test #7:
score: 6
Accepted
time: 0ms
memory: 3912kb
input:
10 19 19 77 77 85 17 4 4 80 80 98 98 94 94 100 100 88 22 77 77
output:
18 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 76 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 84 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 -159 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 -1...
result:
ok Ok
Test #8:
score: 6
Accepted
time: 0ms
memory: 3728kb
input:
10 36 36 21 84 51 51 72 24 88 44 29 29 20 20 67 67 82 82 92 92
output:
35 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 83 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 -161 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 -161 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 -161 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 50 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #9:
score: 6
Accepted
time: 0ms
memory: 3676kb
input:
10 4 12 95 95 59 59 48 48 23 23 76 76 35 5 97 97 89 89 58 58
output:
11 6 6 6 -19 6 6 6 -19 6 6 6 94 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 58 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
result:
ok Ok
Test #10:
score: 6
Accepted
time: 0ms
memory: 3700kb
input:
10 74 74 71 71 95 95 90 15 35 35 88 88 58 58 49 98 84 84 67 67
output:
73 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 70 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 94 2 2 2...
result:
ok Ok
Test #11:
score: 6
Accepted
time: 0ms
memory: 3620kb
input:
10 78 78 59 59 40 40 49 49 74 37 2 56 77 77 33 33 93 93 11 11
output:
77 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 58 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 39 2 2 2 2 2 2 2 2 2 2 2...
result:
ok Ok
Test #12:
score: 6
Accepted
time: 0ms
memory: 3568kb
input:
10 52 52 20 100 95 95 91 91 41 82 50 50 89 89 78 78 80 80 44 22
output:
51 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 99 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 -191 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 -191 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 -191 10 10 ...
result:
ok Ok
Test #13:
score: 6
Accepted
time: 0ms
memory: 3684kb
input:
10 69 69 36 36 48 48 32 32 55 55 69 69 80 80 75 75 71 71 62 62
output:
68 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 35 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 47 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
result:
ok Ok
Subtask #2:
score: 9
Accepted
Test #14:
score: 9
Accepted
time: 0ms
memory: 3892kb
input:
10 2 2 3 2 4 2 5 2 2 6 2 7 2 8 9 2 10 2 2 11
output:
1 2 3 -2 3 -2 3 4 -3 4 5 -3 4 -3 4 -3 5 6 -7 6 -7 6 7 4 -5 4 -5 4 -5 4 7 8 -9 8 -9 8 -9 8 9 -5 6 -5 6 -5 6 -5 6 -5 9 10 -9 10 -9 10 -9 10 -9 10 11 6 -7 6 -7 6 -7 6 -7 6 -7 6
result:
ok Ok
Test #15:
score: 9
Accepted
time: 0ms
memory: 3728kb
input:
10 12 2 2 13 14 2 2 15 2 16 17 2 18 2 19 2 20 2 21 2
output:
11 12 -11 12 -11 12 -11 12 -11 12 -11 12 13 7 -8 7 -8 7 -8 7 -8 7 -8 7 -8 7 13 14 -13 14 -13 14 -13 14 -13 14 -13 14 -13 14 15 8 -9 8 -9 8 -9 8 -9 8 -9 8 -9 8 -9 8 15 16 -17 16 -17 16 -17 16 -17 16 -17 16 -17 16 -17 16 17 -9 10 -9 10 -9 10 -9 10 -9 10 -9 10 -9 10 -9 10 -9 17 18 -17 18 -17 18 -17 18 ...
result:
ok Ok
Test #16:
score: 9
Accepted
time: 0ms
memory: 3908kb
input:
10 2 22 2 23 2 24 2 25 26 2 2 27 28 2 2 29 30 2 31 2
output:
21 22 -23 22 -23 22 -23 22 -23 22 -23 22 -23 22 -23 22 -23 22 -23 22 -23 22 23 12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12 -13 12 23 24 -25 24 -25 24 -25 24 -25 24 -25 24 -25 24 -25 24 -25 24 -25 24 -25 24 -25 24 25 13 -14 13 -14 13 -14 13 -14 13 -14 13 -14 13 -14 13 -14...
result:
ok Ok
Test #17:
score: 9
Accepted
time: 0ms
memory: 3648kb
input:
10 32 2 2 33 34 2 35 2 2 36 2 37 2 38 39 2 40 2 41 2
output:
31 32 -31 32 -31 32 -31 32 -31 32 -31 32 -31 32 -31 32 -31 32 -31 32 -31 32 -31 32 -31 32 -31 32 -31 32 -31 32 33 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 -18 17 33 34 -33 34 -33 34 -33 34 -33 34 -33 34 -33 34 -33 34 -33 34 -33 34 -3...
result:
ok Ok
Test #18:
score: 9
Accepted
time: 0ms
memory: 3784kb
input:
10 2 42 43 2 2 44 45 2 46 2 2 47 48 2 2 49 50 2 2 51
output:
41 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 -43 42 43 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 23 -22 ...
result:
ok Ok
Test #19:
score: 9
Accepted
time: 1ms
memory: 3756kb
input:
10 2 1727 1728 2 1729 2 1730 2 1731 2 1732 2 2 1733 2 1734 2 1735 2 1736
output:
1727 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -865 864 -86...
result:
ok Ok
Test #20:
score: 9
Accepted
time: 0ms
memory: 4224kb
input:
10 2 8495 2 8496 2 8497 2 8498 8499 2 8500 2 2 8501 8502 2 8503 2 2 8504
output:
8495 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -4249 4248 -424...
result:
ok Ok
Test #21:
score: 9
Accepted
time: 1ms
memory: 4028kb
input:
10 2 3989 2 3990 2 3991 2 3992 2 3993 3994 2 3995 2 3996 2 2 3997 2 3998
output:
3989 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -1996 1995 -199...
result:
ok Ok
Test #22:
score: 9
Accepted
time: 3ms
memory: 4300kb
input:
10 9991 2 2 9992 2 9993 9994 2 9995 2 2 9996 2 9997 9998 2 9999 2 10000 2
output:
9991 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 4997 -4996 499...
result:
ok Ok
Test #23:
score: 9
Accepted
time: 2ms
memory: 4372kb
input:
10 2 5682 5683 2 5684 2 2 5685 2 5686 5687 2 2 5688 2 5689 2 5690 2 5691
output:
5681 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -5683 5682 -568...
result:
ok Ok
Subtask #3:
score: 14
Accepted
Test #24:
score: 14
Accepted
time: 0ms
memory: 3944kb
input:
10 7 1 1 5 1 1 10 1 1 4 3 1 1 6 1 2 1 9 8 1
output:
6 1 1 1 1 1 1 4 -1 -1 -1 -1 0 9 1 1 1 1 1 1 1 1 1 3 -1 -1 -1 2 1 1 5 -1 -1 -1 -1 -1 1 -1 8 -1 -1 -1 -1 -1 -1 -1 -1 7 1 1 1 1 1 1 1
result:
ok Ok
Test #25:
score: 14
Accepted
time: 0ms
memory: 3684kb
input:
10 6 2 2 4 2 2 2 5 3 2 7 2 2 10 2 1 2 8 2 9
output:
5 6 -5 6 -5 6 3 4 -5 4 1 2 5 3 -4 3 -4 3 3 -2 3 -2 7 -4 5 -4 5 -4 5 -4 9 10 -11 10 -11 10 -11 10 -11 10 1 1 7 8 -9 8 -9 8 -9 8 9 5 -6 5 -6 5 -6 5 -6 5
result:
ok Ok
Test #26:
score: 14
Accepted
time: 0ms
memory: 3672kb
input:
10 3 8 10 3 3 3 9 3 3 7 3 4 3 6 3 1 3 5 3 2
output:
9 -4 7 -4 -4 7 -4 -4 7 -4 11 -4 -4 9 -4 -4 9 -4 -4 9 -4 -4 2 2 2 8 6 6 -11 6 6 -11 6 6 8 3 3 -7 3 3 -7 3 3 5 2 2 -5 2 2 5 4 4 -9 4 4 2 1 1 6 -3 5 -3 -3 5 -3 3 -2 3 -2
result:
ok Ok
Test #27:
score: 14
Accepted
time: 0ms
memory: 3668kb
input:
10 1 4 8 4 9 4 7 4 4 6 2 4 4 4 4 3 4 10 5 4
output:
3 -1 -1 -1 7 4 4 4 -11 4 4 4 11 -3 -3 -3 10 -3 -3 -3 10 -3 -3 -3 9 3 3 -8 3 3 3 -8 3 3 7 8 -6 8 -11 8 -6 8 3 4 -5 4 3 2 2 2 5 -2 -2 5 -2 -2 11 12 -9 12 -16 12 -9 12 -16 12 -9 12 7 -2 -2 -2 7 -2 -2 -2
result:
ok Ok
Test #28:
score: 14
Accepted
time: 0ms
memory: 3928kb
input:
10 5 5 4 5 5 2 5 9 5 3 5 6 8 5 5 7 1 5 10 5
output:
4 2 2 2 2 7 2 2 2 -7 2 2 2 5 -3 4 -3 4 -3 12 -3 -3 -3 11 -3 -3 -3 -3 11 -3 -3 -3 6 3 -5 3 3 -5 3 9 2 2 2 2 -9 2 2 2 2 11 -5 8 -5 -5 8 -5 8 -5 -5 8 -5 10 -5 7 -5 7 -5 -5 7 -5 7 -5 4 -1 -1 -1 -1 9 4 4 4 4 -15 4 4 4 4
result:
ok Ok
Test #29:
score: 14
Accepted
time: 0ms
memory: 3596kb
input:
10 1 6 6 9 10 6 4 6 2 6 6 5 7 6 3 6 6 6 6 8
output:
5 -1 -1 -1 -1 -1 11 8 8 -14 8 8 -19 8 8 -14 8 8 13 14 -11 14 -19 14 -11 14 -11 14 -19 14 -11 14 7 8 -6 8 -11 8 -6 8 5 6 -7 6 -7 6 9 -2 -2 -2 -2 9 -2 -2 -2 -2 11 -2 -2 -2 -2 -2 11 -2 -2 -2 -2 -2 5 4 4 -9 4 4 5 2 2 2 2 2 11 12 -10 12 -10 12 -17 12 -10 12 -10 12
result:
ok Ok
Test #30:
score: 14
Accepted
time: 0ms
memory: 3892kb
input:
10 5 7 4 7 7 8 7 7 1 7 7 9 7 2 3 7 10 7 7 6
output:
10 -5 7 -5 7 -5 -5 7 -5 7 -5 9 -3 -3 8 -3 -3 -3 8 -3 -3 13 2 2 2 2 2 2 -13 2 2 2 2 2 2 6 2 2 2 2 2 2 6 -1 -1 -1 -1 -1 -1 14 -7 9 -7 9 -7 9 -7 -7 9 -7 9 -7 9 -7 7 -4 5 -4 5 -4 5 -4 8 3 3 -7 3 3 -7 3 3 15 5 5 -12 5 5 -12 5 5 5 -12 5 5 -12 5 5 11 -2 -2 -2 -2 -2 11 -2 -2 -2 -2 -2
result:
ok Ok
Test #31:
score: 14
Accepted
time: 0ms
memory: 3644kb
input:
10 8 2 8 8 8 10 8 6 4 8 1 8 8 9 3 8 8 5 8 7
output:
7 8 -7 8 -7 8 -7 8 7 2 2 2 2 2 2 2 15 16 -14 16 -14 16 -14 16 -23 16 -14 16 -14 16 -14 16 11 12 -14 12 -14 12 -7 12 -14 12 -14 12 7 4 4 4 -13 4 4 4 7 -1 -1 -1 -1 -1 -1 -1 15 2 2 2 2 2 2 2 -15 2 2 2 2 2 2 2 9 -4 7 -4 -4 7 -4 -4 7 -4 11 -5 8 -5 -5 8 -5 8 -5 -5 8 -5 13 -2 -2 -2 -2 -2 -2 13 -2 -2 -2 -2 ...
result:
ok Ok
Test #32:
score: 14
Accepted
time: 0ms
memory: 3660kb
input:
10 3 9 9 5 9 10 7 9 9 4 6 9 9 8 9 1 2 9 9 9
output:
8 6 6 -13 6 6 -13 6 6 12 3 3 3 -11 3 3 3 3 -11 3 3 3 17 2 2 2 2 2 2 2 2 -17 2 2 2 2 2 2 2 2 14 -7 9 -7 9 -7 9 -7 -7 9 -7 9 -7 9 -7 11 -3 -3 -3 10 -3 -3 -3 10 -3 -3 -3 11 8 8 -14 8 8 -19 8 8 -14 8 8 15 -2 -2 -2 -2 -2 -2 -2 15 -2 -2 -2 -2 -2 -2 -2 8 1 1 1 1 1 1 1 1 9 5 -6 5 -6 5 -6 5 -6 5 8 2 2 2 2 2 ...
result:
ok Ok
Test #33:
score: 14
Accepted
time: 0ms
memory: 3668kb
input:
10 4 10 10 6 10 10 8 10 10 1 3 10 10 2 10 5 9 10 7 10
output:
11 12 -9 12 -16 12 -9 12 -16 12 -9 12 13 14 -11 14 -19 14 -11 14 -11 14 -19 14 -11 14 9 2 2 2 2 2 2 2 2 2 15 16 -14 16 -14 16 -14 16 -23 16 -14 16 -14 16 -14 16 9 1 1 1 1 1 1 1 1 1 11 4 4 -9 4 4 -9 4 4 -9 4 4 9 10 -9 10 -9 10 -9 10 -9 10 9 4 4 4 4 -15 4 4 4 4 17 2 2 2 2 2 2 2 2 -17 2 2 2 2 2 2 2 2 1...
result:
ok Ok
Subtask #4:
score: 15
Accepted
Test #34:
score: 15
Accepted
time: 0ms
memory: 3860kb
input:
10 2 3 2 4 4 3 5 3 5 4 6 4 6 5 5 7 7 6 6 8
output:
3 2 -3 2 3 4 -5 4 5 -2 -2 5 -2 -2 6 3 -5 3 3 -5 3 7 -2 -2 -2 7 -2 -2 -2 7 8 -10 8 -5 8 -10 8 9 -2 -2 -2 -2 9 -2 -2 -2 -2 10 -5 7 -5 7 -5 -5 7 -5 7 -5 11 -2 -2 -2 -2 -2 11 -2 -2 -2 -2 -2 11 12 -10 12 -10 12 -17 12 -10 12 -10 12
result:
ok Ok
Test #35:
score: 15
Accepted
time: 0ms
memory: 3672kb
input:
10 8 7 7 9 8 9 8 10 10 9 11 9 11 10 10 12 12 11 13 11
output:
13 -2 -2 -2 -2 -2 -2 13 -2 -2 -2 -2 -2 -2 14 -7 9 -7 9 -7 9 -7 -7 9 -7 9 -7 9 -7 15 2 2 2 2 2 2 2 -15 2 2 2 2 2 2 2 15 16 -14 16 -14 16 -14 16 -23 16 -14 16 -14 16 -14 16 17 -2 -2 -2 -2 -2 -2 -2 -2 17 -2 -2 -2 -2 -2 -2 -2 -2 18 9 -11 9 -11 9 -11 9 -11 9 9 -11 9 -11 9 -11 9 -11 9 19 -2 -2 -2 -2 -2 -2...
result:
ok Ok
Test #36:
score: 15
Accepted
time: 0ms
memory: 3652kb
input:
10 13 12 14 12 14 13 15 13 15 14 14 16 15 16 17 15 17 16 16 18
output:
23 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 23 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 23 24 -26 24 -26 24 -26 24 -26 24 -26 24 -13 24 -26 24 -26 24 -26 24 -26 24 -26 24 25 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 25 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 26 13 -15 13 -15 13 -15 13 -15 13 -15 13 -15 13 13 -15 13 -15 13 -1...
result:
ok Ok
Test #37:
score: 15
Accepted
time: 0ms
memory: 3664kb
input:
10 18 17 17 19 18 19 18 20 20 19 21 19 21 20 20 22 21 22 21 23
output:
33 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 33 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 34 -17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17 -17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17 19 -17 35 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -35 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #38:
score: 15
Accepted
time: 0ms
memory: 3672kb
input:
10 23 22 22 24 23 24 25 23 24 25 26 24 26 25 25 27 27 26 26 28
output:
43 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 43 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 43 44 -42 44 -42 44 -42 44 -42 44 -42 44 -42 44 -42 44 -42 44 -42 44 -42 44 -65 44 -42 44 -42 44 -42 44 -42 44 -42 44 -42 44 -42 44 -42 44 -42 44 -42 44 45 2 2 2 2 2 2 ...
result:
ok Ok
Test #39:
score: 15
Accepted
time: 11ms
memory: 10480kb
input:
10 83402 83404 52908 52906 74520 74521 24222 24221 1082 1083 8982 8980 10142 10141 34908 34906 58179 58181 50841 50843
output:
166803 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -166802 166804 -...
result:
ok Ok
Test #40:
score: 15
Accepted
time: 13ms
memory: 11912kb
input:
10 20084 20083 10333 10331 98649 98648 72803 72804 40654 40655 1612 1614 26871 26873 5060 5062 60616 60615 6832 6830
output:
40165 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 ...
result:
ok Ok
Test #41:
score: 15
Accepted
time: 27ms
memory: 12460kb
input:
10 79524 79523 91096 91095 90747 90749 83462 83460 78387 78388 67918 67920 1682 1681 13180 13179 98702 98700 70766 70767
output:
159045 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2...
result:
ok Ok
Test #42:
score: 15
Accepted
time: 18ms
memory: 10504kb
input:
10 18052 18051 55715 55717 57933 57931 78574 78576 37241 37243 4851 4853 83373 83375 37863 37865 37892 37894 83822 83821
output:
36101 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 ...
result:
ok Ok
Test #43:
score: 15
Accepted
time: 18ms
memory: 8628kb
input:
10 2394 2392 24337 24339 55254 55256 46338 46339 11158 11159 20181 20182 59816 59818 15018 15020 39382 39381 33622 33623
output:
4783 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -4786 4784 -478...
result:
ok Ok
Test #44:
score: 15
Accepted
time: 20ms
memory: 12072kb
input:
10 13518 13517 67574 67576 76936 76938 73347 73349 7000 7001 19392 19391 6627 6626 24433 24432 98264 98265 94139 94141
output:
27033 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 ...
result:
ok Ok
Subtask #5:
score: 14
Accepted
Dependency #3:
100%
Accepted
Test #45:
score: 14
Accepted
time: 0ms
memory: 3824kb
input:
10 1476 492 1905 1143 1812 1812 1565 313 1362 908 370 740 1904 272 450 1800 1855 265 1352 1690
output:
1475 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6...
result:
ok Ok
Test #46:
score: 14
Accepted
time: 1ms
memory: 3840kb
input:
10 1020 1360 1242 1890 440 440 1506 753 347 347 183 1281 1888 944 354 1770 978 1304 1448 1991
output:
2039 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 1...
result:
ok Ok
Test #47:
score: 14
Accepted
time: 1ms
memory: 4092kb
input:
10 1635 300 1920 960 780 1950 726 726 1235 1482 902 1804 1392 1392 1159 1647 1422 474 215 1720
output:
1919 256 256 256 256 256 256 256 256 256 256 256 256 256 256 -3642 256 256 256 256 256 256 256 256 256 256 256 256 256 256 -3513 256 256 256 256 256 256 256 256 256 256 256 256 256 256 -3642 256 256 256 256 256 256 256 256 256 256 256 256 256 256 -3513 256 256 256 256 256 256 256 256 256 256 256 256...
result:
ok Ok
Test #48:
score: 14
Accepted
time: 1ms
memory: 3832kb
input:
10 1628 1628 1750 1274 1044 1566 954 477 1378 1378 1824 456 1540 462 1440 960 326 978 260 767
output:
1627 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
result:
ok Ok
Test #49:
score: 14
Accepted
time: 1ms
memory: 3808kb
input:
10 780 780 1708 1708 1519 868 972 1242 1028 771 1338 1561 134 268 1808 904 295 59 82 574
output:
779 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #50:
score: 14
Accepted
time: 0ms
memory: 3716kb
input:
10 1134 1134 654 327 495 1980 766 383 1188 1188 1480 592 387 1641 1274 1274 710 1420 1662 1662
output:
1133 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
result:
ok Ok
Test #51:
score: 14
Accepted
time: 0ms
memory: 3852kb
input:
10 782 23 1064 1596 654 1308 798 399 1598 282 918 459 1152 1152 510 867 1820 260 1140 456
output:
781 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 -1495 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 -1495 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 -1495 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 -1495 68 68 68...
result:
ok Ok
Test #52:
score: 14
Accepted
time: 1ms
memory: 3720kb
input:
10 1540 1540 1560 1950 1295 259 582 388 1494 1992 586 586 372 682 1492 373 1512 945 1980 900
output:
1539 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
result:
ok Ok
Test #53:
score: 14
Accepted
time: 1ms
memory: 3812kb
input:
10 1734 918 1070 1712 1650 660 416 1248 1341 447 960 1760 304 1824 634 951 818 1227 1029 1029
output:
2549 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 5...
result:
ok Ok
Test #54:
score: 14
Accepted
time: 1ms
memory: 3896kb
input:
10 777 259 924 1386 1560 780 327 327 1204 1204 988 741 404 1616 1952 1220 1062 1134 1719 764
output:
776 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 ...
result:
ok Ok
Test #55:
score: 14
Accepted
time: 1ms
memory: 3980kb
input:
10 2000 1215 2000 1280 897 2000 2000 1353 1268 2000 2000 1946 2000 1796 2000 1073 2000 1804 915 2000
output:
3209 1284 1284 1284 1284 -4964 1284 1284 1284 1284 -4964 1284 1284 1284 1284 -5607 1284 1284 1284 1284 -4964 1284 1284 1284 1284 -4964 1284 1284 1284 1284 -4964 1284 1284 1284 1284 -5607 1284 1284 1284 1284 -4964 1284 1284 1284 1284 -4964 1284 1284 1284 1284 -4964 1284 1284 1284 1284 -5607 1284 1284...
result:
ok Ok
Test #56:
score: 14
Accepted
time: 1ms
memory: 3840kb
input:
10 603 1999 825 1999 876 1999 1999 1783 731 1999 1999 1501 1217 1999 1999 1442 1999 1358 1593 1999
output:
2600 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 -2287 315 315 315 315 315 315 315 315 -2287 315 315 315 315...
result:
ok Ok
Test #57:
score: 14
Accepted
time: 1ms
memory: 4216kb
input:
10 1279 1998 1998 634 528 1998 1257 1998 1254 1998 1998 1414 1998 1991 1998 1861 938 1998 1991 1998
output:
3275 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 -474 -474 2803 -474 -474 -474 -474 ...
result:
ok Ok
Test #58:
score: 14
Accepted
time: 1ms
memory: 3872kb
input:
10 751 1997 1997 980 1997 1254 1927 1997 1015 1997 1997 1261 1119 1997 1997 1083 1441 1997 1997 1379
output:
2746 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 -2587 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 -2587 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 -2587 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 -2587 161 161 161 161...
result:
ok Ok
Test #59:
score: 14
Accepted
time: 1ms
memory: 4032kb
input:
10 1996 1506 1921 1996 1996 1996 1996 1649 1038 1996 1996 1115 1539 1996 1996 595 1996 853 1913 1996
output:
3499 3500 -3986 3500 -3986 3500 -2235 3500 -3986 3500 -3986 3500 -3986 3500 -2235 3500 -3986 3500 -3986 3500 -2235 3500 -3986 3500 -3986 3500 -3986 3500 -2235 3500 -3986 3500 -3986 3500 -3986 3500 -2235 3500 -3986 3500 -3986 3500 -2235 3500 -3986 3500 -3986 3500 -3986 3500 -2235 3500 -3986 3500 -398...
result:
ok Ok
Test #60:
score: 14
Accepted
time: 1ms
memory: 3948kb
input:
10 685 1995 1577 1995 1995 573 1995 1050 1587 1995 1507 1995 1742 1995 1995 1725 1995 1461 1995 794
output:
2674 1070 1070 1070 1070 -4057 1070 1070 1070 1070 -4593 1070 1070 1070 1070 -4057 1070 1070 1070 1070 -4593 1070 1070 1070 1070 -4057 1070 1070 1070 1070 -4057 1070 1070 1070 1070 -4593 1070 1070 1070 1070 -4057 1070 1070 1070 1070 -4593 1070 1070 1070 1070 -4057 1070 1070 1070 1070 -4057 1070 1070...
result:
ok Ok
Test #61:
score: 14
Accepted
time: 1ms
memory: 3968kb
input:
10 1617 1994 1994 1687 1701 1994 1067 1994 1994 1922 1994 1474 1994 1187 1994 1405 1227 1994 1886 1994
output:
3609 795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795 -2816 795 795 795 795 -2816 795 795 795 -2816 795 795 795 795...
result:
ok Ok
Test #62:
score: 14
Accepted
time: 1ms
memory: 3956kb
input:
10 1898 1993 727 1993 1993 762 1404 1993 722 1993 1993 776 1993 967 1571 1993 1993 1247 1993 1869
output:
3889 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 1966 -1925 196...
result:
ok Ok
Test #63:
score: 14
Accepted
time: 1ms
memory: 3944kb
input:
10 1992 1861 601 1992 1137 1992 1992 1647 1992 738 1992 1490 1808 1992 1527 1992 1730 1992 1992 1669
output:
3851 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 1000 -2853 1000 1000 -2853 1000 1000 1000 -...
result:
ok Ok
Test #64:
score: 14
Accepted
time: 1ms
memory: 4020kb
input:
10 1991 1256 1991 1716 984 1991 1991 928 1890 1991 1991 785 1991 1619 1808 1991 1058 1991 1991 1890
output:
3245 -349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 -349 -349 -349 -349 2898 -349 -349 -349 -349 ...
result:
ok Ok
Subtask #6:
score: 18
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #5:
100%
Accepted
Test #65:
score: 18
Accepted
time: 9ms
memory: 7160kb
input:
10 45595 41450 35430 42516 45331 45331 35412 44265 49448 44150 38904 38904 27456 45760 42064 41108 46207 46207 37224 45144
output:
82899 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 ...
result:
ok Ok
Test #66:
score: 18
Accepted
time: 14ms
memory: 7304kb
input:
10 34242 42144 43344 42140 49630 42540 42528 49616 43074 43074 34182 45576 49252 45734 33728 40052 48250 44390 48807 37323
output:
73751 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 56 ...
result:
ok Ok
Test #67:
score: 18
Accepted
time: 16ms
memory: 7688kb
input:
10 49088 49088 46908 41696 49230 41025 34534 43446 46988 38696 44205 41258 45528 40650 48698 46825 48195 41310 46210 46210
output:
49087 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #68:
score: 18
Accepted
time: 7ms
memory: 6928kb
input:
10 37645 37645 35924 46188 29988 39984 36972 49296 34570 34570 46618 42380 35116 35116 38728 48410 31570 45100 38430 38430
output:
37644 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #69:
score: 18
Accepted
time: 8ms
memory: 7680kb
input:
10 42672 42672 48095 38476 28668 47780 36636 49020 44985 35988 49596 45463 44928 46656 28580 35725 39370 43307 39228 39228
output:
42671 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #70:
score: 18
Accepted
time: 7ms
memory: 7132kb
input:
10 36666 40740 38960 48700 45155 45155 37611 39402 49269 40311 49600 49600 39650 42700 41025 49230 38268 47835 43540 43540
output:
73331 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 ...
result:
ok Ok
Test #71:
score: 18
Accepted
time: 5ms
memory: 7016kb
input:
10 38291 41772 49365 49365 45295 45295 39270 44880 30490 42686 27159 36212 36099 45458 43956 43956 36388 36388 44135 35308
output:
76581 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 ...
result:
ok Ok
Test #72:
score: 18
Accepted
time: 7ms
memory: 7560kb
input:
10 41220 41220 30030 36036 35607 45318 42994 42994 34064 34064 42055 33644 49080 45808 28748 43122 30112 45168 34152 38421
output:
41219 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #73:
score: 18
Accepted
time: 12ms
memory: 7448kb
input:
10 37316 46645 40470 33725 40358 48667 34122 45496 45034 48950 45808 49080 42536 49080 42444 47160 40080 32064 33460 41825
output:
74631 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 ...
result:
ok Ok
Test #74:
score: 18
Accepted
time: 7ms
memory: 7012kb
input:
10 44800 44800 44280 41328 34624 49772 37527 41101 37898 43312 38772 38772 36810 44172 40581 42084 38196 38196 42840 42840
output:
44799 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #75:
score: 18
Accepted
time: 0ms
memory: 7552kb
input:
10 45592 45592 33475 48925 42738 49023 49472 37104 36491 42105 39694 48168 37816 47270 33872 48691 46624 40796 34400 41280
output:
45591 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #76:
score: 18
Accepted
time: 7ms
memory: 7360kb
input:
10 48240 40200 45808 45808 37200 44640 45612 48870 47664 35748 48678 41724 36550 36550 36448 38726 47556 43593 44090 48499
output:
80399 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...
result:
ok Ok
Test #77:
score: 18
Accepted
time: 14ms
memory: 7244kb
input:
10 41888 41888 44560 44560 36477 48636 42775 42775 48510 45276 48202 39438 34452 43065 39120 45640 27684 46140 38619 47201
output:
41887 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #78:
score: 18
Accepted
time: 9ms
memory: 7856kb
input:
10 43320 43320 37611 48357 31372 39215 37480 37480 34900 34900 46504 40691 37500 37500 41495 41495 47432 40376 44688 39102
output:
43319 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #79:
score: 18
Accepted
time: 13ms
memory: 7340kb
input:
10 38340 46008 42336 44100 33600 44800 36485 36485 29528 36910 37458 49944 48464 43680 33088 41360 36070 43284 48084 48084
output:
76679 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...
result:
ok Ok
Test #80:
score: 18
Accepted
time: 14ms
memory: 7564kb
input:
10 49706 50000 50000 49651 50000 49252 49588 50000 50000 49361 49931 50000 49959 50000 49537 50000 50000 49361 50000 49939
output:
99703 99704 -84782 99704 -84782 99704 -134635 99704 -84782 99704 -84782 99704 -134635 99704 -84782 99704 -84782 99704 -84782 99704 -134635 99704 -84782 99704 -84782 99704 -134635 99704 -84782 99704 -84782 99704 -134635 99704 -84782 99704 -84782 99704 -84782 99704 -134635 99704 -84782 99704 -84782 99...
result:
ok Ok
Test #81:
score: 18
Accepted
time: 20ms
memory: 7724kb
input:
10 49999 49445 49999 49427 49685 49999 49668 49999 49999 49507 49999 49034 49999 49483 49795 49999 49011 49999 49617 49999
output:
99442 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 50081 -49363 5...
result:
ok Ok
Test #82:
score: 18
Accepted
time: 17ms
memory: 7648kb
input:
10 49818 49998 49741 49998 49998 49736 49885 49998 49590 49998 49998 49345 49573 49998 49392 49998 49998 49935 49263 49998
output:
99809 33270 33270 33270 33270 33270 -159141 33270 33270 33270 33270 33270 -175777 33270 33270 33270 33270 33270 -159141 33270 33270 33270 33270 33270 -175777 33270 33270 33270 33270 33270 -159141 33270 33270 33270 33270 33270 -175777 33270 33270 33270 33270 33270 -159141 33270 33270 33270 33270 3327...
result:
ok Ok
Test #83:
score: 18
Accepted
time: 18ms
memory: 7640kb
input:
10 49829 49997 49997 49314 49714 49997 49215 49997 49143 49997 49997 49995 49997 49439 49997 49902 49532 49997 49997 49178
output:
99824 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 96855 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 -2971 ...
result:
ok Ok
Test #84:
score: 18
Accepted
time: 14ms
memory: 7724kb
input:
10 49996 49786 49648 49996 49273 49996 49850 49996 49929 49996 49996 49120 49241 49996 49623 49996 49305 49996 49872 49996
output:
99779 99780 -105957 99780 -105957 99780 -105957 99780 -105957 99780 -105957 99780 -105957 99780 -105957 99780 -56066 99780 -105957 99780 -105957 99780 -105957 99780 -105957 99780 -105957 99780 -105957 99780 -105957 99780 -56066 99780 -105957 99780 -105957 99780 -105957 99780 -105957 99780 -105957 99...
result:
ok Ok
Test #85:
score: 18
Accepted
time: 12ms
memory: 7540kb
input:
10 49398 49995 49855 49995 49322 49995 49340 49995 49995 49834 49588 49995 49995 49098 49995 49783 49074 49995 49995 49437
output:
99389 66260 66260 -139013 66260 66260 -139013 66260 66260 -139013 66260 66260 -139013 66260 66260 -105882 66260 66260 -139013 66260 66260 -139013 66260 66260 -139013 66260 66260 -139013 66260 66260 -105882 66260 66260 -139013 66260 66260 -139013 66260 66260 -139013 66260 66260 -139013 66260 66260 -1...
result:
ok Ok
Test #86:
score: 18
Accepted
time: 12ms
memory: 7652kb
input:
10 49878 49994 49994 49210 49994 49047 49994 49581 49994 49810 49994 49632 49994 49567 49994 49654 49994 49237 49994 49877
output:
99869 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -99009 99870 -9...
result:
ok Ok
Test #87:
score: 18
Accepted
time: 16ms
memory: 7836kb
input:
10 49993 49603 49993 49548 49927 49993 49993 49789 49993 49297 49376 49993 49993 49378 49993 49008 49993 49394 49327 49993
output:
99594 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47755 -51841 47...
result:
ok Ok
Test #88:
score: 18
Accepted
time: 8ms
memory: 7788kb
input:
10 49269 49992 49992 49773 49992 49537 49992 49552 49992 49639 49560 49992 49040 49992 49620 49992 49402 49992 49974 49992
output:
99257 66172 66172 -140856 66172 66172 -140856 66172 66172 -107769 66172 66172 -140856 66172 66172 -140856 66172 66172 -140856 66172 66172 -107769 66172 66172 -140856 66172 66172 -140856 66172 66172 -140856 66172 66172 -107769 66172 66172 -140856 66172 66172 -140856 66172 66172 -140856 66172 66172 -1...
result:
ok Ok
Test #89:
score: 18
Accepted
time: 7ms
memory: 7732kb
input:
10 49991 49234 49991 49239 49430 49991 49991 49462 49596 49991 49309 49991 49536 49991 49537 49991 49943 49991 49991 49478
output:
99223 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -34211 65014 -34211 -...
result:
ok Ok
Test #90:
score: 18
Accepted
time: 4ms
memory: 7700kb
input:
10 49990 49723 49990 49768 49990 49687 49990 49063 49803 49990 49990 49554 49960 49990 49990 49806 49383 49990 49627 49990
output:
99711 -13071 -13071 -13071 -13071 -13071 -13071 86642 -13071 -13071 -13071 -13071 -13071 -13071 -13071 86642 -13071 -13071 -13071 -13071 -13071 -13071 86642 -13071 -13071 -13071 -13071 -13071 -13071 -13071 86642 -13071 -13071 -13071 -13071 -13071 -13071 -13071 86642 -13071 -13071 -13071 -13071 -1307...
result:
ok Ok
Test #91:
score: 18
Accepted
time: 12ms
memory: 7564kb
input:
10 49804 49989 49989 49271 49989 49986 49586 49989 49789 49989 49989 49695 49007 49989 49526 49989 49989 49740 49989 49248
output:
99791 -10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 89544 -10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 89544 -10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 89544 -10249 -10249 -10249 -10249 -10249 -10249 -10249 -10249 89544 -10249 -10249 -10249 -10249 -102...
result:
ok Ok
Test #92:
score: 18
Accepted
time: 16ms
memory: 7628kb
input:
10 49155 49988 49988 49201 49988 49411 49298 49988 49505 49988 49997 49988 49988 49882 49988 49813 49988 49926 49988 49661
output:
99141 12378 12378 12378 12378 12378 12378 12378 -86765 12378 12378 12378 12378 12378 12378 12378 -86765 12378 12378 12378 12378 12378 12378 12378 -86765 12378 12378 12378 12378 12378 12378 12378 -86765 12378 12378 12378 12378 12378 12378 12378 -86765 12378 12378 12378 12378 12378 12378 12378 -86765 ...
result:
ok Ok
Test #93:
score: 18
Accepted
time: 16ms
memory: 7656kb
input:
10 49937 49987 49987 49553 49321 49987 49791 49987 49405 49987 49987 49107 49957 49987 49585 49987 49016 49987 49987 49688
output:
99922 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 53959 -45965 -45965 53959 -45965 53959 -45965 53959 -45965 53959 ...
result:
ok Ok
Test #94:
score: 18
Accepted
time: 16ms
memory: 7744kb
input:
10 49833 49986 49256 49986 49934 49986 49519 49986 49986 49855 49334 49986 49986 49406 49986 49315 49671 49986 49707 49986
output:
99809 22180 22180 22180 22180 22180 22180 22180 22180 -172873 22180 22180 22180 22180 22180 22180 22180 22180 -183964 22180 22180 22180 22180 22180 22180 22180 22180 -172873 22180 22180 22180 22180 22180 22180 22180 22180 -183964 22180 22180 22180 22180 22180 22180 22180 22180 -172873 22180 22180 22...
result:
ok Ok
Subtask #7:
score: 24
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
Test #95:
score: 24
Accepted
time: 30ms
memory: 13764kb
input:
10 72070 72070 103113 91656 172194 86097 89655 107586 111643 143541 111756 105257 111424 111424 189900 94950 136496 136496 195720 97860
output:
72069 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
result:
ok Ok
Test #96:
score: 24
Accepted
time: 28ms
memory: 18748kb
input:
10 187168 99433 181147 132994 77040 154080 91302 182604 166755 155638 157950 94770 157425 94455 107916 143888 177210 196900 181024 181024
output:
280751 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96...
result:
ok Ok
Test #97:
score: 24
Accepted
time: 39ms
memory: 15492kb
input:
10 125755 114976 129145 145990 139005 166806 196626 131084 143600 98725 119643 159524 86968 130452 197316 131544 79502 198755 93198 186396
output:
237137 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 1...
result:
ok Ok
Test #98:
score: 24
Accepted
time: 41ms
memory: 16776kb
input:
10 151576 75788 137316 91544 154470 77235 194292 122332 97150 145725 102288 115074 148083 148083 95550 127400 146820 146820 167770 167770
output:
151575 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4...
result:
ok Ok
Test #99:
score: 24
Accepted
time: 48ms
memory: 15212kb
input:
10 91950 137925 188152 141114 93108 186216 134232 121448 110592 92160 126720 168960 117095 163933 93240 186480 81684 163368 188321 80709
output:
183899 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8...
result:
ok Ok
Test #100:
score: 24
Accepted
time: 38ms
memory: 14952kb
input:
10 122135 142804 122830 122830 88840 199890 106305 124955 141770 99239 160305 128244 70754 176885 75696 126160 165966 110644 89500 143200
output:
263059 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 280 2...
result:
ok Ok
Test #101:
score: 24
Accepted
time: 34ms
memory: 17764kb
input:
10 137481 183308 106110 141480 115143 153524 99168 99168 173507 167910 198583 113476 116109 77406 98752 148128 194514 194514 107613 166311
output:
274961 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12...
result:
ok Ok
Test #102:
score: 24
Accepted
time: 33ms
memory: 15876kb
input:
10 103192 193485 128184 164808 139440 139440 98365 98365 104742 163461 190960 190960 149387 149387 193060 106183 124869 83246 125456 172502
output:
283777 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44...
result:
ok Ok
Test #103:
score: 24
Accepted
time: 31ms
memory: 16932kb
input:
10 197730 121680 151088 151088 127888 191832 139872 192324 93423 93423 176640 122130 119889 154143 121190 121190 169479 94155 81942 81942
output:
304199 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40...
result:
ok Ok
Test #104:
score: 24
Accepted
time: 46ms
memory: 17668kb
input:
10 156706 142460 75555 100740 136374 194820 199918 136786 97674 146511 95898 183078 165330 192885 129096 164956 165210 165210 192816 192816
output:
284919 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40...
result:
ok Ok
Test #105:
score: 24
Accepted
time: 29ms
memory: 18524kb
input:
10 124359 82906 107130 89275 195648 163040 75338 75338 192855 102856 120196 120196 78480 196200 144300 177970 124032 195840 165120 196080
output:
165811 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8...
result:
ok Ok
Test #106:
score: 24
Accepted
time: 28ms
memory: 19088kb
input:
10 85482 170964 165222 119327 157962 157962 81771 81771 175797 190734 97654 97654 176275 160250 184756 184756 159590 127672 115080 115080
output:
170963 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4...
result:
ok Ok
Test #107:
score: 24
Accepted
time: 20ms
memory: 17888kb
input:
10 174328 174328 127890 170520 112263 149684 147690 98460 183035 183035 154485 154485 96165 128220 163296 176256 140658 195818 130722 174296
output:
174327 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...
result:
ok Ok
Test #108:
score: 24
Accepted
time: 36ms
memory: 18700kb
input:
10 151368 191012 108800 149600 142448 178060 93546 93546 97780 195560 101830 173710 116688 145860 176890 163660 132212 99159 141324 188432
output:
338775 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 188 1...
result:
ok Ok
Test #109:
score: 24
Accepted
time: 42ms
memory: 19556kb
input:
10 199680 176160 150465 120372 160544 185629 127964 127964 155166 103444 96732 193464 176768 176768 150138 125115 123426 123426 149835 119868
output:
375359 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 1564 156...
result:
ok Ok
Test #110:
score: 24
Accepted
time: 68ms
memory: 20728kb
input:
10 200000 193880 200000 194742 200000 199658 199275 200000 195306 200000 200000 192727 200000 193253 200000 193548 200000 193963 200000 195354
output:
393839 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 19692 -769597 19692 19692 19692 19692 19692 19692 19692 19692 196...
result:
ok Ok
Test #111:
score: 24
Accepted
time: 56ms
memory: 20580kb
input:
10 199999 192586 193701 199999 196132 199999 190124 199999 192836 199999 193578 199999 199999 196684 199999 199644 199999 192549 197953 199999
output:
392583 33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 -359009 33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 -359009 33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 -359009 33576 33576 33576 33576 33576 33576 33576 33576 33576 33576 -359009 33576 335...
result:
ok Ok
Test #112:
score: 24
Accepted
time: 72ms
memory: 20496kb
input:
10 199998 194393 199998 190852 198218 199998 192520 199998 199998 193017 197147 199998 199998 199261 192363 199998 199998 190874 199176 199998
output:
394389 178162 -216229 178162 -216229 178162 -216229 178162 -216229 178162 178162 -216229 178162 -216229 178162 -216229 178162 -216229 178162 -216229 178162 178162 -216229 178162 -216229 178162 -216229 178162 -216229 178162 -216229 178162 178162 -216229 178162 -216229 178162 -216229 178162 -216229 17...
result:
ok Ok
Test #113:
score: 24
Accepted
time: 67ms
memory: 20688kb
input:
10 199997 190606 199997 196151 191720 199997 199997 198151 194250 199997 194873 199997 199997 196561 199997 198696 198438 199997 199997 198318
output:
390601 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 -378125 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 12478 124...
result:
ok Ok
Test #114:
score: 24
Accepted
time: 77ms
memory: 20608kb
input:
10 199996 195824 190171 199996 199996 198995 194026 199996 199213 199996 199996 199975 199889 199996 198387 199996 199996 198071 195470 199996
output:
395815 197908 197908 197908 -560233 197908 197908 197908 -659188 197908 197908 197908 -560233 197908 197908 197908 -560233 197908 197908 197908 -659188 197908 197908 197908 -560233 197908 197908 197908 -560233 197908 197908 197908 -659188 197908 197908 197908 -560233 197908 197908 197908 -560233 197...
result:
ok Ok
Test #115:
score: 24
Accepted
time: 68ms
memory: 20356kb
input:
10 199995 199012 199995 199817 192717 199995 199995 198534 196688 199995 199995 195808 199995 197552 193661 199995 198736 199995 199995 194674
output:
399005 43838 43838 43838 43838 43838 43838 43838 43838 -355169 43838 43838 43838 43838 43838 43838 43838 43838 -355169 43838 43838 43838 43838 43838 43838 43838 43838 -355169 43838 43838 43838 43838 43838 43838 43838 43838 -355169 43838 43838 43838 43838 43838 43838 43838 43838 -355169 43838 43838 4...
result:
ok Ok
Test #116:
score: 24
Accepted
time: 60ms
memory: 20616kb
input:
10 199994 193360 196217 199994 199994 194677 199994 199774 199994 191268 199994 194429 199994 191329 199994 199529 195611 199994 191832 199994
output:
393351 393352 -357005 393352 -357005 393352 -357005 393352 -357005 393352 -553682 393352 -357005 393352 -357005 393352 -357005 393352 -357005 393352 -553682 393352 -357005 393352 -357005 393352 -357005 393352 -357005 393352 -357005 393352 -553682 393352 -357005 393352 -357005 393352 -357005 393352 -...
result:
ok Ok
Test #117:
score: 24
Accepted
time: 58ms
memory: 20348kb
input:
10 199993 199723 199993 195281 196381 199993 199993 195814 190106 199993 194656 199993 199993 195793 199993 192288 194329 199993 190758 199993
output:
399714 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 -389353 10363 10363 10363 10363 10363 10363 10363 10363 10363 10363 103...
result:
ok Ok
Test #118:
score: 24
Accepted
time: 72ms
memory: 20632kb
input:
10 194946 199992 199816 199992 190139 199992 199671 199992 199992 197575 199992 196977 194410 199992 199705 199992 199992 196438 193213 199992
output:
394931 131644 131644 131644 131644 131644 -688353 131644 131644 131644 131644 131644 -622530 131644 131644 131644 131644 131644 -688353 131644 131644 131644 131644 131644 -622530 131644 131644 131644 131644 131644 -688353 131644 131644 131644 131644 131644 -622530 131644 131644 131644 131644 131644 ...
result:
ok Ok
Test #119:
score: 24
Accepted
time: 54ms
memory: 20480kb
input:
10 199991 197278 192670 199991 197430 199991 199991 192992 195754 199991 194473 199991 199991 197760 193428 199991 199991 195552 199991 199134
output:
397267 68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 68530 68530 68530 68530 68530 -328739 6...
result:
ok Ok
Test #120:
score: 24
Accepted
time: 60ms
memory: 20720kb
input:
10 199990 192797 199990 195943 198539 199990 199990 193118 199990 198487 190132 199990 199110 199990 198168 199990 199125 199990 199990 197541
output:
392785 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 6389 638...
result:
ok Ok
Test #121:
score: 24
Accepted
time: 66ms
memory: 20604kb
input:
10 190153 199989 196353 199989 199808 199989 199989 197786 199989 190059 190668 199989 199989 195135 195508 199989 199989 194734 199989 197685
output:
390140 147989 -242153 147989 147989 -242153 147989 -242153 147989 147989 -242153 147989 147989 -242153 147989 -242153 147989 147989 -242153 147989 147989 -242153 147989 -242153 147989 147989 -242153 147989 -242153 147989 147989 -242153 147989 147989 -242153 147989 -242153 147989 147989 -242153 14798...
result:
ok Ok
Test #122:
score: 24
Accepted
time: 63ms
memory: 20548kb
input:
10 199988 190951 190047 199988 193024 199988 199988 191514 199988 191145 190908 199988 199988 196627 196890 199988 194909 199988 190113 199988
output:
390937 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -125540 265399 -125540 -...
result:
ok Ok
Test #123:
score: 24
Accepted
time: 86ms
memory: 20532kb
input:
10 193218 199987 190541 199987 194782 199987 196511 199987 199987 191581 199631 199987 199987 196736 198846 199987 190851 199987 196581 199987
output:
393203 -86727 -86727 -86727 306478 -86727 -86727 -86727 -86727 306478 -86727 -86727 -86727 306478 -86727 -86727 -86727 -86727 306478 -86727 -86727 -86727 306478 -86727 -86727 -86727 -86727 306478 -86727 -86727 -86727 306478 -86727 -86727 -86727 -86727 306478 -86727 -86727 -86727 306478 -86727 -86727...
result:
ok Ok
Test #124:
score: 24
Accepted
time: 68ms
memory: 20588kb
input:
10 199986 197337 199986 190188 199986 195749 199986 197259 199986 199539 199986 193837 199986 192018 198490 199986 199986 190611 199986 191622
output:
397319 264880 264880 -500362 264880 264880 -500362 264880 264880 -500362 264880 264880 -632803 264880 264880 -500362 264880 264880 -500362 264880 264880 -500362 264880 264880 -500362 264880 264880 -632803 264880 264880 -500362 264880 264880 -500362 264880 264880 -500362 264880 264880 -632803 264880 ...
result:
ok Ok
Test #125:
score: 24
Accepted
time: 57ms
memory: 20576kb
input:
10 200000 199999 199999 200000 200000 199999 200000 199999 199999 200000 200000 199999 199999 200000 199999 200000 200000 199999 199999 200000
output:
399997 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2...
result:
ok Ok