QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#880179 | #9691. Little, Cyan, Fish! | hos_lyric | WA | 32ms | 189456kb | C++14 | 19.1kb | 2025-02-02 23:03:04 | 2025-02-02 23:03:04 |
Judging History
answer
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using Int = long long;
template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")
////////////////////////////////////////////////////////////////////////////////
template <unsigned M_> struct ModInt {
static constexpr unsigned M = M_;
unsigned x;
constexpr ModInt() : x(0U) {}
constexpr ModInt(unsigned x_) : x(x_ % M) {}
constexpr ModInt(unsigned long long x_) : x(x_ % M) {}
constexpr ModInt(int x_) : x(((x_ %= static_cast<int>(M)) < 0) ? (x_ + static_cast<int>(M)) : x_) {}
constexpr ModInt(long long x_) : x(((x_ %= static_cast<long long>(M)) < 0) ? (x_ + static_cast<long long>(M)) : x_) {}
ModInt &operator+=(const ModInt &a) { x = ((x += a.x) >= M) ? (x - M) : x; return *this; }
ModInt &operator-=(const ModInt &a) { x = ((x -= a.x) >= M) ? (x + M) : x; return *this; }
ModInt &operator*=(const ModInt &a) { x = (static_cast<unsigned long long>(x) * a.x) % M; return *this; }
ModInt &operator/=(const ModInt &a) { return (*this *= a.inv()); }
ModInt pow(long long e) const {
if (e < 0) return inv().pow(-e);
ModInt a = *this, b = 1U; for (; e; e >>= 1) { if (e & 1) b *= a; a *= a; } return b;
}
ModInt inv() const {
unsigned a = M, b = x; int y = 0, z = 1;
for (; b; ) { const unsigned q = a / b; const unsigned c = a - q * b; a = b; b = c; const int w = y - static_cast<int>(q) * z; y = z; z = w; }
assert(a == 1U); return ModInt(y);
}
ModInt operator+() const { return *this; }
ModInt operator-() const { ModInt a; a.x = x ? (M - x) : 0U; return a; }
ModInt operator+(const ModInt &a) const { return (ModInt(*this) += a); }
ModInt operator-(const ModInt &a) const { return (ModInt(*this) -= a); }
ModInt operator*(const ModInt &a) const { return (ModInt(*this) *= a); }
ModInt operator/(const ModInt &a) const { return (ModInt(*this) /= a); }
template <class T> friend ModInt operator+(T a, const ModInt &b) { return (ModInt(a) += b); }
template <class T> friend ModInt operator-(T a, const ModInt &b) { return (ModInt(a) -= b); }
template <class T> friend ModInt operator*(T a, const ModInt &b) { return (ModInt(a) *= b); }
template <class T> friend ModInt operator/(T a, const ModInt &b) { return (ModInt(a) /= b); }
explicit operator bool() const { return x; }
bool operator==(const ModInt &a) const { return (x == a.x); }
bool operator!=(const ModInt &a) const { return (x != a.x); }
friend std::ostream &operator<<(std::ostream &os, const ModInt &a) { return os << a.x; }
};
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
constexpr unsigned MO = 998244353U;
constexpr unsigned MO2 = 2U * MO;
constexpr int FFT_MAX = 23;
using Mint = ModInt<MO>;
constexpr Mint FFT_ROOTS[FFT_MAX + 1] = {1U, 998244352U, 911660635U, 372528824U, 929031873U, 452798380U, 922799308U, 781712469U, 476477967U, 166035806U, 258648936U, 584193783U, 63912897U, 350007156U, 666702199U, 968855178U, 629671588U, 24514907U, 996173970U, 363395222U, 565042129U, 733596141U, 267099868U, 15311432U};
constexpr Mint INV_FFT_ROOTS[FFT_MAX + 1] = {1U, 998244352U, 86583718U, 509520358U, 337190230U, 87557064U, 609441965U, 135236158U, 304459705U, 685443576U, 381598368U, 335559352U, 129292727U, 358024708U, 814576206U, 708402881U, 283043518U, 3707709U, 121392023U, 704923114U, 950391366U, 428961804U, 382752275U, 469870224U};
constexpr Mint FFT_RATIOS[FFT_MAX] = {911660635U, 509520358U, 369330050U, 332049552U, 983190778U, 123842337U, 238493703U, 975955924U, 603855026U, 856644456U, 131300601U, 842657263U, 730768835U, 942482514U, 806263778U, 151565301U, 510815449U, 503497456U, 743006876U, 741047443U, 56250497U, 867605899U};
constexpr Mint INV_FFT_RATIOS[FFT_MAX] = {86583718U, 372528824U, 373294451U, 645684063U, 112220581U, 692852209U, 155456985U, 797128860U, 90816748U, 860285882U, 927414960U, 354738543U, 109331171U, 293255632U, 535113200U, 308540755U, 121186627U, 608385704U, 438932459U, 359477183U, 824071951U, 103369235U};
// as[rev(i)] <- \sum_j \zeta^(ij) as[j]
void fft(Mint *as, int n) {
assert(!(n & (n - 1))); assert(1 <= n); assert(n <= 1 << FFT_MAX);
int m = n;
if (m >>= 1) {
for (int i = 0; i < m; ++i) {
const unsigned x = as[i + m].x; // < MO
as[i + m].x = as[i].x + MO - x; // < 2 MO
as[i].x += x; // < 2 MO
}
}
if (m >>= 1) {
Mint prod = 1U;
for (int h = 0, i0 = 0; i0 < n; i0 += (m << 1)) {
for (int i = i0; i < i0 + m; ++i) {
const unsigned x = (prod * as[i + m]).x; // < MO
as[i + m].x = as[i].x + MO - x; // < 3 MO
as[i].x += x; // < 3 MO
}
prod *= FFT_RATIOS[__builtin_ctz(++h)];
}
}
for (; m; ) {
if (m >>= 1) {
Mint prod = 1U;
for (int h = 0, i0 = 0; i0 < n; i0 += (m << 1)) {
for (int i = i0; i < i0 + m; ++i) {
const unsigned x = (prod * as[i + m]).x; // < MO
as[i + m].x = as[i].x + MO - x; // < 4 MO
as[i].x += x; // < 4 MO
}
prod *= FFT_RATIOS[__builtin_ctz(++h)];
}
}
if (m >>= 1) {
Mint prod = 1U;
for (int h = 0, i0 = 0; i0 < n; i0 += (m << 1)) {
for (int i = i0; i < i0 + m; ++i) {
const unsigned x = (prod * as[i + m]).x; // < MO
as[i].x = (as[i].x >= MO2) ? (as[i].x - MO2) : as[i].x; // < 2 MO
as[i + m].x = as[i].x + MO - x; // < 3 MO
as[i].x += x; // < 3 MO
}
prod *= FFT_RATIOS[__builtin_ctz(++h)];
}
}
}
for (int i = 0; i < n; ++i) {
as[i].x = (as[i].x >= MO2) ? (as[i].x - MO2) : as[i].x; // < 2 MO
as[i].x = (as[i].x >= MO) ? (as[i].x - MO) : as[i].x; // < MO
}
}
// as[i] <- (1/n) \sum_j \zeta^(-ij) as[rev(j)]
void invFft(Mint *as, int n) {
assert(!(n & (n - 1))); assert(1 <= n); assert(n <= 1 << FFT_MAX);
int m = 1;
if (m < n >> 1) {
Mint prod = 1U;
for (int h = 0, i0 = 0; i0 < n; i0 += (m << 1)) {
for (int i = i0; i < i0 + m; ++i) {
const unsigned long long y = as[i].x + MO - as[i + m].x; // < 2 MO
as[i].x += as[i + m].x; // < 2 MO
as[i + m].x = (prod.x * y) % MO; // < MO
}
prod *= INV_FFT_RATIOS[__builtin_ctz(++h)];
}
m <<= 1;
}
for (; m < n >> 1; m <<= 1) {
Mint prod = 1U;
for (int h = 0, i0 = 0; i0 < n; i0 += (m << 1)) {
for (int i = i0; i < i0 + (m >> 1); ++i) {
const unsigned long long y = as[i].x + MO2 - as[i + m].x; // < 4 MO
as[i].x += as[i + m].x; // < 4 MO
as[i].x = (as[i].x >= MO2) ? (as[i].x - MO2) : as[i].x; // < 2 MO
as[i + m].x = (prod.x * y) % MO; // < MO
}
for (int i = i0 + (m >> 1); i < i0 + m; ++i) {
const unsigned long long y = as[i].x + MO - as[i + m].x; // < 2 MO
as[i].x += as[i + m].x; // < 2 MO
as[i + m].x = (prod.x * y) % MO; // < MO
}
prod *= INV_FFT_RATIOS[__builtin_ctz(++h)];
}
}
if (m < n) {
for (int i = 0; i < m; ++i) {
const unsigned y = as[i].x + MO2 - as[i + m].x; // < 4 MO
as[i].x += as[i + m].x; // < 4 MO
as[i + m].x = y; // < 4 MO
}
}
const Mint invN = Mint(n).inv();
for (int i = 0; i < n; ++i) {
as[i] *= invN;
}
}
void fft(vector<Mint> &as) {
fft(as.data(), as.size());
}
void invFft(vector<Mint> &as) {
invFft(as.data(), as.size());
}
vector<Mint> convolve(vector<Mint> as, vector<Mint> bs) {
if (as.empty() || bs.empty()) return {};
const int len = as.size() + bs.size() - 1;
int n = 1;
for (; n < len; n <<= 1) {}
as.resize(n); fft(as);
bs.resize(n); fft(bs);
for (int i = 0; i < n; ++i) as[i] *= bs[i];
invFft(as);
as.resize(len);
return as;
}
vector<Mint> square(vector<Mint> as) {
if (as.empty()) return {};
const int len = as.size() + as.size() - 1;
int n = 1;
for (; n < len; n <<= 1) {}
as.resize(n); fft(as);
for (int i = 0; i < n; ++i) as[i] *= as[i];
invFft(as);
as.resize(len);
return as;
}
// m := |as|, n := |bs|
// cs[k] = \sum[i-j=k] as[i] bs[j] (0 <= k <= m-n)
// transpose of ((multiply by bs): K^[0,m-n] -> K^[0,m-1])
vector<Mint> middle(vector<Mint> as, vector<Mint> bs) {
const int m = as.size(), n = bs.size();
assert(m >= n); assert(n >= 1);
int len = 1;
for (; len < m; len <<= 1) {}
as.resize(len, 0);
fft(as);
std::reverse(bs.begin(), bs.end());
bs.resize(len, 0);
fft(bs);
for (int i = 0; i < len; ++i) as[i] *= bs[i];
invFft(as);
as.resize(m);
as.erase(as.begin(), as.begin() + (n - 1));
return as;
}
////////////////////////////////////////////////////////////////////////////////
/*
((L-1) - x) + ((L-1) + x-y) + y = 2(L-1)
[0, L-1] + [0, 2(L-1)] + [0, L-1] = [0, 4(L-1)]
use circular conv. of length 2L
*/
#ifdef LOCAL
// #define DEBUG
#endif
#ifdef DEBUG
constexpr int L = 4;
constexpr int MAX_K = 100;
#else
constexpr int L = 512;
constexpr int MAX_K = (300'000 + L - 1) / L;
#endif
int N, Q;
vector<Mint> A, B;
vector<int> X0, Y0, X1, Y1;
bitset<L> yoko[MAX_K][MAX_K], tate[MAX_K][MAX_K];
bitset<2*L> naname[MAX_K][MAX_K];
vector<pair<
pair<int, int>,
pair<int, int>
>> sankuai[MAX_K][MAX_K][3];
Mint single[2*L][2*L];
Mint prod[MAX_K][MAX_K][2*L];
char f[L][MAX_K * L];
int main() {
for (; ~scanf("%d%d", &N, &Q); ) {
A.resize(N); for (int x = 0; x < N; ++x) scanf("%u", &A[x].x);
B.resize(N); for (int y = 0; y < N; ++y) scanf("%u", &B[y].x);
X0.resize(Q);
Y0.resize(Q);
X1.resize(Q);
Y1.resize(Q);
for (int q = 0; q < Q; ++q) {
scanf("%d%d%d%d", &X0[q], &Y0[q], &X1[q], &Y1[q]);
--X0[q]; --Y0[q];
--X1[q]; --Y1[q];
if (make_pair(X0[q], Y0[q]) > make_pair(X1[q], Y1[q])) {
swap(X0[q], X1[q]);
swap(Y0[q], Y1[q]);
}
}
const int K = (N + L - 1) / L;
N = K * L;
A.resize(N, 0);
B.resize(N, 0);
for (int u = 0; u < K; ++u) for (int v = 0; v < K; ++v) yoko[u][v].reset();
for (int u = 0; u < K; ++u) for (int v = 0; v < K; ++v) tate[u][v].reset();
for (int u = 0; u < K; ++u) for (int v = 0; v < K; ++v) naname[u][v].reset();
for (int u = 0; u < K; ++u) for (int v = 0; v < K; ++v) for (int o = 0; o < 3; ++o) sankuai[u][v][o].clear();
auto san = [&](int o, int x0, int y0, int x1, int y1) -> void {
// cerr<<" [san] "<<o<<" "<<make_pair(x0,y0)<<" "<<make_pair(x1,y1)<<endl;
if (x0 <= x1 && y0 <= y1) {
assert(x0 / L == x1 / L);
assert(y0 / L == y1 / L);
sankuai[x0 / L][y0 / L][o].emplace_back(
make_pair(x0 % L, y0 % L),
make_pair(x1 % L, y1 % L)
);
}
};
for (int q = 0; q < Q; ++q) {
const int x0 = X0[q], y0 = Y0[q];
const int x1 = X1[q], y1 = Y1[q];
// cerr<<"q = "<<q<<"; "<<make_pair(x0,y0)<<" "<<make_pair(x1,y1)<<endl;
if (x0 == x1) {
const int u = x0 / L;
const int v0 = (y0 + L - 1) / L;
const int v1 = (y1 + 1) / L - 1;
if (v0 <= v1 + 1) {
san(0, x0, y0, x1, v0*L - 1);
san(0, x0, (v1+1)*L, x1, y1);
for (int v = v0; v <= v1; ++v) yoko[u][v].set(x0 - u*L);
} else {
san(0, x0, y0, x1, y1);
}
} else if (y0 == y1) {
const int v = y0 / L;
const int u0 = (x0 + L - 1) / L;
const int u1 = (x1 + 1) / L - 1;
if (u0 <= u1 + 1) {
san(1, x0, y0, u0*L - 1, y1);
san(1, (u1+1)*L, y0, x1, y1);
for (int u = u0; u <= u1; ++u) tate[u][v].set(y0 - v*L);
} else {
san(1, x0, y0, x1, y1);
}
} else {
assert(x0 - y0 == x1 - y1);
const int pre = min((x0 + L - 1) / L * L - x0, (y0 + L - 1) / L * L - y0);
const int suf = min(x1 - ((x1 + 1) / L * L - 1), y1 - ((y1 + 1) / L * L - 1));
// cerr<<" pre = "<<pre<<", suf = "<<suf<<endl;
if (pre + suf <= x1 - x0 + 1) {
san(2, x0, y0, x0 + pre - 1, y0 + pre - 1);
san(2, x1 - suf + 1, y1 - suf + 1, x1, y1);
const int u0 = (x0 + pre) / L, v0 = (y0 + pre) / L;
const int u1 = (x1 - suf) / L, v1 = (y1 - suf) / L;
const int z = (x0 + pre) % L - (y0 + pre) % L;
for (int i = 0; u0 + i <= u1 && v0 + i <= v1; ++i) naname[u0 + i][v0 + i].set((L-1) + z);
if (z > 0) for (int i = 0; u0 + i + 1 <= u1 && v0 + i <= v1; ++i) naname[u0 + i + 1][v0 + i].set((L-1) + z - L);
if (z < 0) for (int i = 0; u0 + i <= u1 && v0 + i + 1 <= v1; ++i) naname[u0 + i][v0 + i + 1].set((L-1) + z + L);
} else {
san(2, x0, y0, x1, y1);
}
}
}
/*
for(int u=0;u<K;++u)for(int v=0;v<K;++v){
cerr<<u<<" "<<v<<": ";
for(int x=0;x<L;++x)cerr<<yoko[u][v][x];cerr<<" ";
for(int y=0;y<L;++y)cerr<<tate[u][v][y];cerr<<" ";
for(int z=0;z<=2*(L-1);++z)cerr<<naname[u][v][z];cerr<<endl;
}
for(int u=0;u<K;++u)for(int v=0;v<K;++v)for(int o=0;o<3;++o)cerr<<"sankuai["<<u<<"]["<<v<<"]["<<o<<"] = "<<sankuai[u][v][o]<<endl;
//*/
for (int i = 0; i < 2*L; ++i) {
fill(single[i], single[i] + 2*L, 0);
single[i][i] = 1;
fft(single[i], 2*L);
}
for (int u = 0; u < K; ++u) for (int v = 0; v < K; ++v) {
fill(prod[u][v], prod[u][v] + 2*L, 1);
}
for (int u = 0; u < K; ++u) {
bitset<L> on;
vector<Mint> now(2*L, 0);
for (int v = 0; v < K; ++v) {
const auto diff = on ^ yoko[u][v];
for (int x = diff._Find_first(); x < L; x = diff._Find_next(x)) {
const Mint a = A[u*L + x];
if (!on[x] && yoko[u][v][x]) for (int i = 0; i < 2*L; ++i) now[i] += a * single[(L-1) - x][i];
if (on[x] && !yoko[u][v][x]) for (int i = 0; i < 2*L; ++i) now[i] -= a * single[(L-1) - x][i];
}
on = yoko[u][v];
for (int i = 0; i < 2*L; ++i) prod[u][v][i] *= now[i];
}
}
for (int v = 0; v < K; ++v) {
bitset<L> on;
vector<Mint> now(2*L, 0);
for (int u = 0; u < K; ++u) {
const auto diff = on ^ tate[u][v];
for (int y = diff._Find_first(); y < L; y = diff._Find_next(y)) {
const Mint b = B[v*L + y];
if (!on[y] && tate[u][v][y]) for (int i = 0; i < 2*L; ++i) now[i] += b * single[y][i];
if (on[y] && !tate[u][v][y]) for (int i = 0; i < 2*L; ++i) now[i] -= b * single[y][i];
}
on = tate[u][v];
for (int i = 0; i < 2*L; ++i) prod[u][v][i] *= now[i];
}
}
{
bitset<2*L> on;
vector<Mint> now(2*L, 0);
for (int w = -(K-1); w <= K-1; ++w) for (int v = 0; v < K; ++v) {
const int u = v + w;
if (0 <= u && u < K) {
const auto diff = on ^ naname[u][v];
for (int z = diff._Find_first(); z <= 2*(L-1); z = diff._Find_next(z)) {
if (!on[z] && naname[u][v][z]) for (int i = 0; i < 2*L; ++i) now[i] += single[z][i];
if (on[z] && !naname[u][v][z]) for (int i = 0; i < 2*L; ++i) now[i] -= single[z][i];
}
on = naname[u][v];
for (int i = 0; i < 2*L; ++i) prod[u][v][i] *= now[i];
}
}
}
vector<Mint> sum(2*L, 0);
for (int u = 0; u < K; ++u) for (int v = 0; v < K; ++v) {
for (int i = 0; i < 2*L; ++i) sum[i] += prod[u][v][i];
}
invFft(sum);
Mint ans = sum[2*(L-1)];
// cerr<<__LINE__<<": ans = "<<ans<<endl;
memset(f, 0, sizeof(f));
for (int u = 0; u < K; ++u) for (int v = 0; v < K; ++v) {
auto add = [&](int x, int y, int g) -> void {
if (!f[x][y]) {
if (yoko[u][v][x]) f[x][y] |= 1;
if (tate[u][v][y]) f[x][y] |= 2;
if (naname[u][v][(L-1) + x - y]) f[x][y] |= 4;
}
if (f[x][y] != 7) {
if ((f[x][y] |= g) == 7) {
// cerr<<"[add] "<<u<<" "<<v<<" "<<x<<" "<<y<<"; "<<A[u*L+x]<<" * "<<B[v*L+y]<<endl;
ans += A[u*L + x] * B[v*L + y];
}
}
};
auto rem = [&](int x, int y, int g) -> void {
f[x][y] = 0;
};
for (const auto &seg : sankuai[u][v][0]) {
const int x0 = seg.first .first, y0 = seg.first .second;
const int x1 = seg.second.first, y1 = seg.second.second;
for (int y = y0; y <= y1; ++y) add(x0, y, 1);
}
for (const auto &seg : sankuai[u][v][1]) {
const int x0 = seg.first .first, y0 = seg.first .second;
const int x1 = seg.second.first, y1 = seg.second.second;
for (int x = x0; x <= x1; ++x) add(x, y0, 2);
}
for (const auto &seg : sankuai[u][v][2]) {
const int x0 = seg.first .first, y0 = seg.first .second;
const int x1 = seg.second.first, y1 = seg.second.second;
for (int i = 0; i <= x1 - x0; ++i) add(x0 + i, y0 + i, 4);
}
for (const auto &seg : sankuai[u][v][0]) {
const int x0 = seg.first .first, y0 = seg.first .second;
const int x1 = seg.second.first, y1 = seg.second.second;
for (int y = y0; y <= y1; ++y) rem(x0, y, 1);
}
for (const auto &seg : sankuai[u][v][1]) {
const int x0 = seg.first .first, y0 = seg.first .second;
const int x1 = seg.second.first, y1 = seg.second.second;
for (int x = x0; x <= x1; ++x) rem(x, y0, 2);
}
for (const auto &seg : sankuai[u][v][2]) {
const int x0 = seg.first .first, y0 = seg.first .second;
const int x1 = seg.second.first, y1 = seg.second.second;
for (int i = 0; i <= x1 - x0; ++i) rem(x0 + i, y0 + i, 4);
}
}
printf("%u\n", ans.x);
#ifdef DEBUG
vector<vector<int>>has(N,vector<int>(N,0));
for(int q=0;q<Q;++q){
if(X0[q]==X1[q])for(int y=Y0[q];y<=Y1[q];++y)has[X0[q]][y]|=1;
if(Y0[q]==Y1[q])for(int x=X0[q];x<=X1[q];++x)has[x][Y0[q]]|=2;
if(X0[q]-Y0[q]==X1[q]-Y1[q])for(int i=0;i<=X1[q]-X0[q];++i)has[X0[q]+i][Y0[q]+i]|=4;
}
Mint brt=0;
for(int x=0;x<N;++x)for(int y=0;y<N;++y)if(has[x][y]==7)brt+=A[x]*B[y];
if(brt!=ans){
for(int x=0;x<N;++x)pv(has[x].begin(),has[x].end());
cerr<<"brt = "<<brt<<endl;
cerr<<"ans = "<<ans<<endl;
assert(false);
}
#endif
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 20ms
memory: 189456kb
input:
5 3 1 2 3 4 5 1 2 3 4 5 1 3 5 3 3 5 3 1 5 5 1 1
output:
9
result:
ok 1 number(s): "9"
Test #2:
score: -100
Wrong Answer
time: 32ms
memory: 189200kb
input:
300 300 359223646 353333050 638758992 902678193 564238503 602976356 362568978 374624692 448100347 222736350 534637089 415043929 139304846 34636504 531794165 971218681 521043008 209728084 893019853 902111971 183666857 556720993 69534269 291223272 391710121 979856021 345864729 814088883 148475024 1243...
output:
790519740
result:
wrong answer 1st numbers differ - expected: '523692978', found: '790519740'