QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#105928 | #5738. Square Sum | maspy | AC ✓ | 27ms | 4656kb | C++23 | 20.1kb | 2023-05-16 01:01:30 | 2023-05-16 01:01:32 |
Judging History
answer
#line 1 "library/my_template.hpp"
#if defined(LOCAL)
#include <my_template_compiled.hpp>
#else
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using u32 = unsigned int;
using u64 = unsigned long long;
using i128 = __int128;
template <class T>
constexpr T infty = 0;
template <>
constexpr int infty<int> = 1'000'000'000;
template <>
constexpr ll infty<ll> = ll(infty<int>) * infty<int> * 2;
template <>
constexpr u32 infty<u32> = infty<int>;
template <>
constexpr u64 infty<u64> = infty<ll>;
template <>
constexpr i128 infty<i128> = i128(infty<ll>) * infty<ll>;
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); }
// (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, typename U>
T ceil(T x, U y) {
return (x > 0 ? (x + y - 1) / y : x / y);
}
template <typename T, typename U>
T floor(T x, U y) {
return (x > 0 ? x / y : (x - y + 1) / y);
}
template <typename T, typename U>
pair<T, T> divmod(T x, U y) {
T q = floor(x, y);
return {q, x - q * y};
}
template <typename T, typename U>
T SUM(const vector<U> &A) {
T sum = 0;
for (auto &&a: A) sum += a;
return sum;
}
#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) {
assert(!que.empty());
T a = que.top();
que.pop();
return a;
}
template <typename T>
T POP(vc<T> &que) {
assert(!que.empty());
T a = que.back();
que.pop_back();
return a;
}
template <typename F>
ll binary_search(F check, ll ok, ll ng) {
assert(check(ok));
while (abs(ok - ng) > 1) {
auto x = (ng + ok) / 2;
tie(ok, ng) = (check(x) ? mp(x, ng) : mp(ok, 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;
tie(ok, ng) = (check(x) ? mp(x, ng) : mp(ok, 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;
}
#endif
#line 1 "library/other/io.hpp"
// based on yosupo's fastio
#include <unistd.h>
namespace fastio {
#define FASTIO
// クラスが read(), print() を持っているかを判定するメタ関数
struct has_write_impl {
template <class T>
static auto check(T &&x) -> decltype(x.write(), std::true_type{});
template <class T>
static auto check(...) -> std::false_type;
};
template <class T>
class has_write : public decltype(has_write_impl::check<T>(std::declval<T>())) {
};
struct has_read_impl {
template <class T>
static auto check(T &&x) -> decltype(x.read(), std::true_type{});
template <class T>
static auto check(...) -> std::false_type;
};
template <class T>
class has_read : public decltype(has_read_impl::check<T>(std::declval<T>())) {};
struct Scanner {
FILE *fp;
char line[(1 << 15) + 1];
size_t st = 0, ed = 0;
void reread() {
memmove(line, line + st, ed - st);
ed -= st;
st = 0;
ed += fread(line + ed, 1, (1 << 15) - ed, fp);
line[ed] = '\0';
}
bool succ() {
while (true) {
if (st == ed) {
reread();
if (st == ed) return false;
}
while (st != ed && isspace(line[st])) st++;
if (st != ed) break;
}
if (ed - st <= 50) {
bool sep = false;
for (size_t i = st; i < ed; i++) {
if (isspace(line[i])) {
sep = true;
break;
}
}
if (!sep) reread();
}
return true;
}
template <class T, enable_if_t<is_same<T, string>::value, int> = 0>
bool read_single(T &ref) {
if (!succ()) return false;
while (true) {
size_t sz = 0;
while (st + sz < ed && !isspace(line[st + sz])) sz++;
ref.append(line + st, sz);
st += sz;
if (!sz || st != ed) break;
reread();
}
return true;
}
template <class T, enable_if_t<is_integral<T>::value, int> = 0>
bool read_single(T &ref) {
if (!succ()) return false;
bool neg = false;
if (line[st] == '-') {
neg = true;
st++;
}
ref = T(0);
while (isdigit(line[st])) { ref = 10 * ref + (line[st++] & 0xf); }
if (neg) ref = -ref;
return true;
}
template <typename T,
typename enable_if<has_read<T>::value>::type * = nullptr>
inline bool read_single(T &x) {
x.read();
return true;
}
bool read_single(double &ref) {
string s;
if (!read_single(s)) return false;
ref = std::stod(s);
return true;
}
bool read_single(char &ref) {
string s;
if (!read_single(s) || s.size() != 1) return false;
ref = s[0];
return true;
}
template <class T>
bool read_single(vector<T> &ref) {
for (auto &d: ref) {
if (!read_single(d)) return false;
}
return true;
}
template <class T, class U>
bool read_single(pair<T, U> &p) {
return (read_single(p.first) && read_single(p.second));
}
template <size_t N = 0, typename T>
void read_single_tuple(T &t) {
if constexpr (N < std::tuple_size<T>::value) {
auto &x = std::get<N>(t);
read_single(x);
read_single_tuple<N + 1>(t);
}
}
template <class... T>
bool read_single(tuple<T...> &tpl) {
read_single_tuple(tpl);
return true;
}
void read() {}
template <class H, class... T>
void read(H &h, T &... t) {
bool f = read_single(h);
assert(f);
read(t...);
}
Scanner(FILE *fp) : fp(fp) {}
};
struct Printer {
Printer(FILE *_fp) : fp(_fp) {}
~Printer() { flush(); }
static constexpr size_t SIZE = 1 << 15;
FILE *fp;
char line[SIZE], small[50];
size_t pos = 0;
void flush() {
fwrite(line, 1, pos, fp);
pos = 0;
}
void write(const char val) {
if (pos == SIZE) flush();
line[pos++] = val;
}
template <class T, enable_if_t<is_integral<T>::value, int> = 0>
void write(T val) {
if (pos > (1 << 15) - 50) flush();
if (val == 0) {
write('0');
return;
}
if (val < 0) {
write('-');
val = -val; // todo min
}
size_t len = 0;
while (val) {
small[len++] = char(0x30 | (val % 10));
val /= 10;
}
for (size_t i = 0; i < len; i++) { line[pos + i] = small[len - 1 - i]; }
pos += len;
}
void write(const string s) {
for (char c: s) write(c);
}
void write(const char *s) {
size_t len = strlen(s);
for (size_t i = 0; i < len; i++) write(s[i]);
}
void write(const double x) {
ostringstream oss;
oss << fixed << setprecision(15) << x;
string s = oss.str();
write(s);
}
void write(const long double x) {
ostringstream oss;
oss << fixed << setprecision(15) << x;
string s = oss.str();
write(s);
}
template <typename T,
typename enable_if<has_write<T>::value>::type * = nullptr>
inline void write(T x) {
x.write();
}
template <class T>
void write(const vector<T> val) {
auto n = val.size();
for (size_t i = 0; i < n; i++) {
if (i) write(' ');
write(val[i]);
}
}
template <class T, class U>
void write(const pair<T, U> val) {
write(val.first);
write(' ');
write(val.second);
}
template <size_t N = 0, typename T>
void write_tuple(const T t) {
if constexpr (N < std::tuple_size<T>::value) {
if constexpr (N > 0) { write(' '); }
const auto x = std::get<N>(t);
write(x);
write_tuple<N + 1>(t);
}
}
template <class... T>
bool write(tuple<T...> tpl) {
write_tuple(tpl);
return true;
}
template <class T, size_t S>
void write(const array<T, S> val) {
auto n = val.size();
for (size_t i = 0; i < n; i++) {
if (i) write(' ');
write(val[i]);
}
}
void write(i128 val) {
string s;
bool negative = 0;
if (val < 0) {
negative = 1;
val = -val;
}
while (val) {
s += '0' + int(val % 10);
val /= 10;
}
if (negative) s += "-";
reverse(all(s));
if (len(s) == 0) s = "0";
write(s);
}
};
Scanner scanner = Scanner(stdin);
Printer printer = Printer(stdout);
void flush() { printer.flush(); }
void print() { printer.write('\n'); }
template <class Head, class... Tail>
void print(Head &&head, Tail &&... tail) {
printer.write(head);
if (sizeof...(Tail)) printer.write(' ');
print(forward<Tail>(tail)...);
}
void read() {}
template <class Head, class... Tail>
void read(Head &head, Tail &... tail) {
scanner.read(head);
read(tail...);
}
} // namespace fastio
using fastio::print;
using fastio::flush;
using fastio::read;
#define INT(...) \
int __VA_ARGS__; \
read(__VA_ARGS__)
#define LL(...) \
ll __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 2 "library/mod/fast_div.hpp"
struct fast_div {
// Min25 https://judge.yosupo.jp/submission/46090
// 同じ定数で何度も除算するときの高速化に使える
using i64 = long long;
using u64 = unsigned long long;
using u128 = __uint128_t;
constexpr fast_div() : m(), s(), x() {}
constexpr fast_div(int n)
: m(n), s(std::__lg(n - 1)), x(((u128(1) << (s + 64)) + n - 1) / n) {}
constexpr friend u64 operator/(u64 n, const fast_div& d) {
return (u128(n) * d.x >> d.s) >> 64;
}
constexpr friend int operator%(u64 n, const fast_div& d) {
return n - n / d * d.m;
}
constexpr std::pair<i64, int> divmod(u64 n) const {
u64 q = n / *this;
return {q, n - q * m};
}
int m;
int s;
u64 x;
};
#line 3 "library/mod/mod_pow.hpp"
// int
ll mod_pow(ll a, ll n, int mod){
fast_div fd(mod);
a = a % fd;
ll p = a;
ll v = 1;
while(n){
if(n & 1) v = v * p % fd;
p = p * p % fd;
n >>= 1;
}
return v;
}
ll mod_pow_long(ll a, ll n, ll mod){
a %= mod;
ll p = a;
ll v = 1;
while(n){
if(n & 1) v = i128(v) * p % mod;
p = i128(p) * p % mod;
n >>= 1;
}
return v;
}
#line 2 "library/nt/primetest.hpp"
struct m64 {
using i64 = int64_t;
using u64 = uint64_t;
using u128 = __uint128_t;
inline static u64 m, r, n2; // r * m = -1 (mod 1<<64), n2 = 1<<128 (mod m)
static void set_mod(u64 m) {
assert((m & 1) == 1);
m64::m = m;
n2 = -u128(m) % m;
r = m;
FOR(_, 5) r *= 2 - m * r;
r = -r;
assert(r * m == -1ull);
}
static u64 reduce(u128 b) { return (b + u128(u64(b) * r) * m) >> 64; }
u64 x;
m64() : x(0) {}
m64(u64 x) : x(reduce(u128(x) * n2)){};
u64 val() const {
u64 y = reduce(x);
return y >= m ? y - m : y;
}
m64 &operator+=(m64 y) {
x += y.x - (m << 1);
x = (i64(x) < 0 ? x + (m << 1) : x);
return *this;
}
m64 &operator-=(m64 y) {
x -= y.x;
x = (i64(x) < 0 ? x + (m << 1) : x);
return *this;
}
m64 &operator*=(m64 y) {
x = reduce(u128(x) * y.x);
return *this;
}
m64 operator+(m64 y) const { return m64(*this) += y; }
m64 operator-(m64 y) const { return m64(*this) -= y; }
m64 operator*(m64 y) const { return m64(*this) *= y; }
bool operator==(m64 y) const {
return (x >= m ? x - m : x) == (y.x >= m ? y.x - m : y.x);
}
bool operator!=(m64 y) const { return not operator==(y); }
m64 pow(u64 n) const {
m64 y = 1, z = *this;
for (; n; n >>= 1, z *= z)
if (n & 1) y *= z;
return y;
}
};
bool primetest(const uint64_t x) {
using u64 = uint64_t;
if (x == 2 or x == 3 or x == 5 or x == 7) return true;
if (x % 2 == 0 or x % 3 == 0 or x % 5 == 0 or x % 7 == 0) return false;
if (x < 121) return x > 1;
const u64 d = (x - 1) >> __builtin_ctzll(x - 1);
m64::set_mod(x);
const m64 one(1), minus_one(x - 1);
auto ok = [&](u64 a) {
auto y = m64(a).pow(d);
u64 t = d;
while (y != one and y != minus_one and t != x - 1) y *= y, t <<= 1;
if (y != minus_one and t % 2 == 0) return false;
return true;
};
if (x < (1ull << 32)) {
for (u64 a: {2, 7, 61})
if (not ok(a)) return false;
} else {
for (u64 a: {2, 325, 9375, 28178, 450775, 9780504, 1795265022}) {
if (x <= a) return true;
if (not ok(a)) return false;
}
}
return true;
}
#line 3 "library/nt/factor.hpp"
mt19937_64 rng_mt{random_device{}()};
ll rnd(ll n) { return uniform_int_distribution<ll>(0, n - 1)(rng_mt); }
ll rho(ll n, ll c) {
m64::set_mod(n);
assert(n > 1);
const m64 cc(c);
auto f = [&](m64 x) { return x * x + cc; };
m64 x = 1, y = 2, z = 1, q = 1;
ll g = 1;
const ll m = 1LL << (__lg(n) / 5); // ?
for (ll r = 1; g == 1; r <<= 1) {
x = y;
FOR(_, r) y = f(y);
for (ll k = 0; k < r and g == 1; k += m) {
z = y;
FOR(_, min(m, r - k)) y = f(y), q *= x - y;
g = gcd(q.val(), n);
}
}
if (g == n) do {
z = f(z);
g = gcd((x - z).val(), n);
} while (g == 1);
return g;
}
ll find_prime_factor(ll n) {
assert(n > 1);
if (primetest(n)) return n;
FOR(_, 100) {
ll m = rho(n, rnd(n));
if (primetest(m)) return m;
n = m;
}
cerr << "failed" << endl;
assert(false);
return -1;
}
// ソートしてくれる
vc<pair<ll, int>> factor(ll n) {
assert(n >= 1);
vc<pair<ll, int>> pf;
FOR3(p, 2, 100) {
if (p * p > n) break;
if (n % p == 0) {
ll e = 0;
do { n /= p, e += 1; } while (n % p == 0);
pf.eb(p, e);
}
}
while (n > 1) {
ll p = find_prime_factor(n);
ll e = 0;
do { n /= p, e += 1; } while (n % p == 0);
pf.eb(p, e);
}
sort(all(pf));
return pf;
}
vc<pair<ll, int>> factor_by_lpf(ll n, vc<int>& lpf) {
vc<pair<ll, int>> res;
while (n > 1) {
int p = lpf[n];
int e = 0;
while (n % p == 0) {
n /= p;
++e;
}
res.eb(p, e);
}
return res;
}
#line 6 "main.cpp"
ll calc(ll p, ll e, ll x) {
if (p == 2) {
if (x == 0) { return 1LL << e; }
if (e == 1) return 2;
if (e == 2) {
if (x == 0) return 4;
if (x == 1) return 8;
if (x == 2) return 4;
return 0;
}
if (x % 4 == 0) { return calc(p, e - 2, x / 4) * 4; }
if (x % 4 == 3) return 0;
if (x % 8 == 6) return 0;
return 1LL << (e + 1);
}
if (p % 4 == 3) {
if (x % p != 0) {
ll t = p + 1;
FOR(e - 1) { t *= p; }
return t;
}
if (x % p == 0) {
if (e == 1) return 1;
if (x % (p * p) != 0) return 0;
if (e == 2) return p * p;
return p * p * calc(p, e - 2, x / (p * p));
}
}
if (p % 4 == 1) {
if (x % p != 0) {
ll t = p - 1;
FOR(e - 1) t *= p;
return t;
}
if (x == 0) {
ll t = (p - 1) * (e + 1) + 1;
FOR(e - 1) t *= p;
return t;
}
ll ord = 0;
while (x % p == 0) {
++ord;
x /= p;
}
ll res = ord + 1;
res *= p - 1;
FOR(e - 1) res *= p;
return res;
}
return 0;
}
void test() {
for (auto&& p: {2, 3, 7, 5}) {
ll pp = 1;
FOR(e, 1, 6) {
pp *= p;
vi ANS(pp);
FOR(x, pp) FOR(y, pp) {
ll v = (x * x + y * y) % pp;
ANS[v] += 1;
}
FOR(x, pp) { assert(ANS[x] == calc(p, e, x)); }
}
}
}
void solve() {
LL(M, N);
auto pfs = factor(M);
vi ANS(N);
FOR(i, N) {
LL(x);
ll ans = 1;
for (auto&& [p, e]: pfs) {
ll pp = 1;
FOR(e) pp *= p;
ans *= calc(p, e, x % pp);
}
ANS[i] = ans;
}
print(ANS);
}
signed main() {
// test();
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3448kb
input:
3 3 0 1 2
output:
1 4 4
result:
ok 3 number(s): "1 4 4"
Test #2:
score: 0
Accepted
time: 2ms
memory: 3388kb
input:
4 4 0 1 2 3
output:
4 8 4 0
result:
ok 4 number(s): "4 8 4 0"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3420kb
input:
5 1 3
output:
4
result:
ok 1 number(s): "4"
Test #4:
score: 0
Accepted
time: 22ms
memory: 4596kb
input:
735134400 100000 4 4 1 2 3 4 4 4 5 4 3 4 1 1 1 1 2 0 1 4 4 5 4 1 0 0 1 3 0 4 0 5 3 0 3 0 5 4 0 0 3 2 5 3 2 4 3 4 2 1 3 3 2 2 2 3 1 0 1 2 3 4 3 5 4 4 0 1 5 2 2 3 3 2 4 3 5 5 1 3 1 1 4 3 4 3 4 5 2 4 1 3 2 0 5 0 0 5 5 1 2 0 3 4 0 4 1 0 1 4 5 5 3 1 3 0 3 5 0 4 2 0 4 0 0 0 4 0 2 2 2 4 5 3 0 2 0 4 1 4 1 2...
output:
1698693120 1698693120 1698693120 1698693120 0 1698693120 1698693120 1698693120 3397386240 1698693120 0 1698693120 1698693120 1698693120 1698693120 1698693120 1698693120 30888000 1698693120 1698693120 1698693120 3397386240 1698693120 1698693120 30888000 30888000 1698693120 0 30888000 1698693120 30888...
result:
ok 100000 numbers
Test #5:
score: 0
Accepted
time: 13ms
memory: 4652kb
input:
735134400 100000 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...
output:
30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 30888000 308...
result:
ok 100000 numbers
Test #6:
score: 0
Accepted
time: 7ms
memory: 4652kb
input:
536870912 100000 1 0 2 4 3 1 3 5 5 1 0 2 1 1 1 0 4 2 4 1 3 2 1 4 3 2 1 2 4 0 4 2 2 1 5 4 1 5 3 0 2 3 4 4 3 4 2 1 2 5 2 1 5 3 1 3 3 0 0 4 3 4 0 4 2 0 5 2 0 3 1 0 0 1 5 5 5 5 5 1 5 3 1 2 4 1 3 3 2 0 2 0 5 1 0 2 1 2 5 2 5 4 4 3 0 3 3 5 4 3 3 2 0 2 1 2 0 1 4 1 1 4 2 4 1 2 4 4 4 2 3 4 5 5 5 4 3 5 5 2 1 5...
output:
1073741824 536870912 1073741824 1073741824 0 1073741824 0 1073741824 1073741824 1073741824 536870912 1073741824 1073741824 1073741824 1073741824 536870912 1073741824 1073741824 1073741824 1073741824 0 1073741824 1073741824 1073741824 0 1073741824 1073741824 1073741824 1073741824 536870912 1073741824...
result:
ok 100000 numbers
Test #7:
score: 0
Accepted
time: 4ms
memory: 4588kb
input:
536870912 100000 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...
output:
536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 ...
result:
ok 100000 numbers
Test #8:
score: 0
Accepted
time: 10ms
memory: 4628kb
input:
536870912 100000 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268435456 268...
output:
536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 ...
result:
ok 100000 numbers
Test #9:
score: 0
Accepted
time: 7ms
memory: 4512kb
input:
536870912 100000 504070704 500101584 484480320 75189632 133364432 237444928 506874208 477655312 261146688 36394912 312952944 260479168 77969872 60413040 249853392 288067360 129948656 311385424 444949024 339508400 62885472 368704208 379750624 528964784 158077280 415604832 393291776 342918080 20621644...
output:
0 1073741824 1073741824 0 1073741824 1073741824 0 1073741824 1073741824 1073741824 0 0 1073741824 0 1073741824 1073741824 0 1073741824 1073741824 0 0 1073741824 0 0 0 0 1073741824 0 1073741824 0 0 1073741824 1073741824 1073741824 0 0 0 1073741824 0 0 0 0 0 0 1073741824 1073741824 0 1073741824 0 0 0 ...
result:
ok 100000 numbers
Test #10:
score: 0
Accepted
time: 7ms
memory: 4508kb
input:
536870912 100000 485294080 49414144 71499776 405143552 295436288 188612608 153288704 515768320 24248320 34471936 173539328 437387264 413663232 516947968 112263168 442826752 346488832 22151168 244514816 194510848 259260416 115015680 21757952 496828416 79429632 518979584 65011712 74317824 439812096 44...
output:
1073741824 1073741824 0 0 0 0 0 0 1073741824 0 0 1073741824 1073741824 1073741824 1073741824 1073741824 0 1073741824 0 0 1073741824 0 0 1073741824 0 0 0 0 0 1073741824 1073741824 0 0 1073741824 0 0 1073741824 1073741824 1073741824 0 1073741824 1073741824 1073741824 1073741824 0 1073741824 0 0 0 1073...
result:
ok 100000 numbers
Test #11:
score: 0
Accepted
time: 6ms
memory: 4656kb
input:
536870912 100000 0 268435456 0 0 268435456 268435456 0 0 0 0 268435456 0 268435456 0 268435456 0 0 0 0 0 268435456 268435456 268435456 268435456 0 0 268435456 268435456 268435456 0 268435456 268435456 0 268435456 0 268435456 0 0 268435456 0 0 0 268435456 268435456 0 268435456 268435456 268435456 0 2...
output:
536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 536870912 ...
result:
ok 100000 numbers
Test #12:
score: 0
Accepted
time: 13ms
memory: 4600kb
input:
779796616 100000 495020978 289673094 752654486 745889165 186463032 629831042 568084109 351140037 633863589 766446110 731514155 674603390 119159255 209998056 365491910 488229083 674872263 239261773 726348242 127803836 478298775 449657268 316649799 497847195 529645573 633328344 385144015 422155171 520...
output:
1569924096 0 0 1569924096 784962048 1569924096 1569924096 1569924096 1569924096 0 0 0 0 784962048 0 0 0 1569924096 1569924096 784962048 0 784962048 0 0 1569924096 784962048 0 0 784962048 0 1569924096 0 0 1569924096 0 0 1569924096 0 1569924096 1569924096 0 0 784962048 1569924096 784962048 784962048 0...
result:
ok 100000 numbers
Test #13:
score: 0
Accepted
time: 11ms
memory: 4584kb
input:
448340770 100000 17590207 378448283 377356435 142317962 32832284 283362954 431249178 350392871 210493301 353126480 88048955 133187907 155481936 36161241 120732436 163213003 410911210 27608106 348596232 178846917 22097057 75219456 295899274 238130211 383793986 278864287 345593615 417444550 409017940 ...
output:
358988288 358988288 807723648 358988288 358988288 358988288 358988288 358988288 358988288 807723648 807723648 358988288 358988288 358988288 358988288 358988288 807723648 358988288 358988288 358988288 358988288 358988288 358988288 358988288 358988288 358988288 807723648 807723648 807723648 807723648 ...
result:
ok 100000 numbers
Test #14:
score: 0
Accepted
time: 17ms
memory: 4512kb
input:
266069635 100000 146486161 131831810 57279849 256487214 256048395 50362550 260854940 241073971 32811964 107121487 261768591 182834801 159474905 43026229 19974995 164881566 246287652 239486995 67200667 74910586 221718783 237592156 221561959 202289915 19119390 113997936 191068379 75123564 133679363 16...
output:
404490240 441262080 196116480 8171520 898283520 441262080 441262080 8171520 196116480 0 196116480 196116480 441262080 196116480 441262080 196116480 0 441262080 196116480 8171520 408576000 196116480 196116480 441262080 910103040 17024000 196116480 196116480 196116480 441262080 196116480 196116480 196...
result:
ok 100000 numbers
Test #15:
score: 0
Accepted
time: 5ms
memory: 4588kb
input:
1 100000 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 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1 1 8 8 8 8 1 8 8 8 8 8 8 1 8 1 8 8 8 8 1 8 8 8 8 1 8 8 8 8 8 8 8 8 8 8 8 8 8 8 1 8 8 8 8 8 8 8 8 8 8 8 8 8 1 8 8 8 8 8 8 1 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 1 8 8 8 8 8 8 ...
result:
ok 100000 numbers
Test #22:
score: 0
Accepted
time: 2ms
memory: 4608kb
input:
8 100000 4 0 2 3 4 7 7 4 4 6 2 7 4 2 0 7 2 4 7 3 3 2 4 7 6 3 6 2 7 2 2 3 5 3 7 5 7 3 1 6 0 3 5 6 0 4 1 7 3 4 7 7 6 5 4 2 4 7 6 3 7 6 0 1 3 7 1 5 4 4 2 6 2 7 3 5 2 3 5 1 2 2 2 2 0 2 2 6 2 7 3 0 2 7 2 0 5 1 0 7 1 0 0 1 7 4 2 1 3 6 4 6 7 4 3 2 4 3 3 4 3 6 3 6 4 1 3 1 4 2 0 7 3 1 3 4 7 0 1 6 3 2 1 3 2 7...
output:
8 8 16 0 8 0 0 8 8 0 16 0 8 16 8 0 16 8 0 0 0 16 8 0 0 0 0 16 0 16 16 0 16 0 0 16 0 0 16 0 8 0 16 0 8 8 16 0 0 8 0 0 0 16 8 16 8 0 0 0 0 0 8 16 0 0 16 16 8 8 16 0 16 0 0 16 16 0 16 16 16 16 16 16 8 16 16 0 16 0 0 8 16 0 16 8 16 16 8 0 16 8 8 16 0 8 16 16 0 0 8 0 0 8 0 16 8 0 0 8 0 0 0 0 8 16 0 16 8 ...
result:
ok 100000 numbers
Test #23:
score: 0
Accepted
time: 6ms
memory: 4604kb
input:
9 100000 8 4 8 1 2 5 0 8 8 4 2 7 7 8 3 7 8 1 6 6 4 2 3 3 3 5 6 1 2 4 7 0 0 1 1 4 1 4 5 2 3 5 0 1 4 6 7 2 1 3 3 8 7 4 7 1 6 6 4 4 6 7 3 4 7 7 7 7 3 5 6 3 6 7 2 4 2 2 4 2 1 6 2 1 2 5 8 8 7 2 4 0 2 4 6 2 2 8 1 6 2 2 7 2 1 4 0 4 1 2 3 8 2 4 4 3 3 6 1 8 4 7 8 6 5 5 5 0 5 1 6 3 4 8 3 3 7 6 5 3 2 0 4 3 4 3...
output:
12 12 12 12 12 12 9 12 12 12 12 12 12 12 0 12 12 12 0 0 12 12 0 0 0 12 0 12 12 12 12 9 9 12 12 12 12 12 12 12 0 12 9 12 12 0 12 12 12 0 0 12 12 12 12 12 0 0 12 12 0 12 0 12 12 12 12 12 0 12 0 0 0 12 12 12 12 12 12 12 12 0 12 12 12 12 12 12 12 12 12 9 12 12 0 12 12 12 12 0 12 12 12 12 12 12 9 12 12 1...
result:
ok 100000 numbers
Test #24:
score: 0
Accepted
time: 3ms
memory: 4600kb
input:
10 100000 5 5 8 9 7 1 9 5 8 6 5 9 2 8 9 7 2 7 9 9 9 6 6 3 0 6 7 9 4 5 7 1 2 9 2 4 5 9 9 3 3 7 7 9 0 9 4 1 4 1 6 8 4 9 0 2 2 9 4 2 2 2 5 9 7 7 2 0 1 3 4 9 3 4 1 7 2 8 9 4 6 9 1 5 3 3 4 0 8 5 0 9 4 5 2 7 5 9 3 0 7 1 3 7 9 8 5 7 1 6 0 7 2 5 6 0 4 6 2 6 4 4 9 7 1 8 4 1 6 7 9 9 8 0 2 4 4 0 1 1 2 8 6 5 2 ...
output:
18 18 8 8 8 8 8 18 8 8 18 8 8 8 8 8 8 8 8 8 8 8 8 8 18 8 8 8 8 18 8 8 8 8 8 8 18 8 8 8 8 8 8 8 18 8 8 8 8 8 8 8 8 8 18 8 8 8 8 8 8 8 18 8 8 8 8 18 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 18 8 8 8 18 8 18 18 8 8 18 8 8 18 8 8 18 8 8 8 8 8 8 18 8 8 8 18 8 8 18 8 18 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 18 8 8 8 18 ...
result:
ok 100000 numbers
Test #25:
score: 0
Accepted
time: 3ms
memory: 4516kb
input:
11 100000 9 4 6 8 9 6 3 2 9 3 5 9 8 6 8 0 6 8 10 4 7 1 4 1 10 5 5 9 10 9 2 8 4 6 1 9 7 3 10 6 5 6 2 5 8 7 6 7 9 5 3 4 8 8 1 0 2 8 7 6 4 0 8 5 10 10 2 1 6 9 5 4 4 5 2 4 6 2 0 8 2 0 1 0 5 10 6 10 4 6 9 2 0 0 0 4 4 3 10 5 7 5 3 4 1 2 5 6 3 3 10 3 2 7 3 8 0 6 0 0 2 7 6 3 1 2 5 7 10 4 2 4 1 10 5 4 5 3 9 ...
output:
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 1 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 12 12 12 12 12 1 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 1 12 12 1 12 1 12 12 12 12 12 12 12 12 1 1 1 12 12 12 12 12 12 12 12 ...
result:
ok 100000 numbers
Test #26:
score: 0
Accepted
time: 4ms
memory: 4596kb
input:
12 100000 2 2 3 9 3 6 9 4 9 8 3 9 6 4 2 11 6 0 0 3 6 7 7 5 5 10 10 6 2 1 1 6 6 3 5 5 9 10 3 7 2 9 3 8 3 2 2 4 10 2 9 5 9 6 1 9 3 0 11 8 1 1 2 0 6 11 1 0 5 10 6 6 11 0 4 6 3 4 0 1 9 0 7 7 8 8 1 3 0 8 8 3 3 5 8 5 10 4 1 1 9 10 0 11 11 5 11 6 9 5 0 11 10 4 0 9 9 10 3 9 1 4 11 1 4 10 1 1 10 6 11 3 1 8 8...
output:
16 16 0 8 0 4 8 16 8 16 0 8 4 16 16 0 4 4 4 0 4 0 0 32 32 16 16 4 16 32 32 4 4 0 32 32 8 16 0 0 16 8 0 16 0 16 16 16 16 16 8 32 8 4 32 8 0 4 0 16 32 32 16 4 4 0 32 4 32 16 4 4 0 4 16 4 0 16 4 32 8 4 0 0 16 16 32 0 4 16 16 0 0 32 16 32 16 16 32 32 8 16 4 0 0 32 0 4 8 32 4 0 16 16 4 8 8 16 0 8 32 16 0...
result:
ok 100000 numbers
Test #27:
score: 0
Accepted
time: 9ms
memory: 4616kb
input:
13 100000 10 6 6 2 7 6 4 3 12 7 3 3 11 1 5 3 2 0 5 0 3 10 10 4 3 1 1 4 8 9 11 10 2 9 4 2 3 0 4 6 3 12 3 12 4 9 11 4 1 7 6 8 11 7 2 7 0 0 4 6 8 11 8 8 12 9 3 10 8 8 6 1 10 6 8 11 8 2 6 12 4 5 8 11 9 4 0 3 5 0 10 12 6 2 6 5 11 1 7 4 3 4 5 6 4 10 5 9 5 6 4 10 9 9 11 4 11 7 8 11 9 5 5 12 4 10 7 8 12 10 ...
output:
12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 25 12 25 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 25 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 25 25 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 25 12 12 25 12 12 12 12 12 12 12 12 12 12 ...
result:
ok 100000 numbers
Test #28:
score: 0
Accepted
time: 10ms
memory: 4508kb
input:
14 100000 3 11 11 9 10 5 8 3 6 6 4 5 9 2 9 6 4 4 4 12 4 11 8 3 3 10 13 10 12 0 6 12 9 1 2 5 6 0 8 13 12 10 1 9 1 0 10 11 10 4 0 11 7 4 2 9 7 4 4 11 3 12 7 4 6 8 7 12 8 12 9 2 1 4 1 5 6 13 12 11 1 9 6 13 1 13 7 12 6 1 2 11 10 1 8 8 8 7 12 5 12 12 6 0 2 4 7 8 7 11 12 8 13 0 0 0 0 10 1 10 11 8 1 6 12 1...
output:
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 2 16 16 16 16 16 16 16 2 16 16 16 16 16 16 16 2 16 16 16 16 2 16 2 16 16 16 2 16 16 16 16 16 2 16 16 16 2 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 2 16 16 16 16 16 16 16 16 16 16 2 16 16 16 16 16 2...
result:
ok 100000 numbers
Test #29:
score: 0
Accepted
time: 6ms
memory: 4632kb
input:
15 100000 14 1 2 9 11 1 8 7 1 9 12 4 0 7 1 1 14 12 8 5 8 2 8 14 10 4 5 11 5 7 11 0 10 0 7 2 2 6 13 8 13 10 2 4 8 10 5 10 8 6 7 4 12 9 8 4 14 4 7 11 2 9 7 3 2 0 13 6 3 9 0 0 14 12 1 6 4 8 10 8 4 11 4 0 8 6 4 13 3 9 6 7 8 7 4 10 13 8 11 11 4 10 0 2 5 13 11 4 4 14 0 9 1 2 8 8 3 10 3 10 0 3 4 8 5 12 12 ...
output:
16 16 16 4 16 16 16 16 16 4 4 16 9 16 16 16 16 4 16 36 16 16 16 16 36 16 36 16 36 16 16 9 36 9 16 16 16 4 16 16 16 36 16 16 16 36 36 36 16 4 16 16 4 4 16 16 16 16 16 16 16 4 16 4 16 9 16 4 4 4 9 9 16 4 16 4 16 16 36 16 16 16 16 9 16 4 16 16 4 4 4 16 16 16 16 36 16 16 16 16 16 36 9 16 36 16 16 16 16 ...
result:
ok 100000 numbers
Test #30:
score: 0
Accepted
time: 8ms
memory: 4628kb
input:
16 100000 13 12 11 5 8 11 0 3 15 10 1 10 15 1 13 6 13 4 14 10 15 3 0 14 6 0 1 6 2 8 7 15 15 13 0 9 7 13 9 3 4 7 5 2 12 8 15 10 10 11 3 9 1 6 9 12 6 15 7 1 4 0 7 2 11 5 2 10 11 3 2 3 1 0 13 5 11 2 3 11 3 0 5 3 9 7 5 9 1 8 2 14 6 1 3 14 5 3 4 4 15 12 7 3 2 4 8 0 1 14 9 9 6 10 8 2 12 3 13 4 5 9 9 14 6 ...
output:
32 0 0 32 16 0 16 0 0 32 32 32 0 32 32 0 32 32 0 32 0 0 16 0 0 16 32 0 32 16 0 0 0 32 16 32 0 32 32 0 32 0 32 32 0 16 0 32 32 0 0 32 32 0 32 0 0 0 0 32 32 16 0 32 0 32 32 32 0 0 32 0 32 16 32 32 0 32 0 0 0 16 32 0 32 0 32 32 32 16 32 0 0 32 0 0 32 0 32 32 0 0 0 0 32 32 16 16 32 0 32 32 0 32 16 32 0 ...
result:
ok 100000 numbers
Test #31:
score: 0
Accepted
time: 2ms
memory: 4504kb
input:
17 100000 8 15 6 15 16 16 7 9 5 4 16 3 2 1 5 14 12 1 3 1 9 11 6 4 11 12 6 5 1 13 5 3 2 8 7 4 15 5 11 8 1 1 12 3 6 2 13 10 3 1 15 4 1 13 15 15 10 0 2 15 10 5 15 5 15 0 1 7 16 4 4 12 3 0 8 10 9 5 15 13 7 15 11 15 15 5 8 6 7 6 11 8 14 0 10 14 16 12 14 6 14 3 15 6 13 11 1 0 12 15 14 7 13 13 6 2 10 10 1 ...
output:
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 33 16 16 16 16 16 16 16 33 16 16 16 16 16 16 16 33 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 33 16 16 16 16 16 16 ...
result:
ok 100000 numbers
Test #32:
score: 0
Accepted
time: 12ms
memory: 4512kb
input:
18 100000 3 16 9 4 2 1 14 13 0 8 8 11 11 4 1 3 2 14 1 11 13 8 8 2 0 17 14 5 11 16 8 11 14 8 7 17 0 8 12 6 5 10 6 4 15 14 17 12 15 7 17 16 10 6 13 6 1 0 13 4 17 8 17 6 12 3 15 7 12 15 13 7 12 5 15 17 0 12 4 15 17 11 15 15 6 13 13 16 6 10 8 1 17 17 10 16 10 17 5 6 10 6 16 0 15 2 8 12 17 0 13 8 3 17 9 ...
output:
0 24 18 24 24 24 24 24 18 24 24 24 24 24 24 0 24 24 24 24 24 24 24 24 18 24 24 24 24 24 24 24 24 24 24 24 18 24 0 0 24 24 0 24 0 24 24 0 0 24 24 24 24 0 24 0 24 18 24 24 24 24 24 0 0 0 0 24 0 0 24 24 0 24 0 24 18 0 24 0 24 24 0 0 0 24 24 24 0 24 24 24 24 24 24 24 24 24 24 0 24 0 24 18 0 24 24 0 24 1...
result:
ok 100000 numbers
Test #33:
score: 0
Accepted
time: 8ms
memory: 4584kb
input:
19 100000 6 17 1 1 17 12 9 4 11 9 4 1 8 0 12 10 7 2 7 15 10 9 0 2 14 9 4 7 17 14 18 6 14 1 8 13 4 11 9 16 15 2 4 7 17 11 15 12 14 18 3 11 18 17 10 16 11 6 12 6 3 18 14 4 17 6 11 3 7 6 17 7 14 7 2 15 10 6 13 3 4 11 16 18 1 5 10 2 10 8 15 17 15 1 16 17 11 16 10 17 6 14 10 4 2 3 3 4 18 4 8 8 15 9 4 6 1...
output:
20 20 20 20 20 20 20 20 20 20 20 20 20 1 20 20 20 20 20 20 20 20 1 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 100000 numbers
Test #34:
score: 0
Accepted
time: 5ms
memory: 4596kb
input:
20 100000 15 19 8 14 7 12 13 6 12 12 9 1 5 15 0 1 16 11 10 5 2 2 13 19 7 5 19 13 12 2 9 3 10 1 13 12 2 2 9 11 0 17 11 8 10 8 16 3 13 7 16 16 5 4 4 17 0 2 17 4 18 11 0 5 11 1 17 7 8 16 0 19 18 6 4 4 17 1 19 17 10 4 9 11 10 6 16 2 18 9 7 1 19 14 12 2 4 18 15 8 3 10 4 5 7 0 14 13 0 13 12 14 9 13 11 12 ...
output:
0 0 16 16 0 16 32 16 16 16 32 32 72 0 36 32 16 0 36 72 16 16 32 0 0 72 0 32 16 16 32 0 36 32 32 16 16 16 32 0 36 32 0 16 36 16 16 0 32 0 16 16 72 16 16 32 36 16 32 16 16 0 36 72 0 32 32 0 16 16 36 0 16 16 16 16 32 32 0 32 36 16 32 0 36 16 16 16 16 32 0 32 0 16 16 16 16 16 0 16 0 36 16 72 0 36 16 32 ...
result:
ok 100000 numbers
Test #35:
score: 0
Accepted
time: 5ms
memory: 4640kb
input:
100 100000 48 32 34 54 85 85 82 68 47 73 17 52 90 96 65 52 7 34 62 95 26 12 9 43 33 84 12 85 19 72 96 18 85 86 67 89 30 2 82 52 30 20 27 34 70 21 44 68 61 10 41 43 46 75 14 66 72 46 84 18 48 93 99 17 90 45 50 36 30 12 56 50 94 23 65 51 50 25 62 67 80 34 16 67 61 16 73 21 26 53 97 85 76 84 10 66 11 7...
output:
80 80 80 80 320 320 80 80 0 160 160 80 160 80 320 80 0 80 80 0 80 80 160 0 160 80 80 320 0 80 80 80 320 80 0 160 160 80 80 80 160 160 0 80 160 160 80 80 160 160 160 0 80 0 80 80 80 80 80 80 80 160 0 160 160 320 260 80 160 80 80 260 80 0 320 0 260 520 80 0 160 80 80 0 160 80 160 160 80 160 160 320 80...
result:
ok 100000 numbers
Test #36:
score: 0
Accepted
time: 9ms
memory: 4652kb
input:
128 100000 16 19 39 13 115 121 95 52 85 114 91 49 9 57 52 8 13 85 66 120 70 85 109 31 15 125 125 81 86 71 63 52 34 86 52 81 1 34 74 38 46 85 61 17 48 86 114 56 123 96 5 31 95 121 56 45 105 107 122 7 31 76 119 89 55 69 124 101 72 118 68 25 32 96 62 127 41 114 70 18 70 115 96 38 37 63 74 79 31 101 111...
output:
256 0 0 256 0 256 0 256 256 256 0 256 256 256 256 256 256 256 256 0 0 256 256 0 0 256 256 256 0 0 0 256 256 0 256 256 256 256 256 0 0 256 256 256 0 0 256 0 0 0 256 0 0 256 0 256 256 0 256 0 0 0 0 256 0 256 0 256 256 0 256 256 256 0 0 0 256 256 0 256 0 0 0 0 256 0 256 0 0 256 0 256 0 0 256 0 256 0 25...
result:
ok 100000 numbers
Test #37:
score: 0
Accepted
time: 4ms
memory: 4556kb
input:
1024 100000 532 343 203 182 425 460 12 972 1018 768 298 646 568 413 471 473 169 713 292 584 781 539 687 873 93 332 992 1003 831 271 104 794 1007 442 811 959 793 194 955 132 980 643 942 316 778 967 207 880 662 1023 661 174 725 621 1011 845 337 557 648 227 620 116 446 973 593 82 834 413 560 40 153 748...
output:
2048 0 0 0 2048 0 0 0 2048 0 2048 0 0 2048 0 2048 2048 2048 2048 2048 2048 0 0 2048 2048 0 0 0 0 0 2048 2048 0 2048 0 0 2048 2048 0 2048 2048 0 0 0 2048 0 0 0 0 0 2048 0 2048 2048 0 2048 2048 2048 2048 0 0 2048 0 2048 2048 2048 2048 2048 0 2048 2048 0 0 0 2048 2048 0 0 0 0 2048 2048 2048 2048 2048 2...
result:
ok 100000 numbers
Test #38:
score: 0
Accepted
time: 6ms
memory: 4556kb
input:
536870912 100000 107025491 421633051 132023139 31380718 245778528 520704567 172552428 423483031 227692942 192211998 411480632 4226101 378697969 243491892 35406045 401467807 232630591 153062333 428429010 310105922 138296860 234353498 519351056 131796946 483907490 460132043 85788428 180522266 20565242...
output:
0 0 0 0 0 0 0 0 0 0 0 1073741824 1073741824 1073741824 1073741824 0 0 1073741824 1073741824 1073741824 0 1073741824 1073741824 1073741824 1073741824 0 0 1073741824 1073741824 0 1073741824 1073741824 0 0 1073741824 1073741824 0 1073741824 1073741824 1073741824 0 0 1073741824 0 1073741824 0 1073741824...
result:
ok 100000 numbers
Test #39:
score: 0
Accepted
time: 18ms
memory: 4520kb
input:
735134400 100000 351966946 399558695 239189398 510344231 175039439 644675791 543396921 351955791 351276431 584254884 9603576 370310467 319508226 106760052 205742033 264239914 381113405 385922876 630634787 379962836 727797698 457331284 248751094 670398804 647086386 580523149 431769976 363364422 52821...
output:
3503554560 0 0 0 0 0 0 0 0 0 0 0 424673280 53084160 212336640 1698693120 3397386240 0 0 141557760 1698693120 1698693120 0 1698693120 0 1698693120 0 0 3397386240 690094080 0 1698693120 0 1698693120 5520752640 0 141557760 0 1698693120 1698693120 212336640 1698693120 1698693120 3503554560 0 0 0 8493465...
result:
ok 100000 numbers
Test #40:
score: 0
Accepted
time: 27ms
memory: 4612kb
input:
698377680 100000 174874929 115776451 542362291 296235171 640864821 543893571 555407534 647698115 68974020 217165158 362922817 487305620 153843634 396400618 656920216 427154318 436458059 584629557 346896621 39021446 444407994 497679085 190393608 73249592 397237852 28267885 461913501 239085036 6447365...
output:
0 0 0 0 0 0 0 0 3822059520 0 3503554560 3822059520 212336640 1698693120 849346560 0 0 0 424673280 0 1698693120 3822059520 0 1769472000 0 3822059520 0 0 0 0 0 656916480 1698693120 0 849346560 0 0 0 0 0 849346560 0 0 221184000 212336640 1698693120 212336640 437944320 1698693120 955514880 0 212336640 0...
result:
ok 100000 numbers
Test #41:
score: 0
Accepted
time: 17ms
memory: 4604kb
input:
551350800 100000 347255357 494342994 497739323 298000174 305664559 293832011 13717396 238652722 516900907 151895054 324024370 106006683 28877808 530427027 95992705 430133685 35615930 156796714 499871507 89966715 261159684 349743316 401057912 265563544 46555881 188236911 471232806 453542929 493061902...
output:
1274019840 0 0 0 0 0 13271040 13271040 0 0 2548039680 0 0 0 2548039680 0 318504960 1274019840 0 0 0 2654208000 637009920 637009920 0 0 0 159252480 0 1274019840 0 0 0 0 1274019840 0 0 159252480 0 0 1274019840 0 0 1274019840 1274019840 2548039680 0 0 2548039680 0 109486080 2070282240 637009920 0 0 254...
result:
ok 100000 numbers
Test #42:
score: 0
Accepted
time: 15ms
memory: 4584kb
input:
110270160 100000 52294691 47672839 11158151 61123157 39733125 11467450 75592834 32034080 61466552 86394203 15702698 50569874 4503637 58233925 28472416 74050932 35468713 43504692 68943331 70691978 40079111 8477068 17093514 12148185 55028876 90799420 20686784 82647011 24779800 22250946 32444824 270685...
output:
0 0 0 254803968 0 573308928 254803968 597196800 15925248 0 21233664 254803968 254803968 1182449664 32845824 0 31850496 0 0 31850496 0 0 0 0 0 0 127401984 0 286654464 0 127401984 0 0 0 254803968 254803968 254803968 147806208 0 0 0 0 0 254803968 0 0 0 127401984 0 0 573308928 0 0 0 254803968 31850496 1...
result:
ok 100000 numbers
Test #43:
score: 0
Accepted
time: 22ms
memory: 4592kb
input:
4324320 100000 2306857 2162405 949815 3818685 1515090 4143771 1744746 457621 1154376 2645554 2578220 910706 2340155 2668184 1365262 3214167 3953908 263148 2151717 3300462 4322030 3938027 438740 3741257 126581 2294758 3380226 909290 2263855 3970446 1664867 1215350 1446612 2576177 841055 1211179 35046...
output:
1327104 2985984 0 0 0 0 0 10616832 10616832 10616832 0 10616832 0 0 0 0 1327104 0 0 0 0 0 23887872 22118400 2764800 0 0 23887872 0 0 0 0 0 10616832 0 0 5308416 0 10616832 10616832 0 22118400 1327104 0 10616832 0 0 22118400 10616832 0 110592 0 10616832 0 0 0 2654208 0 0 5308416 10616832 0 884736 0 10...
result:
ok 100000 numbers
Test #44:
score: 0
Accepted
time: 20ms
memory: 4636kb
input:
110880 100000 95873 94423 21273 56888 75476 61735 13992 44987 71532 3907 30744 58028 32541 89549 33513 75609 79761 22264 23996 931 108447 355 56804 52996 51543 68318 67542 73557 96916 48010 30431 39388 57906 14115 42516 71688 95653 61090 79446 103697 6070 88442 20583 56180 7225 54492 85167 23722 520...
output:
294912 0 0 0 294912 0 0 0 0 0 0 0 0 294912 0 221184 0 0 0 0 0 0 24576 294912 0 0 0 18432 294912 663552 0 0 221184 0 221184 0 294912 663552 0 24576 0 294912 0 663552 663552 0 0 294912 294912 0 0 0 221184 0 24576 663552 0 0 0 294912 294912 294912 147456 0 294912 0 0 0 0 0 0 0 294912 0 0 0 36864 82944 ...
result:
ok 100000 numbers
Test #45:
score: 0
Accepted
time: 5ms
memory: 4520kb
input:
27720 100000 17686 18200 5273 561 26699 7661 3554 13726 12472 13115 996 14224 23866 14991 11535 6715 26131 8873 5713 17067 21383 8611 18621 10034 14676 17672 9331 24098 17268 14070 5700 25128 17735 18555 13344 23068 26577 20359 20336 21748 26226 19098 27601 9896 18527 14284 20958 26340 25774 2276 14...
output:
0 10368 73728 0 0 73728 73728 0 36864 0 0 4608 73728 0 0 0 0 73728 73728 0 0 0 55296 73728 0 36864 0 73728 0 0 0 27648 0 0 0 36864 55296 0 36864 36864 55296 55296 9216 36864 0 36864 0 0 0 36864 82944 0 0 0 165888 73728 0 55296 0 0 82944 0 82944 0 82944 0 73728 0 0 0 0 0 0 36864 165888 6144 36864 0 0...
result:
ok 100000 numbers
Test #46:
score: 0
Accepted
time: 13ms
memory: 4596kb
input:
60 100000 27 17 11 59 13 40 43 50 20 3 29 39 34 34 12 10 8 43 46 26 33 0 41 39 41 38 53 45 10 50 27 3 30 11 57 28 10 53 9 58 4 11 37 14 58 24 34 11 13 32 15 23 18 36 42 28 48 51 56 53 51 47 36 8 15 20 41 24 8 54 23 44 31 31 27 58 37 4 44 46 34 48 53 30 36 42 44 29 10 13 34 43 57 47 7 34 6 58 45 12 1...
output:
0 128 0 0 128 144 0 144 144 0 128 0 64 64 16 144 64 0 64 64 32 36 128 0 128 64 128 72 144 144 0 0 36 0 32 64 144 128 32 64 64 0 128 64 64 16 64 0 128 64 0 0 16 16 16 64 16 0 64 128 0 0 16 64 0 144 128 16 64 16 0 64 0 0 0 64 128 64 64 64 64 16 128 36 16 16 64 128 144 128 64 0 32 0 0 64 16 64 72 16 12...
result:
ok 100000 numbers
Test #47:
score: 0
Accepted
time: 8ms
memory: 4592kb
input:
999999929 100000 333111242 985608776 551629335 660056000 312643703 869806771 159666392 500650706 270736111 911053844 892559745 998822728 729706800 197533987 939222864 646096675 307023844 887718043 640832715 173209697 22212288 617166617 970250943 418300747 28207326 311253961 579344918 468543108 48691...
output:
999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 999999928 ...
result:
ok 100000 numbers
Test #48:
score: 0
Accepted
time: 5ms
memory: 4512kb
input:
499999909 100000 132779996 342144208 303066674 268713241 396878201 378514132 419831856 43973502 168070737 122206707 180885675 197155146 37364142 203980917 108102389 12641495 215009614 118878917 94238126 471603678 23712973 63466959 114964498 428754718 264073485 332860754 424890287 402799023 273603300...
output:
499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 499999908 ...
result:
ok 100000 numbers
Test #49:
score: 0
Accepted
time: 0ms
memory: 4652kb
input:
500000057 100000 302187627 58923539 491390084 274851659 8040723 61402244 38090547 378539892 221891656 117093534 458632669 10997239 197566218 456143697 260017707 42802709 253916468 431793598 301588790 57973905 104960069 411050931 291771483 41383117 198733642 397308772 330010760 6998710 373001622 4548...
output:
500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 500000056 ...
result:
ok 100000 numbers
Test #50:
score: 0
Accepted
time: 2ms
memory: 4556kb
input:
30113 100000 18041 6658 15555 3565 11884 17754 20610 8703 26659 7343 19909 8257 6461 11258 8565 27221 29002 18907 23948 27066 20433 6070 14740 12262 12993 27037 23689 22213 6731 18570 27647 7294 22236 26530 26808 19552 3074 22495 18201 28621 17299 16465 14440 17324 11534 4984 337 8307 24550 19146 18...
output:
30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 30112 ...
result:
ok 100000 numbers
Test #51:
score: 0
Accepted
time: 0ms
memory: 4600kb
input:
30089 100000 12290 7348 2578 20273 15769 27437 21319 22731 25481 17316 8495 16128 29629 3484 9266 22061 9120 25153 9629 23890 21555 20142 22161 8927 24569 24714 25751 24478 25916 5553 2201 26681 3893 2708 21723 3044 884 15668 4748 8374 28710 21592 23821 1990 23710 13925 6610 18249 28948 15622 27272 ...
output:
30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 30088 ...
result:
ok 100000 numbers
Test #52:
score: 0
Accepted
time: 3ms
memory: 4648kb
input:
906070057 100000 898027160 745433326 513459125 419497945 528565676 185413152 427268171 740679499 143867562 163395978 745670303 380505792 193699475 348250056 671063669 503640257 860381755 187244478 502133130 391353929 220896003 365885002 779069354 418070697 817843303 899491604 5521354 283966435 43570...
output:
906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 906009856 ...
result:
ok 100000 numbers
Test #53:
score: 0
Accepted
time: 19ms
memory: 4512kb
input:
196118330 100000 124482435 156819203 96729595 117024650 113132330 109374124 117497791 156098635 73102796 166997774 37505875 105853924 55677098 170813788 49422717 122264054 135551049 95007155 127889186 182765760 161589992 179549236 17703851 62081241 125545656 147238848 28132631 5435897 168017605 1233...
output:
357073920 158699520 357073920 357073920 357073920 158699520 158699520 357073920 158699520 158699520 357073920 158699520 158699520 2204160 158699520 158699520 158699520 357073920 158699520 357073920 158699520 158699520 158699520 158699520 158699520 158699520 158699520 158699520 357073920 357073920 15...
result:
ok 100000 numbers
Test #54:
score: 0
Accepted
time: 15ms
memory: 4604kb
input:
240829786 100000 197550197 63431372 128056740 93567337 158503752 26565855 62633691 78428485 124457881 11744009 190105296 212234541 236299983 92599445 27635867 126713038 107203116 27008791 90480989 104508142 167761389 86407648 132348271 168926745 53657026 97818979 13330119 45425707 17255291 231866395...
output:
231487488 231487488 231487488 477442944 231487488 231487488 231487488 231487488 231487488 231487488 231487488 231487488 477442944 231487488 231487488 231487488 231487488 231487488 231487488 231487488 477442944 231487488 231487488 231487488 231487488 231487488 231487488 231487488 231487488 231487488 ...
result:
ok 100000 numbers
Test #55:
score: 0
Accepted
time: 16ms
memory: 4580kb
input:
94119272 100000 64155255 48624166 49579820 45334632 93964980 47449684 39248423 28670033 26266086 19872603 43972555 47667657 27733267 56517739 61038503 81382058 57939395 58017232 9674626 78586589 58024302 73648655 13014750 93019282 35645687 65105930 9751144 54847019 22801414 52531391 65324625 2294106...
output:
0 0 84756480 84756480 84756480 84756480 0 169512960 0 0 0 169512960 0 0 0 169512960 0 176576000 353152000 169512960 0 0 0 169512960 0 169512960 176576000 0 0 0 169512960 84756480 0 0 169512960 169512960 0 0 171631872 84756480 169512960 0 0 84756480 0 84756480 343263744 353152000 169512960 84756480 0...
result:
ok 100000 numbers
Test #56:
score: 0
Accepted
time: 19ms
memory: 4524kb
input:
703061118 100000 676586127 622759674 281800553 469703287 687450752 46766612 81419946 64493452 621499214 545231808 239928651 607405569 671036764 407872747 410605627 172604106 557963007 689742845 107227571 227101774 116872766 191358381 333987626 664197780 278154315 497381109 4899382 257622245 47834213...
output:
0 0 926401536 926401536 926401536 926401536 0 926401536 926401536 694801152 694801152 0 926401536 926401536 926401536 694801152 0 926401536 926401536 926401536 926401536 0 926401536 0 694801152 0 926401536 926401536 0 694801152 926401536 0 926401536 926401536 926401536 926401536 926401536 694801152 ...
result:
ok 100000 numbers
Test #57:
score: 0
Accepted
time: 7ms
memory: 4604kb
input:
902252671 100000 25514261 768380231 379563360 824371628 106255725 493972885 277421453 776926915 494583597 46301812 622688393 205928353 232144442 694416691 869018575 521717469 289022636 327323704 385090042 216280565 876696099 688053278 443153512 607991253 777450857 248353892 489897887 336778405 31887...
output:
941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 941481024 39228376 941481024 941481024 941481024 941481024 941481024 941481024 941481024 9...
result:
ok 100000 numbers
Test #58:
score: 0
Accepted
time: 18ms
memory: 4512kb
input:
443388876 100000 315798208 116767405 99690561 430304154 246756535 152386871 169830811 348404348 5644684 112935356 200457463 225531744 413720506 190311227 243677377 75196776 255603407 438075727 279096870 72201040 81182234 91076992 370847379 374536067 355796329 149231849 15077033 102347088 171728720 2...
output:
675640320 1351280640 337820160 21113760 0 0 0 675640320 675640320 675640320 0 168910080 675640320 0 1351280640 168910080 0 0 168910080 675640320 84455040 675640320 0 0 168910080 1351280640 1351280640 168910080 675640320 675640320 0 675640320 675640320 168910080 168910080 675640320 675640320 0 168910...
result:
ok 100000 numbers
Test #59:
score: 0
Accepted
time: 18ms
memory: 4636kb
input:
818717615 100000 749593495 238254215 215488425 627995269 383077494 343225869 172056698 611320848 136012552 724503968 397042512 271499016 815565349 784075543 691770797 189732515 648375364 76416324 775593182 761020461 541653704 399719301 359570328 711401590 684315145 666360246 91604287 169203870 22955...
output:
1461657600 1461657600 1461657600 649625600 649625600 649625600 649625600 649625600 649625600 649625600 649625600 649625600 649625600 649625600 649625600 1461657600 649625600 649625600 649625600 649625600 649625600 649625600 649625600 1461657600 1461657600 649625600 649625600 1461657600 649625600 146...
result:
ok 100000 numbers
Test #60:
score: 0
Accepted
time: 17ms
memory: 4652kb
input:
999999999 100000 372883403 509371741 685627632 918403283 967880227 655989058 469137908 609444036 872410920 392751207 979044998 453819263 752588876 63137602 978644053 891412839 81289120 76680594 294107287 949339730 4385149 381856017 773062755 624252731 90057355 759229358 961070102 306290213 52375311 ...
output:
1297301184 1297301184 0 1297301184 1297301184 2630638512 1297301184 1297301184 0 0 1297301184 1297301184 1297301184 1297301184 1297301184 1297301184 1297301184 972975888 1297301184 1297301184 1297301184 0 0 1297301184 1297301184 1297301184 1297301184 1297301184 1297301184 1297301184 2630638512 0 129...
result:
ok 100000 numbers
Test #61:
score: 0
Accepted
time: 12ms
memory: 4600kb
input:
1000000000 100000 396540388 975044891 884485307 545742806 663740547 291444484 337914519 365780888 605623565 536776177 916506364 11866537 915578001 506920948 258100806 369867846 247098413 999018178 617492547 158693513 420288094 410705220 270766791 716948331 761511303 352603838 601833104 816809413 516...
output:
1600000000 0 0 0 0 1600000000 0 0 3200000000 1600000000 0 1600000000 1600000000 1600000000 0 0 1600000000 1600000000 0 1600000000 0 3200000000 0 0 0 0 1600000000 1600000000 1600000000 0 0 0 0 1600000000 1600000000 0 0 3200000000 1600000000 1600000000 0 1600000000 1600000000 1600000000 0 0 1600000000...
result:
ok 100000 numbers
Test #62:
score: 0
Accepted
time: 23ms
memory: 4512kb
input:
130945815 100000 38947881 16182079 63378972 19102889 109587712 48498168 95444807 104700276 130553482 43845962 51370724 123409358 90886373 103969338 61906382 79745277 17919618 66967519 5969812 49304276 13936747 121433607 92508885 115248021 739964 41309232 70902811 93138723 8466706 55814128 73207347 2...
output:
0 328458240 159252480 331776000 684288000 0 159252480 119439360 159252480 159252480 159252480 328458240 159252480 0 159252480 0 0 159252480 159252480 19906560 663552 0 33592320 0 159252480 0 19906560 159252480 159252480 328458240 0 0 328458240 0 0 159252480 1492992 0 19906560 159252480 159252480 358...
result:
ok 100000 numbers
Test #63:
score: 0
Accepted
time: 13ms
memory: 4516kb
input:
387420489 100000 292893707 164524334 252328222 363694866 365385128 304398658 172627456 54314963 14509351 186438072 276967324 372891577 40429914 23276635 25503269 116230800 373900483 249296584 280004705 371996166 356205050 252628345 93818869 88601923 293363800 329398752 113554907 370216581 335255282 ...
output:
516560652 516560652 516560652 0 516560652 516560652 516560652 516560652 516560652 0 516560652 516560652 0 516560652 516560652 0 516560652 516560652 516560652 0 516560652 516560652 516560652 516560652 516560652 0 516560652 0 516560652 0 516560652 516560652 516560652 516560652 0 516560652 516560652 51...
result:
ok 100000 numbers