QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#508887 | #7466. 初始化 | Xiaohuba | 100 ✓ | 352ms | 10156kb | C++23 | 11.4kb | 2024-08-07 21:21:24 | 2024-08-07 21:21:26 |
Judging History
answer
#ifndef M_MODINT_H
#define M_MODINT_H
#include <bits/stdc++.h>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsign-compare"
#if __cplusplus < 201700L
#pragma GCC diagnostic ignored "-Wc++17-extensions"
#warning "Some features may not be available under c++17."
#endif
#define _static_helper __attribute__((always_inline)) constexpr inline static
#define _set_op(tp, op, attr) \
attr tp operator op(const tp &rhs) const { \
tp lhs = *this; \
return lhs op## = rhs; \
}
// === BEGIN Modint library ===
namespace Moeebius {
template <uint32_t mod> class Modint {
using i32 = std::int32_t;
using u32 = std::uint32_t;
using u64 = std::uint64_t;
u32 _v;
_static_helper u32 __get_inv_r(u32 x) {
u32 y = x;
y *= 2ull - x * y, y *= 2ull - x * y, y *= 2ull - x * y, y *= 2ull - x * y;
return y;
}
_static_helper u32 __shrk(u32 x) { return std::min(x, x - mod); }
_static_helper u32 __shrk2(u32 x) { return std::min(x, x - 2 * mod); }
_static_helper u32 __dilt2(u32 x) { return std::min(x, x + 2 * mod); }
_static_helper u32 __reduce(u64 x) {
return (x + u64(u32(x) * -mod_inv) * mod) >> 32;
}
constexpr static inline u32 r2 = (1ull << 32) % mod * (1ull << 32) % mod,
mod_inv = __get_inv_r(mod);
static_assert(mod && (mod < (1u << 30)) && (mod & 1) &&
(mod_inv * mod) == 1u && __reduce(r2) == (1ull << 32) % mod);
public:
constexpr Modint() : _v(0) {}
constexpr Modint(u32 v) : _v(__reduce(u64(v) * r2)) {}
constexpr Modint(i32 v) : _v(__reduce(u64(__dilt2(v % i32(mod))) * r2)) {}
Modint operator-() const { return Modint() - *this; }
constexpr Modint &operator+=(Modint rhs) {
return _v = __shrk2(_v + rhs._v), *this;
}
constexpr Modint &operator-=(Modint rhs) {
return _v = __dilt2(_v - rhs._v), *this;
}
constexpr Modint &operator*=(Modint rhs) {
return _v = __reduce(u64(_v) * rhs._v), *this;
}
constexpr Modint pow(u64 y) const {
Modint ans = 1, x = *this;
while (y) {
if (y & 1)
ans *= x;
x *= x, y >>= 1;
}
return ans;
}
constexpr Modint inv() const { return this->pow(mod - 2); }
constexpr u32 val() const { return __shrk(__reduce(_v)); }
constexpr Modint &operator/=(Modint rhs) { return (*this) *= rhs.inv(); }
constexpr operator bool() const { return _v; }
constexpr bool operator==(const Modint &rhs) const {
return __shrk(_v) == __shrk(rhs._v);
}
constexpr bool operator!=(const Modint &rhs) const {
return __shrk(_v) != __shrk(rhs._v);
}
_set_op(Modint, +, constexpr);
_set_op(Modint, -, constexpr);
_set_op(Modint, *, constexpr);
_set_op(Modint, /, constexpr);
};
template <uint32_t mod>
std::istream &operator>>(std::istream &x, Modint<mod> &y) {
int32_t _v;
return x >> _v, y = _v, x;
}
template <uint32_t mod>
std::ostream &operator<<(std::ostream &x, Modint<mod> y) {
return x << y.val();
}
} // namespace Moeebius
// === END Modint library ===
#undef _static_helper
#undef _set_op
#pragma GCC diagnostic pop
#endif
#include <bits/stdc++.h>
// #include <moeebius/modint.hpp>
using namespace std;
// #define LOCK_GETCHAR
// #define USE_INT_128
#if __cplusplus < 201400
#warning "Please use c++14 or higher."
#define CONSTEXPR_FUNC
#else
#define CONSTEXPR_FUNC constexpr
#endif
#define il inline
#define mkp make_pair
#define fi first
#define se second
#define _loop_i_t(j, k) make_signed_t<decltype((j) - (k))>
#define For(i, j, k) for (_loop_i_t(j, k) i = (j); i <= (k); ++i) // NOLINT
#define ForDown(i, j, k) \
for (_loop_i_t(j, k) i = (j); i >= decltype(i)(k); --i) // NOLINT
#define eb emplace_back
#ifndef ONLINE_JUDGE
#define FileIO(filename) \
freopen(filename ".in", "r", stdin); \
freopen(filename ".out", "w", stdout)
#else
#define FileIO(filename) void(0)
#endif
using ll = long long;
using uint = unsigned int;
using ull = unsigned long long;
using db = double;
using ldb = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#ifdef USE_INT_128
using lll = __int128_t;
using ulll = __uint128_t;
#endif
// clang-format off
CONSTEXPR_FUNC il ll qpow(ll x, ull y, ll mod){ ll ans = 1; x %= mod; while (y) { if (y & 1) (ans *= x) %= mod; (x *= x) %= mod; y >>= 1; } return ans; }
template<typename T> CONSTEXPR_FUNC il void cmin(T & x, const T &y){ x = min(x, y); }
template<typename T> CONSTEXPR_FUNC il void cmax(T & x, const T &y){ x = max(x, y); }
// clang-format on
namespace FastIO {
// ------------------------------
// #define DISABLE_MMAP
// ------------------------------
#if (defined(LOCAL) || defined(_WIN32) || defined(__APPLE__)) && \
!defined(DISABLE_MMAP)
#define DISABLE_MMAP
#endif
#ifdef LOCAL
inline char gc() { return getchar(); }
inline void pc(char c) { putchar(c); }
#else
#ifdef DISABLE_MMAP
inline constexpr int _READ_SIZE = 1 << 18;
inline static char _read_buffer[_READ_SIZE], *_read_ptr = nullptr,
*_read_ptr_end = nullptr;
inline char gc() {
if (__builtin_expect(_read_ptr == _read_ptr_end, false)) {
_read_ptr = _read_buffer,
_read_ptr_end = _read_buffer + fread(_read_buffer, 1, _READ_SIZE, stdin);
if (__builtin_expect(_read_ptr == _read_ptr_end, false))
return EOF;
}
return *_read_ptr++;
}
#else
#include <sys/mman.h>
inline static const char *_read_ptr =
(const char *)mmap(nullptr, 0x7fffffff, 1, 2, 0, 0);
inline char gc() { return *_read_ptr++; }
#endif
inline constexpr int _WRITE_SIZE = 1 << 18;
inline static char _write_buffer[_WRITE_SIZE], *_write_ptr = _write_buffer;
inline void pc(char c) {
*_write_ptr++ = c;
if (__builtin_expect(_write_buffer + _WRITE_SIZE == _write_ptr, false))
fwrite(_write_buffer, 1, _write_ptr - _write_buffer, stdout),
_write_ptr = _write_buffer;
}
inline struct _auto_flush {
inline ~_auto_flush() {
fwrite(_write_buffer, 1, _write_ptr - _write_buffer, stdout);
}
} _auto_flush;
#endif
template <class T>
inline constexpr bool _is_signed = numeric_limits<T>::is_signed;
template <class T>
inline constexpr bool _is_unsigned =
numeric_limits<T>::is_integer && !_is_signed<T>;
#if __SIZEOF_LONG__ == 64
template <> inline constexpr bool _is_signed<__int128> = true;
template <> inline constexpr bool _is_unsigned<__uint128_t> = true;
#endif
inline void read(char &c) {
do
c = gc();
while (!isgraph(c));
}
inline void read_cstr(char *s) {
char c = gc();
while (!isgraph(c))
c = gc();
while (isgraph(c))
*s++ = c, c = gc();
*s = 0;
}
inline void read(string &s) {
char c = gc();
s.clear();
while (!isgraph(c))
c = gc();
while (isgraph(c))
s.push_back(c), c = gc();
}
template <class T, enable_if_t<_is_signed<T>, int> = 0> inline void read(T &x) {
char c = gc();
bool f = true;
x = 0;
while (!isdigit(c)) {
if (c == 45)
f = false;
c = gc();
}
if (f)
while (isdigit(c))
x = x * 10 + (c & 15), c = gc();
else
while (isdigit(c))
x = x * 10 - (c & 15), c = gc();
}
template <class T, enable_if_t<_is_unsigned<T>, int> = 0>
inline void read(T &x) {
char c = gc();
while (!isdigit(c))
c = gc();
x = 0;
while (isdigit(c))
x = x * 10 + (c & 15), c = gc();
}
inline void write(char c) { pc(c); }
inline void write_cstr(const char *s) {
while (*s)
pc(*s++);
}
inline void write(const string &s) {
for (char c : s)
pc(c);
}
template <class T, enable_if_t<_is_signed<T>, int> = 0> inline void write(T x) {
char buffer[numeric_limits<T>::digits10 + 1];
int digits = 0;
if (x >= 0)
do
buffer[digits++] = (x % 10) | 48, x /= 10;
while (x);
else {
pc(45);
do
buffer[digits++] = -(x % 10) | 48, x /= 10;
while (x);
}
while (digits)
pc(buffer[--digits]);
}
template <class T, enable_if_t<_is_unsigned<T>, int> = 0>
inline void write(T x) {
char buffer[numeric_limits<T>::digits10];
int digits = 0;
do
buffer[digits++] = (x % 10) | 48, x /= 10;
while (x);
while (digits)
pc(buffer[--digits]);
}
template <int N> struct _tuple_io_helper {
template <class... T> static inline void _read(tuple<T...> &x) {
_tuple_io_helper<N - 1>::_read(x), read(get<N - 1>(x));
}
template <class... T> static inline void _write(const tuple<T...> &x) {
_tuple_io_helper<N - 1>::_write(x), pc(32), write(get<N - 1>(x));
}
};
template <> struct _tuple_io_helper<1> {
template <class... T> static inline void _read(tuple<T...> &x) {
read(get<0>(x));
}
template <class... T> static inline void _write(const tuple<T...> &x) {
write(get<0>(x));
}
};
template <class... T> inline void read(tuple<T...> &x) {
_tuple_io_helper<sizeof...(T)>::_read(x);
}
template <class... T> inline void write(const tuple<T...> &x) {
_tuple_io_helper<sizeof...(T)>::_write(x);
}
template <class T1, class T2> inline void read(pair<T1, T2> &x) {
read(x.first), read(x.second);
}
template <class T1, class T2> inline void write(const pair<T1, T2> &x) {
write(x.first), pc(32), write(x.second);
}
template <class T1, class... T2> inline void read(T1 &x, T2 &...y) {
read(x), read(y...);
}
template <class... T> inline void read_cstr(char *x, T *...y) {
read_cstr(x), read_cstr(y...);
}
template <class T1, class... T2>
inline void write(const T1 &x, const T2 &...y) {
write(x), write(y...);
}
template <class... T> inline void write_cstr(const char *x, const T *...y) {
write_cstr(x), write_cstr(y...);
}
} // namespace FastIO
using FastIO::read;
using FastIO::read_cstr;
using FastIO::write;
using FastIO::write_cstr;
// File head end
namespace {
constexpr int MAXN = 2e5 + 5, B1 = 180, B2 = 512, mod = 1e9 + 7;
using Z = Moeebius::Modint<mod>;
template <int N> struct Arr2D {
array<Z, (N * (N + 1) / 2) + 1> _val;
Z &at(int x, int y) { // i mod x = y
return _val[x * (x - 1) / 2 + y];
}
};
int n, m;
Z a[MAXN], sum[B2];
Arr2D<B1> pre, suf;
il Z qry(int l, int r) {
int u = l / B2, v = r / B2;
Z ans{};
if (abs(v - u) <= 2) {
For(i, l, r) ans += a[i];
return ans;
}
For(i, l, (u + 1) * B2 - 1) ans += a[i];
For(i, u + 1, v - 1) ans += sum[i];
For(i, v * B2, r) ans += a[i];
return ans;
}
il void Main() {
read(n, m);
For(i, 0, n - 1) {
int x;
read(x), a[i] = x, sum[i / B2] += x;
}
while (m--) {
int op, x, y, z;
read(op, x, y);
if (op == 1) {
read(z), y--;
Z zz = z;
if (x <= B1) {
For(i, y, x - 1) pre.at(x, i) += zz;
For(i, 0, y) suf.at(x, i) += zz;
} else {
for (int i = y; i < n; i += x)
a[i] += zz, sum[i / B2] += zz;
}
} else {
x--, y--;
Z ans = qry(x, y);
For(i, 1, B1) {
int v1 = x % i, v2 = y % i, len = y / i - x / i - 1;
ans += suf.at(i, 0) * Z(len);
ans += pre.at(i, v2) + suf.at(i, v1);
}
write(ans.val(), '\n');
}
}
}
} // namespace
signed main() { return Main(), 0; }
Details
Tip: Click on the bar to expand more detailed information
Pretests
Final Tests
Test #1:
score: 5
Accepted
time: 1ms
memory: 3772kb
input:
1000 1000 1361956 207579013 628145517 376140463 883515281 186969586 762888636 326402540 98152103 158176573 61402893 127860890 9580639 570870045 646139320 178509023 484027667 61263305 841082556 558212775 940563716 26389630 579113529 496148000 925801173 837151741 70301174 656585276 285845006 902071051...
output:
648732081 492193831 283218488 228696734 313762770 515909697 72870251 612195081 188145620 223808223 214471399 505729423 650796548 384445891 314599905 400854289 962736008 339432326 210577076 840053300 7159504 966865953 324660485 759746877 457713000 211697336 21617859 476709445 659953713 686889028 3361...
result:
ok 489 numbers
Test #2:
score: 5
Accepted
time: 1ms
memory: 3656kb
input:
1000 1000 1361956 207579013 628145517 376140463 883515281 186969586 762888636 326402540 98152103 158176573 61402893 127860890 9580639 570870045 646139320 178509023 484027667 61263305 841082556 558212775 940563716 26389630 579113529 496148000 925801173 837151741 70301174 656585276 285845006 902071051...
output:
648732081 492193831 283218488 228696734 313762770 515909697 72870251 612195081 188145620 223808223 214471399 505729423 650796548 384445891 314599905 400854289 962736008 339432326 210577076 840053300 7159504 966865953 324660485 759746877 457713000 211697336 21617859 476709445 659953713 686889028 3361...
result:
ok 489 numbers
Test #3:
score: 5
Accepted
time: 262ms
memory: 10072kb
input:
200000 200000 1361956 207579013 628145517 376140463 883515281 186969586 762888636 326402540 98152103 158176573 61402893 127860890 9580639 570870045 646139320 178509023 484027667 61263305 841082556 558212775 940563716 26389630 579113529 496148000 925801173 837151741 70301174 656585276 285845006 90207...
output:
305638419 994399898 923587885 527703679 640069758 720090089 878182622 991906384 358318676 649820539 314687190 491905249 151341449 809191726 505252712 214187327 47109684 379586933 221143249 191528420 253997416 139430294 219797074 414702673 641259232 513489743 417462032 660480430 197592826 560839513 4...
result:
ok 100278 numbers
Test #4:
score: 5
Accepted
time: 261ms
memory: 10156kb
input:
200000 200000 68844529 945487906 399299384 408904628 487633698 442140145 51053895 47358021 126901909 701097015 724499175 324958106 854204121 453968136 327693787 60643468 203190917 495759519 278585131 373738326 571202736 568102873 375030687 292131863 835328887 135589560 335912007 548496723 449998459 ...
output:
717265678 547880929 315663133 902185715 663509934 862038657 972338989 769942592 845761249 715465047 437820453 162937206 730232292 509680498 901739362 142542248 505623024 698607814 459854536 585030285 668388690 163484820 925170347 640232651 533224600 705077558 370080949 815267213 979530056 941354023 ...
result:
ok 100124 numbers
Test #5:
score: 5
Accepted
time: 352ms
memory: 9940kb
input:
200000 200000 1361956 207579013 628145517 376140463 883515281 186969586 762888636 326402540 98152103 158176573 61402893 127860890 9580639 570870045 646139320 178509023 484027667 61263305 841082556 558212775 940563716 26389630 579113529 496148000 925801173 837151741 70301174 656585276 285845006 90207...
output:
166515546 539753549 415486898 919536484 310159620 535819751 276089461 89584370 925393931 712516450 769128503 35783169 309766563 664614072 435012609 107108714 909039318 580593281 992638703 779728131 926139107 980245385 946364788 733516376 840190388 244176233 482094164 327513135 615999783 254835512 98...
result:
ok 99788 numbers
Test #6:
score: 5
Accepted
time: 352ms
memory: 9904kb
input:
200000 200000 67503132 363468842 638393127 258796780 437474131 500302817 935610283 984740748 319061734 54938495 530687292 863317707 480811128 665058492 693271119 28127171 93961456 40215732 543972828 720675889 897303288 422955110 481357280 213966072 222067071 606028087 910792157 111881371 793933367 6...
output:
673509811 877375626 902945589 906573963 174178147 589652877 525342918 609008301 425930914 280194820 554137686 830874298 476912204 709707599 386512228 112814511 751415868 741811395 60447205 674383529 564083012 707043172 979112878 959938732 576490168 572729140 532948966 225775598 295234147 167372970 2...
result:
ok 100054 numbers
Test #7:
score: 5
Accepted
time: 133ms
memory: 6948kb
input:
100000 100000 1361956 207579013 628145517 376140463 883515281 186969586 762888636 326402540 98152103 158176573 61402893 127860890 9580639 570870045 646139320 178509023 484027667 61263305 841082556 558212775 940563716 26389630 579113529 496148000 925801173 837151741 70301174 656585276 285845006 90207...
output:
642645398 127306768 576327321 761751262 741111096 149576337 640953138 976086494 797150898 66137638 336036315 388288663 621800300 168701276 618582425 704423025 149342433 719668957 52847373 44021913 193443158 194975890 835070406 539687380 960092836 236547470 4130769 792051192 522210777 589756382 87999...
result:
ok 50211 numbers
Test #8:
score: 5
Accepted
time: 133ms
memory: 6964kb
input:
100000 100000 61745374 965592144 640671452 120116837 211706927 762051222 416195949 371042891 109989972 36759874 732390329 64808743 411073474 541157733 190852693 12980027 139463632 805799442 127604731 134427662 217304891 306611939 422775816 398927082 146530464 38679668 276609277 294628702 730978565 9...
output:
355635794 836805129 994663600 759849049 372067422 614126843 23891569 312912036 94309192 889881878 210901516 299721548 545668603 634104061 90566812 416258124 774560724 67706292 381878444 877208067 908668644 182602642 852411091 295435080 421207444 533237634 9206721 53700411 783905837 328572110 8888722...
result:
ok 50034 numbers
Test #9:
score: 5
Accepted
time: 316ms
memory: 10036kb
input:
200000 200000 1361956 207579013 628145517 376140463 883515281 186969586 762888636 326402540 98152103 158176573 61402893 127860890 9580639 570870045 646139320 178509023 484027667 61263305 841082556 558212775 940563716 26389630 579113529 496148000 925801173 837151741 70301174 656585276 285845006 90207...
output:
167548838 890366341 480840007 859625045 490134027 836686672 78904282 252115082 632735007 778234050 193170446 843095388 463942559 954418 689068525 216394847 408560610 275513366 998461732 555391164 92329271 100891016 269907650 45127478 266726836 161442104 291407124 3606952 763011694 586023999 96598311...
result:
ok 100235 numbers
Test #10:
score: 5
Accepted
time: 316ms
memory: 10044kb
input:
200000 200000 59815199 92547164 999344835 431793207 136451192 849278845 243046915 166487861 398213326 30700334 441688888 872380912 387805744 857760498 739218690 390447374 512555888 11887409 62589957 654817623 706455718 625777591 45345642 818483770 837168556 207499314 65204062 713480265 709993631 268...
output:
208309318 263775477 974645359 748787210 486687412 782575303 612727785 356599469 664488837 647672419 507393216 257729819 891911427 395840209 48790811 943674316 785164591 697209133 549304881 405310756 558391360 120301700 795395466 496805771 450567180 99763977 732366228 430337262 609696469 72737355 143...
result:
ok 100045 numbers
Test #11:
score: 5
Accepted
time: 235ms
memory: 9492kb
input:
200000 200000 650607579 321397561 441789336 830121199 66654001 83396017 139671897 103109011 59126219 181590561 104435269 89715601 135845182 258143393 308648813 129004877 116549035 21864811 349700646 514749325 255062127 62485046 7232581 254283841 660348383 260172225 180507053 742833401 696818191 2450...
output:
731308582 10816852 491147572 127943490 30516791 530180598 219405468 985939529 990012425 720691466 686610947 544457845 360400541 867329685 706032658 206149078 610808145 271664700 988656478 496189593 384661524 981226763 864562356 768045457 438359740 836332677 249020970 574646687 844833426 583329393 30...
result:
ok 99900 numbers
Test #12:
score: 5
Accepted
time: 237ms
memory: 9668kb
input:
200000 200000 175312796 156673221 10651655 894791521 111302977 71572483 956658651 46679865 398239799 93337261 235533425 1696771 690472927 658885847 495880001 436341649 216005180 3365462 239905 83602849 142737253 20093261 188502774 139035311 3293681 310027852 191454796 71031745 428216545 108346561 43...
output:
439587253 150584814 490962502 660109064 729532935 210111511 433658908 178402814 825253216 507004180 81879594 549928801 116636249 750423701 467853708 782149788 415017330 433465028 32152155 336688952 725086311 748331478 307124583 731726676 682630655 167555226 461936203 983991418 613455440 754392282 19...
result:
ok 99958 numbers
Test #13:
score: 5
Accepted
time: 237ms
memory: 9744kb
input:
200000 200000 371669329 11240416 783943833 171596719 315425452 62519020 355702498 276103458 143445251 19966193 117523693 190679073 268010613 104375899 23072625 41467548 90702076 295423345 457364953 59194045 657733200 735309805 762174241 521789701 268478109 84640943 417894541 267484361 1832555 504759...
output:
927207029 611321236 901265923 741232091 557994200 538569049 88102705 608529212 778909208 242551587 90707170 625199857 870111347 992917452 16700050 576297069 272486022 339709642 671397780 916214461 890431922 370636130 84696943 674665238 886984003 981510111 364599072 267910919 769795616 744650110 3087...
result:
ok 99783 numbers
Test #14:
score: 5
Accepted
time: 240ms
memory: 9724kb
input:
200000 200000 568480881 23877041 43366551 181793332 26503759 52827997 25163741 12218851 684623886 94248481 67430364 151159224 664311175 779707007 391453752 652463687 164399145 40011841 825017021 38122966 252480261 251308169 393106123 293750731 373994573 57095845 186608500 503081749 179596351 258931 ...
output:
679600185 678669699 237868798 451795001 49242496 909415358 85695680 102812542 630791103 65223376 405528718 17789723 72483822 161818535 998445839 989018781 460830090 122587015 448936250 703891866 5972609 985249014 577195701 961769941 288408028 683219411 735915205 609676532 534995092 35352184 96722214...
result:
ok 99830 numbers
Test #15:
score: 5
Accepted
time: 245ms
memory: 9876kb
input:
200000 200000 101760787 115746131 149428225 16070209 629449363 42491745 52697501 228050967 435605416 189884818 475302845 561610726 1430716 152673431 72694649 98966729 65451835 308401693 279622760 20408097 488074336 14720821 2020459 64712151 64694397 564103427 463476145 777854319 69476158 14333320 20...
output:
113868672 361018203 308630275 923480823 333284855 64151160 170682206 689329940 502017167 827008753 260348678 373983996 702166939 577504722 552092022 566024900 592988695 922646564 797931798 68774668 820684858 638917761 63138062 974619235 164070733 675379258 457152362 757855025 968977680 63403367 6720...
result:
ok 99567 numbers
Test #16:
score: 5
Accepted
time: 240ms
memory: 9740kb
input:
200000 200000 318181501 77681400 248897953 23121448 314175391 383364203 453145827 39513205 170583451 501090007 112440901 330482995 1661817 800116735 169128105 49036125 382820257 89008723 406179162 4076957 502963537 205719501 142645897 151826926 2423401 47663156 113445459 57560073 84557356 99977281 4...
output:
654155053 242371771 73581965 671704527 537142610 143159671 572050215 462317266 690057428 362354121 580770751 442707250 202788857 260172503 149533361 518854073 243282052 739527413 28089047 472943180 808016686 271205127 46555371 796898946 65685394 727505769 601551511 132266302 31750864 351057365 35844...
result:
ok 100289 numbers
Test #17:
score: 5
Accepted
time: 236ms
memory: 9708kb
input:
200000 200000 66077947 367654075 72167789 458325298 64191678 375539488 199903047 275218399 278546935 640046281 1445341 38102347 410886929 32822484 56683705 72009659 137231158 772889361 255888529 88366741 466445277 15685630 526232281 299441953 173570001 579810025 58417371 78536925 440385877 369178995...
output:
730265861 879370636 282775997 748065346 568595370 815416814 957179220 526919565 312981815 930876938 59439185 822033751 6133689 98255421 202069826 559863352 9675128 780942248 456896450 713264503 517232107 385420916 699214219 544167508 145465715 934450641 849119499 501886189 405776970 936578285 731393...
result:
ok 99911 numbers
Test #18:
score: 5
Accepted
time: 241ms
memory: 9688kb
input:
200000 200000 265293225 253563805 56466587 492535121 26366608 368011545 140974719 27309589 70496413 257031358 269972231 293087152 27683960 286392286 264474669 746791165 37524917 384714838 69415595 55974376 152373509 430426039 135885439 122425885 266027851 201413425 307083273 177034312 299310495 7684...
output:
287368900 586267443 198943245 544845816 359894353 635360958 542386720 813474188 299232165 846767615 627220824 159443954 481173291 935473523 709020469 390217282 758405787 833136820 913672181 200898640 83294435 124135653 653284920 57058935 845538466 357272409 683930606 940595442 763492641 616380910 45...
result:
ok 100017 numbers
Test #19:
score: 5
Accepted
time: 241ms
memory: 9676kb
input:
200000 200000 12515560 525649580 79690145 47773169 20141545 358648795 21399729 274351771 87176389 329625281 85753081 685565347 199152007 413757483 479195893 640142640 303635179 236905527 480212492 178046056 115357393 277646931 144086383 762226891 708313595 2619517 150311206 19324768 13176961 4050586...
output:
685912109 294230202 858415376 769715234 493952753 505894585 378706459 927095232 902280975 612027364 959849798 387887989 8078789 649159198 121084457 308129928 357784932 450464043 481355241 866295658 673385455 772143997 711021081 299777036 716104105 273556236 924319017 915831381 46119278 307246375 472...
result:
ok 99848 numbers
Test #20:
score: 5
Accepted
time: 234ms
memory: 9752kb
input:
200000 200000 212148777 435320621 162711316 541410244 626656897 349737991 163311693 672196217 24780161 93405601 469474806 28863697 39793135 14374329 56796901 135117685 4976292 778656781 140394041 135152553 4656863 14783231 515770664 469851101 138600175 439620049 367678561 86335327 40842386 153679436...
output:
748530152 995756221 613411435 622713236 233099738 728805153 291730951 221672889 518630250 37993740 890840378 507924835 193824028 193548424 227586359 568989485 600052141 736695213 699530905 839158427 342274860 847913375 471561887 482462354 432988530 545030424 340564391 807458931 537490875 206721692 1...
result:
ok 99915 numbers