QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#280986 | #4811. Be Careful | zhangmj2008 | WA | 630ms | 8352kb | C++14 | 21.0kb | 2023-12-09 19:20:53 | 2023-12-09 19:20:54 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll; typedef unsigned long long ull;
const int INF = 1e9; const ll LLNF = 4e18;
template< class Tp > void chkmax( Tp &x , Tp y ) { x = max( x , y ); }
template< class Tp > void chkmin( Tp &x , Tp y ) { x = min( x , y ); }
namespace atcoder {
namespace internal {
// @param n `0 <= n`
// @return minimum non-negative `x` s.t. `n <= 2**x`
int ceil_pow2(int n) {
int x = 0;
while ((1U << x) < (unsigned int)(n)) x++;
return x;
}
// @param n `1 <= n`
// @return minimum non-negative `x` s.t. `(n & (1 << x)) != 0`
int bsf(unsigned int n) {
#ifdef _MSC_VER
unsigned long index;
_BitScanForward(&index, n);
return index;
#else
return __builtin_ctz(n);
#endif
}
} // namespace internal
} // namespace atcoder
namespace atcoder {
namespace internal {
#ifndef _MSC_VER
template <class T>
using is_signed_int128 =
typename std::conditional<std::is_same<T, __int128_t>::value ||
std::is_same<T, __int128>::value,
std::true_type,
std::false_type>::type;
template <class T>
using is_unsigned_int128 =
typename std::conditional<std::is_same<T, __uint128_t>::value ||
std::is_same<T, unsigned __int128>::value,
std::true_type,
std::false_type>::type;
template <class T>
using make_unsigned_int128 =
typename std::conditional<std::is_same<T, __int128_t>::value,
__uint128_t,
unsigned __int128>;
template <class T>
using is_integral = typename std::conditional<std::is_integral<T>::value ||
is_signed_int128<T>::value ||
is_unsigned_int128<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using is_signed_int = typename std::conditional<(is_integral<T>::value &&
std::is_signed<T>::value) ||
is_signed_int128<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using is_unsigned_int =
typename std::conditional<(is_integral<T>::value &&
std::is_unsigned<T>::value) ||
is_unsigned_int128<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using to_unsigned = typename std::conditional<
is_signed_int128<T>::value,
make_unsigned_int128<T>,
typename std::conditional<std::is_signed<T>::value,
std::make_unsigned<T>,
std::common_type<T>>::type>::type;
#else
template <class T> using is_integral = typename std::is_integral<T>;
template <class T>
using is_signed_int =
typename std::conditional<is_integral<T>::value && std::is_signed<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using is_unsigned_int =
typename std::conditional<is_integral<T>::value &&
std::is_unsigned<T>::value,
std::true_type,
std::false_type>::type;
template <class T>
using to_unsigned = typename std::conditional<is_signed_int<T>::value,
std::make_unsigned<T>,
std::common_type<T>>::type;
#endif
template <class T>
using is_signed_int_t = std::enable_if_t<is_signed_int<T>::value>;
template <class T>
using is_unsigned_int_t = std::enable_if_t<is_unsigned_int<T>::value>;
template <class T> using to_unsigned_t = typename to_unsigned<T>::type;
} // namespace internal
} // namespace atcoder
namespace atcoder {
namespace internal {
// @param m `1 <= m`
// @return x mod m
constexpr long long safe_mod(long long x, long long m) {
x %= m;
if (x < 0) x += m;
return x;
}
// Fast modular multiplication by barrett reduction
// Reference: https://en.wikipedia.org/wiki/Barrett_reduction
// NOTE: reconsider after Ice Lake
struct barrett {
unsigned int _m;
unsigned long long im;
// @param m `1 <= m < 2^31`
barrett(unsigned int m) : _m(m), im((unsigned long long)(-1) / m + 1) {}
// @return m
unsigned int umod() const { return _m; }
// @param a `0 <= a < m`
// @param b `0 <= b < m`
// @return `a * b % m`
unsigned int mul(unsigned int a, unsigned int b) const {
// [1] m = 1
// a = b = im = 0, so okay
// [2] m >= 2
// im = ceil(2^64 / m)
// -> im * m = 2^64 + r (0 <= r < m)
// let z = a*b = c*m + d (0 <= c, d < m)
// a*b * im = (c*m + d) * im = c*(im*m) + d*im = c*2^64 + c*r + d*im
// c*r + d*im < m * m + m * im < m * m + 2^64 + m <= 2^64 + m * (m + 1) < 2^64 * 2
// ((ab * im) >> 64) == c or c + 1
unsigned long long z = a;
z *= b;
#ifdef _MSC_VER
unsigned long long x;
_umul128(z, im, &x);
#else
unsigned long long x =
(unsigned long long)(((unsigned __int128)(z)*im) >> 64);
#endif
unsigned int v = (unsigned int)(z - x * _m);
if (_m <= v) v += _m;
return v;
}
};
// @param n `0 <= n`
// @param m `1 <= m`
// @return `(x ** n) % m`
constexpr long long pow_mod_constexpr(long long x, long long n, int m) {
if (m == 1) return 0;
unsigned int _m = (unsigned int)(m);
unsigned long long r = 1;
unsigned long long y = safe_mod(x, m);
while (n) {
if (n & 1) r = (r * y) % _m;
y = (y * y) % _m;
n >>= 1;
}
return r;
}
// Reference:
// M. Forisek and J. Jancina,
// Fast Primality Testing for Integers That Fit into a Machine Word
// @param n `0 <= n`
constexpr bool is_prime_constexpr(int n) {
if (n <= 1) return false;
if (n == 2 || n == 7 || n == 61) return true;
if (n % 2 == 0) return false;
long long d = n - 1;
while (d % 2 == 0) d /= 2;
constexpr long long bases[3] = {2, 7, 61};
for (long long a : bases) {
long long t = d;
long long y = pow_mod_constexpr(a, t, n);
while (t != n - 1 && y != 1 && y != n - 1) {
y = y * y % n;
t <<= 1;
}
if (y != n - 1 && t % 2 == 0) {
return false;
}
}
return true;
}
template <int n> constexpr bool is_prime = is_prime_constexpr(n);
// @param b `1 <= b`
// @return pair(g, x) s.t. g = gcd(a, b), xa = g (mod b), 0 <= x < b/g
constexpr std::pair<long long, long long> inv_gcd(long long a, long long b) {
a = safe_mod(a, b);
if (a == 0) return {b, 0};
// Contracts:
// [1] s - m0 * a = 0 (mod b)
// [2] t - m1 * a = 0 (mod b)
// [3] s * |m1| + t * |m0| <= b
long long s = b, t = a;
long long m0 = 0, m1 = 1;
while (t) {
long long u = s / t;
s -= t * u;
m0 -= m1 * u; // |m1 * u| <= |m1| * s <= b
// [3]:
// (s - t * u) * |m1| + t * |m0 - m1 * u|
// <= s * |m1| - t * u * |m1| + t * (|m0| + |m1| * u)
// = s * |m1| + t * |m0| <= b
auto tmp = s;
s = t;
t = tmp;
tmp = m0;
m0 = m1;
m1 = tmp;
}
// by [3]: |m0| <= b/g
// by g != b: |m0| < b/g
if (m0 < 0) m0 += b / s;
return {s, m0};
}
// Compile time primitive root
// @param m must be prime
// @return primitive root (and minimum in now)
constexpr int primitive_root_constexpr(int m) {
if (m == 2) return 1;
if (m == 167772161) return 3;
if (m == 469762049) return 3;
if (m == 754974721) return 11;
if (m == 998244353) return 3;
int divs[20] = {};
divs[0] = 2;
int cnt = 1;
int x = (m - 1) / 2;
while (x % 2 == 0) x /= 2;
for (int i = 3; (long long)(i)*i <= x; i += 2) {
if (x % i == 0) {
divs[cnt++] = i;
while (x % i == 0) {
x /= i;
}
}
}
if (x > 1) {
divs[cnt++] = x;
}
for (int g = 2;; g++) {
bool ok = true;
for (int i = 0; i < cnt; i++) {
if (pow_mod_constexpr(g, (m - 1) / divs[i], m) == 1) {
ok = false;
break;
}
}
if (ok) return g;
}
}
template <int m> constexpr int primitive_root = primitive_root_constexpr(m);
} // namespace internal
} // namespace atcoder
namespace atcoder {
namespace internal {
struct modint_base {};
struct static_modint_base : modint_base {};
template <class T> using is_modint = std::is_base_of<modint_base, T>;
template <class T> using is_modint_t = std::enable_if_t<is_modint<T>::value>;
} // namespace internal
template <int m, std::enable_if_t<(1 <= m)>* = nullptr>
struct static_modint : internal::static_modint_base {
using mint = static_modint;
public:
static constexpr int mod() { return m; }
static mint raw(int v) {
mint x;
x._v = v;
return x;
}
static_modint() : _v(0) {}
template <class T, internal::is_signed_int_t<T>* = nullptr>
static_modint(T v) {
long long x = (long long)(v % (long long)(umod()));
if (x < 0) x += umod();
_v = (unsigned int)(x);
}
template <class T, internal::is_unsigned_int_t<T>* = nullptr>
static_modint(T v) {
_v = (unsigned int)(v % umod());
}
static_modint(bool v) { _v = ((unsigned int)(v) % umod()); }
unsigned int val() const { return _v; }
mint& operator++() {
_v++;
if (_v == umod()) _v = 0;
return *this;
}
mint& operator--() {
if (_v == 0) _v = umod();
_v--;
return *this;
}
mint operator++(int) {
mint result = *this;
++*this;
return result;
}
mint operator--(int) {
mint result = *this;
--*this;
return result;
}
mint& operator+=(const mint& rhs) {
_v += rhs._v;
if (_v >= umod()) _v -= umod();
return *this;
}
mint& operator-=(const mint& rhs) {
_v -= rhs._v;
if (_v >= umod()) _v += umod();
return *this;
}
mint& operator*=(const mint& rhs) {
unsigned long long z = _v;
z *= rhs._v;
_v = (unsigned int)(z % umod());
return *this;
}
mint& operator/=(const mint& rhs) { return *this = *this * rhs.inv(); }
mint operator+() const { return *this; }
mint operator-() const { return mint() - *this; }
mint pow(long long n) const {
assert(0 <= n);
mint x = *this, r = 1;
while (n) {
if (n & 1) r *= x;
x *= x;
n >>= 1;
}
return r;
}
mint inv() const {
if (prime) {
assert(_v);
return pow(umod() - 2);
} else {
auto eg = internal::inv_gcd(_v, m);
assert(eg.first == 1);
return eg.second;
}
}
friend mint operator+(const mint& lhs, const mint& rhs) {
return mint(lhs) += rhs;
}
friend mint operator-(const mint& lhs, const mint& rhs) {
return mint(lhs) -= rhs;
}
friend mint operator*(const mint& lhs, const mint& rhs) {
return mint(lhs) *= rhs;
}
friend mint operator/(const mint& lhs, const mint& rhs) {
return mint(lhs) /= rhs;
}
friend bool operator==(const mint& lhs, const mint& rhs) {
return lhs._v == rhs._v;
}
friend bool operator!=(const mint& lhs, const mint& rhs) {
return lhs._v != rhs._v;
}
private:
unsigned int _v;
static constexpr unsigned int umod() { return m; }
static constexpr bool prime = internal::is_prime<m>;
};
template <int id> struct dynamic_modint : internal::modint_base {
using mint = dynamic_modint;
public:
static int mod() { return (int)(bt.umod()); }
static void set_mod(int m) {
assert(1 <= m);
bt = internal::barrett(m);
}
static mint raw(int v) {
mint x;
x._v = v;
return x;
}
dynamic_modint() : _v(0) {}
template <class T, internal::is_signed_int_t<T>* = nullptr>
dynamic_modint(T v) {
long long x = (long long)(v % (long long)(mod()));
if (x < 0) x += mod();
_v = (unsigned int)(x);
}
template <class T, internal::is_unsigned_int_t<T>* = nullptr>
dynamic_modint(T v) {
_v = (unsigned int)(v % mod());
}
dynamic_modint(bool v) { _v = ((unsigned int)(v) % mod()); }
unsigned int val() const { return _v; }
mint& operator++() {
_v++;
if (_v == umod()) _v = 0;
return *this;
}
mint& operator--() {
if (_v == 0) _v = umod();
_v--;
return *this;
}
mint operator++(int) {
mint result = *this;
++*this;
return result;
}
mint operator--(int) {
mint result = *this;
--*this;
return result;
}
mint& operator+=(const mint& rhs) {
_v += rhs._v;
if (_v >= umod()) _v -= umod();
return *this;
}
mint& operator-=(const mint& rhs) {
_v += mod() - rhs._v;
if (_v >= umod()) _v -= umod();
return *this;
}
mint& operator*=(const mint& rhs) {
_v = bt.mul(_v, rhs._v);
return *this;
}
mint& operator/=(const mint& rhs) { return *this = *this * rhs.inv(); }
mint operator+() const { return *this; }
mint operator-() const { return mint() - *this; }
mint pow(long long n) const {
assert(0 <= n);
mint x = *this, r = 1;
while (n) {
if (n & 1) r *= x;
x *= x;
n >>= 1;
}
return r;
}
mint inv() const {
auto eg = internal::inv_gcd(_v, mod());
assert(eg.first == 1);
return eg.second;
}
friend mint operator+(const mint& lhs, const mint& rhs) {
return mint(lhs) += rhs;
}
friend mint operator-(const mint& lhs, const mint& rhs) {
return mint(lhs) -= rhs;
}
friend mint operator*(const mint& lhs, const mint& rhs) {
return mint(lhs) *= rhs;
}
friend mint operator/(const mint& lhs, const mint& rhs) {
return mint(lhs) /= rhs;
}
friend bool operator==(const mint& lhs, const mint& rhs) {
return lhs._v == rhs._v;
}
friend bool operator!=(const mint& lhs, const mint& rhs) {
return lhs._v != rhs._v;
}
private:
unsigned int _v;
static internal::barrett bt;
static unsigned int umod() { return bt.umod(); }
};
template <int id> internal::barrett dynamic_modint<id>::bt = 998244353;
using modint998244353 = static_modint<998244353>;
using modint1000000007 = static_modint<1000000007>;
using modint = dynamic_modint<-1>;
namespace internal {
template <class T>
using is_static_modint = std::is_base_of<internal::static_modint_base, T>;
template <class T>
using is_static_modint_t = std::enable_if_t<is_static_modint<T>::value>;
template <class> struct is_dynamic_modint : public std::false_type {};
template <int id>
struct is_dynamic_modint<dynamic_modint<id>> : public std::true_type {};
template <class T>
using is_dynamic_modint_t = std::enable_if_t<is_dynamic_modint<T>::value>;
} // namespace internal
} // namespace atcoder
using modint = atcoder::modint998244353;
void solve( ) {
constexpr int N = 1000;
vector< modint > fact( N + 1 ); fact[0] = 1; for( int i = 1; i <= N; i ++ ) fact[i] = fact[i - 1] * i;
vector< modint > ifact( N + 1 ); ifact[N] = fact[N].inv( ); for( int i = N; i >= 1; i -- ) ifact[i - 1] = ifact[i] * i;
auto binom = [&] ( int n , int m ) -> modint { return ( m < 0 || m > n ) ? ( 0 ) : ( fact[n] * ifact[m] * ifact[n - m] ); } ;
auto fmt = [&] ( vector< modint > &x , int n , modint y ) -> void {
for( int i = 0; i < n; i ++ ) for( int S = 0; S < ( 1 << n ); S ++ ) if( ( S >> i ) & 1 )
x[S] += y * x[S & ~( 1 << i )];
} ;
int n; cin >> n;
vector< vector< int > > G( n + 1 ); for( int i = 1; i <= n - 1; i ++ ) { int u , v; cin >> u >> v; G[u].emplace_back( v ) , G[v].emplace_back( u ); }
vector< bool > vis( n + 1 ); vector< vector< int > > S( n + 1 ); vector< int > deg( n + 1 );
auto pre = [&] ( auto pre , int u ) -> void {
vis[u] = true;
for( int v : G[u] ) if( !vis[v] ) S[u].emplace_back( v ) , deg[u] ++ , pre( pre , v );
} ;
pre( pre , 1 );
vector< vector< modint > > f( n + 1 ); vector< int > siz( n + 1 );
auto work = [&] ( int u ) -> void {
int lim = deg[u];
int maxsizv = 0 , pleaf = 0; for( int v : S[u] ) chkmax( maxsizv , siz[v] ) , pleaf += ( deg[v] == 0 );
chkmin( lim , maxsizv + 1 + pleaf );
vector< modint > F( lim + 1 );
int C = 0; int M = INF;
for( int c = 0; c <= n; c ++ ) {
int m = c; for( int v : S[u] ) if( siz[v] >= c ) m ++;
if( M >= m ) M = m , C = c;
}
vector< vector< modint > > X , Y; int nX = 0 , nY = 0 , nZ = 0;
for( int v : S[u] ) {
if( siz[v] == -1 ) nZ ++;
else if( siz[v] <= C - 1 ) X.emplace_back( f[v] ) , nX ++;
else Y.emplace_back( f[v] ) , nY ++;
}
vector< modint > a( 1 << C );
for( int P = 0; P < ( 1 << C ); P ++ ) {
a[P] = ( __builtin_popcount( P ) & 1 ) ? ( -1 ) : ( 1 );
for( vector< modint > xi : X ) {
modint t = 0; for( int l = 0; l < ( int ) xi.size( ); l ++ ) if( ( P >> l ) & 1 ) t += xi[l];
a[P] *= t;
}
}
for( int p = 0; p < C; p ++ ) for( int P = 0; P < ( 1 << C ); P ++ ) if( ( P >> p ) & 1 )
a[P] += a[P & ~( 1 << p )];
for( int P = 0; P < ( 1 << C ); P ++ )
a[P] *= ( __builtin_popcount( P ) & 1 ) ? ( -1 ) : ( 1 );
for( int P = 0; P < ( 1 << C ); P ++ ) {
vector< vector< modint > > b( 1 << nY , vector< modint >( nZ + 1 ) ); b[0][0] = a[P];
for( int val = 0; val <= lim; val ++ ) {
for( int Y0 = 0; Y0 < ( 1 << nY ); Y0 ++ ) for( int Z0 = 0; Z0 <= nZ; Z0 ++ ) {
modint s = binom( nZ , Z0 ) * modint( n + 1 - val ).pow( nZ - Z0 );
for( int y = 0; y < nY; y ++ ) if( ( ~Y0 >> y ) & 1 ) {
modint t = 0; for( int l = val; l < ( int ) Y[y].size( ); l ++ ) t += Y[y][l];
s *= t;
}
F[val] += b[Y0][Z0] * s;
}
vector< vector< vector< modint > > > d( nZ + 1 , vector< vector< modint > >( nY + 1 , vector< modint >( 1 << nY ) ) );
for( int Z0 = 0; Z0 <= nZ; Z0 ++ ) for( int pY0 = 0; pY0 <= nY; pY0 ++ ) {
for( int Y0 = 0; Y0 < ( 1 << nY ); Y0 ++ ) if( __builtin_popcount( Y0 ) == pY0 ) d[Z0][pY0][Y0] = b[Y0][Z0];
fmt( d[Z0][pY0] , nY , 1 );
}
vector< vector< vector< modint > > > e( nZ + 1 , vector< vector< modint > >( nY + 1 , vector< modint >( 1 << nY ) ) );
for( int Zi = 0; Zi <= nZ; Zi ++ ) for( int pYi = 0; pYi <= nY; pYi ++ ) {
for( int Yi = 0; Yi < ( 1 << nY ); Yi ++ ) if( __builtin_popcount( Yi ) == pYi ) { e[Zi][pYi][Yi] = 1; for( int y = 0; y < nY; y ++ ) if( ( Yi >> y ) & 1 ) e[Zi][pYi][Yi] *= ( val < ( int ) Y[y].size( ) ? Y[y][val] : 0 ); }
fmt( e[Zi][pYi] , nY , 1 );
}
vector< vector< vector< modint > > > de( nZ + 1 , vector< vector< modint > >( nY + 1 , vector< modint >( 1 << nY ) ) );
for( int Z0 = 0; Z0 <= nZ; Z0 ++ ) for( int Zi = 0; Zi <= nZ; Zi ++ ) if( Z0 + Zi <= nZ )
for( int pY0 = 0; pY0 <= nY; pY0 ++ ) for( int pYi = 0; pYi <= nY; pYi ++ ) if( pY0 + pYi <= nY )
for( int Y = 0; Y < ( 1 << nY ); Y ++ )
de[Z0 + Zi][pY0 + pYi][Y] += binom( Z0 + Zi , Z0 ) * d[Z0][pY0][Y] * e[Zi][pYi][Y];
for( int Z = 0; Z <= nZ; Z ++ ) for( int pY = 0; pY <= nY; pY ++ )
fmt( de[Z][pY] , nY , -1 );
vector< vector< modint > > nb( 1 << nY , vector< modint >( nZ + 1 ) );
for( int Y = 0; Y < ( 1 << nY ); Y ++ ) for( int Z = 0; Z <= nZ; Z ++ ) {
nb[Y][Z] = de[Z][__builtin_popcount( Y )][Y];
if( ( ( P >> val ) & 1 ) == 0 ) nb[Y][Z] -= b[Y][Z];
}
b = nb;
}
}
f[u] = vector< modint >( lim + 1 );
for( int k = 0; k <= lim; k ++ ) f[u][k] = F[k] - ( k + 1 <= lim ? F[k + 1] : 0 );
while( !f[u].empty( ) && f[u].back( ) == 0 ) f[u].pop_back( );
siz[u] = ( int ) f[u].size( ) - 1;
} ;
auto dfs = [&] ( auto dfs , int u ) -> void {
for( int v : S[u] ) dfs( dfs , v );
if( deg[u] >= 1 ) work( u ); else siz[u] = -1;
} ;
dfs( dfs , 1 );
for( int k = 0; k <= n; k ++ ) cout << ( k <= siz[1] ? f[1][k].val( ) : 0 ) << "\n";
}
int main( ) {
ios::sync_with_stdio( 0 ), cin.tie( 0 ), cout.tie( 0 );
int T = 1; while( T -- ) solve( ); return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3628kb
input:
5 1 2 1 3 2 4 2 5
output:
55 127 34 0 0 0
result:
ok 6 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
8 1 2 1 3 1 4 1 5 1 6 6 7 6 8
output:
69632 265534 133905 47790 12636 1944 0 0 0
result:
ok 9 numbers
Test #3:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
3 1 2 2 3
output:
1 3 0 0
result:
ok 4 number(s): "1 3 0 0"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3916kb
input:
2 1 2
output:
2 1 0
result:
ok 3 number(s): "2 1 0"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
10 1 8 1 9 6 1 2 1 1 4 1 10 1 5 7 1 3 1
output:
1755647 612579511 359376750 200038110 104287680 49974120 21379680 7771680 2177280 362880 0
result:
ok 11 numbers
Test #6:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
10 2 8 2 9 6 2 2 1 2 4 2 10 2 5 7 2 3 2
output:
114358881 100000000 0 0 0 0 0 0 0 0 0
result:
ok 11 numbers
Test #7:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
10 7 8 8 9 6 5 2 1 3 4 9 10 4 5 7 6 3 2
output:
10 1 0 0 0 0 0 0 0 0 0
result:
ok 11 numbers
Test #8:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
10 3 6 2 4 4 9 8 4 2 5 10 5 3 7 2 1 1 3
output:
27510 31142 102399 0 0 0 0 0 0 0 0
result:
ok 11 numbers
Test #9:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
14 10 3 6 2 2 8 3 13 1 3 1 2 3 14 4 2 9 3 12 3 2 5 7 2 11 3
output:
930962871 780146137 253920328 0 0 0 0 0 0 0 0 0 0 0 0
result:
ok 15 numbers
Test #10:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
20 7 6 2 6 5 1 17 12 9 13 12 18 3 2 9 1 2 1 12 6 10 9 14 2 4 1 6 8 11 2 16 9 13 19 8 15 20 5
output:
572808214 694156482 763085092 958730326 465749894 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
result:
ok 21 numbers
Test #11:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
21 6 12 11 13 1 7 8 14 1 18 5 4 1 2 16 11 21 1 9 10 15 17 1 9 1 8 1 20 1 3 1 4 19 16 11 1 15 10 3 6
output:
778184256 242901486 277265229 855621813 564317020 918444623 408876720 314039448 593931360 0 0 0 0 0 0 0 0 0 0 0 0 0
result:
ok 22 numbers
Test #12:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
22 20 21 9 12 6 10 19 10 16 10 10 11 8 7 13 12 21 22 19 20 14 13 7 6 8 9 15 14 2 5 18 6 5 6 3 2 16 17 2 1 3 4
output:
142157709 5878180 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
result:
ok 23 numbers
Test #13:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
23 6 10 4 2 6 9 15 20 10 15 3 6 17 23 1 3 16 22 19 14 17 12 7 11 18 13 11 16 5 3 8 5 10 14 8 12 9 13 4 7 1 2 15 21
output:
7619809 175546557 7936610 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
result:
ok 24 numbers
Test #14:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
24 7 10 2 5 2 1 17 20 1 4 16 13 7 4 19 16 23 20 11 8 10 13 1 3 22 19 5 8 3 6 17 14 21 18 24 21 18 15 9 6 9 12 14 11 15 12
output:
24 576 15025 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
result:
ok 25 numbers
Test #15:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
24 22 16 17 11 15 9 13 7 8 2 1 3 5 1 6 12 9 3 14 8 21 15 17 23 19 13 7 1 24 18 2 1 5 11 1 4 4 10 18 12 20 14 10 16 1 6
output:
24 7962624 236177977 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
result:
ok 25 numbers
Test #16:
score: 0
Accepted
time: 50ms
memory: 3804kb
input:
200 1 199 95 1 1 75 177 1 66 1 157 1 85 1 1 193 1 26 8 1 38 1 151 1 1 56 63 1 1 138 1 59 190 1 1 36 1 120 156 1 115 1 1 118 171 1 6 1 113 1 20 1 83 1 1 176 33 1 153 1 1 169 22 1 1 159 1 27 87 1 1 129 1 44 174 1 1 93 77 1 1 122 1 125 1 23 1 81 112 1 173 1 1 51 32 1 96 1 184 1 116 1 67 1 1 94 1 104 19...
output:
211917199 369375874 201944418 582671162 183066248 639389350 952947539 137147613 216366713 398936459 73236543 354059031 727857197 121548413 610762100 573534011 706945631 286154195 226699593 267771858 823273748 233587424 176942776 226493975 707601105 339075191 694353149 944734662 932707579 934386415 4...
result:
ok 201 numbers
Test #17:
score: 0
Accepted
time: 49ms
memory: 3716kb
input:
200 2 199 95 2 2 75 177 2 66 2 157 2 85 2 2 193 2 26 8 2 38 2 151 2 2 56 63 2 2 138 2 59 190 2 2 36 2 120 156 2 115 2 2 118 171 2 6 2 113 2 20 2 83 2 2 176 33 2 153 2 2 169 22 2 2 159 2 27 87 2 2 129 2 44 174 2 2 93 77 2 2 122 2 125 2 23 2 81 112 2 173 2 2 51 32 2 96 2 184 2 116 2 67 2 2 94 2 104 19...
output:
356210711 85910356 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 201 numbers
Test #18:
score: 0
Accepted
time: 1ms
memory: 3700kb
input:
200 198 199 95 94 74 75 177 176 66 65 157 156 85 84 192 193 25 26 8 7 38 37 151 150 55 56 63 62 137 138 58 59 190 189 35 36 119 120 156 155 115 114 117 118 171 170 6 5 113 112 20 19 83 82 175 176 33 32 153 152 168 169 22 21 158 159 26 27 87 86 128 129 43 44 174 173 92 93 77 76 121 122 124 125 22 23 ...
output:
200 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 201 numbers
Test #19:
score: 0
Accepted
time: 1ms
memory: 3668kb
input:
199 176 177 115 116 47 48 29 30 120 119 7 8 93 94 158 159 118 117 28 29 185 186 133 132 24 25 76 77 55 54 68 69 96 95 65 66 172 171 114 113 127 128 91 92 106 107 70 71 135 136 83 82 187 188 146 147 23 22 36 37 195 196 166 165 81 80 109 108 8 9 21 20 41 42 125 124 46 47 87 86 133 134 38 37 174 173 12...
output:
1 199 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 200 numbers
Test #20:
score: 0
Accepted
time: 1ms
memory: 3720kb
input:
200 28 56 82 165 53 107 94 188 67 134 51 102 69 139 18 37 10 20 33 66 179 89 156 78 53 106 93 186 113 56 9 19 8 16 65 130 33 16 41 82 37 74 197 98 26 53 18 36 195 97 30 60 132 66 81 162 61 30 40 81 26 52 168 84 79 39 128 64 27 54 68 136 91 45 40 20 122 61 108 54 3 6 118 59 91 182 177 88 15 31 133 66...
output:
115157040 769068498 218666068 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 201 numbers
Test #21:
score: 0
Accepted
time: 1ms
memory: 3952kb
input:
200 51 153 118 39 23 68 26 9 163 54 7 2 21 62 174 58 125 42 50 150 15 46 32 95 186 62 53 158 7 22 29 88 165 55 47 140 9 3 18 6 20 59 131 44 90 30 149 50 35 12 11 32 15 5 4 13 110 37 160 53 3 10 51 152 154 51 37 12 94 31 119 40 49 146 196 65 16 48 46 138 4 12 116 39 74 25 27 81 105 35 61 182 18 55 19...
output:
96831322 243739289 839032182 347339046 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 201 numbers
Test #22:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
200 4 1 40 159 6 22 16 65 7 29 7 2 10 39 103 26 24 97 180 45 24 6 47 186 50 200 140 35 15 61 10 38 127 32 93 23 18 73 185 46 23 91 29 115 126 32 35 9 120 30 22 86 20 79 7 27 35 139 148 37 26 105 18 70 198 50 190 48 136 34 147 37 25 98 39 155 40 158 199 50 67 17 75 19 8 2 109 27 160 40 176 44 23 90 1...
output:
868579713 768926703 473674519 835466001 35818891 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 201 numbers
Test #23:
score: 0
Accepted
time: 2ms
memory: 3720kb
input:
200 124 21 53 9 5 28 33 199 145 24 20 119 24 140 31 5 86 15 30 176 12 69 172 29 116 20 14 3 11 66 3 15 75 13 13 76 144 24 79 13 72 12 80 14 1 7 70 12 23 135 178 30 33 197 30 179 9 55 27 159 18 3 25 151 11 62 18 107 82 14 30 180 23 138 31 182 16 94 97 16 93 16 173 29 32 190 10 2 8 2 18 104 6 35 111 1...
output:
298503373 243520600 324348437 233414660 209600209 600025942 504289019 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 201 numbers
Test #24:
score: 0
Accepted
time: 18ms
memory: 3980kb
input:
200 6 61 5 47 14 141 16 161 144 15 48 5 115 12 147 15 175 18 19 186 86 9 75 8 109 11 158 16 169 17 62 7 135 14 97 10 1 6 3 23 9 87 42 5 73 8 20 200 152 16 14 132 90 9 21 2 4 34 4 37 181 18 71 7 1 9 84 9 180 18 56 6 127 13 6 52 12 121 137 14 7 64 11 105 156 16 15 146 6 59 1 4 83 9 8 74 6 60 69 7 10 1...
output:
107615921 75193607 506753286 400364397 127708406 597309377 407829846 269700097 404852842 311884298 159659723 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 201 numbers
Test #25:
score: 0
Accepted
time: 58ms
memory: 4604kb
input:
200 83 7 8 92 107 9 31 3 19 2 6 72 140 12 186 16 22 2 131 11 6 66 14 169 21 2 120 10 16 193 39 4 85 7 15 177 155 13 183 16 176 15 4 47 4 38 110 10 12 143 3 37 11 122 171 15 69 6 195 17 9 102 144 12 158 14 1 8 166 14 117 10 13 154 179 15 17 194 88 8 6 64 2 23 15 181 14 160 17 197 173 15 81 7 147 13 8...
output:
820487232 168056104 389303904 786803166 747859949 163201436 184471655 286943236 734039879 217802148 477672105 313993286 576453384 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 201 numbers
Test #26:
score: 0
Accepted
time: 139ms
memory: 5704kb
input:
200 101 8 56 5 140 11 15 193 10 129 5 54 6 68 200 16 13 161 13 169 170 13 162 13 102 8 134 11 1 6 130 10 3 33 15 188 2 17 13 163 71 6 4 51 22 2 149 12 8 96 3 30 7 82 143 11 34 3 119 10 6 76 67 6 46 4 9 108 78 6 113 9 4 50 11 132 3 29 172 14 13 167 16 199 5 62 4 1 144 11 10 121 26 2 15 194 11 1 39 3 ...
output:
941560284 156408143 117860855 71504118 286002901 82236540 656386501 984288699 392292354 375678581 525101177 448561345 88856629 222487029 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 201 numbers
Test #27:
score: 0
Accepted
time: 336ms
memory: 8208kb
input:
200 50 4 2 21 175 13 181 13 13 178 9 121 2 17 2 22 169 12 1 5 5 62 11 1 10 138 141 10 185 14 85 6 70 5 3 40 109 8 9 124 67 5 173 13 180 13 42 3 15 199 81 6 7 87 3 39 2 24 79 6 9 117 143 11 187 14 8 111 14 191 12 162 72 6 6 1 184 14 12 166 149 11 1 2 125 9 3 31 192 14 2 26 37 3 4 54 6 73 10 128 76 6 ...
output:
306791307 41136979 825727064 348896251 156923421 279326908 271414153 908884019 949859290 556906447 15321817 192929720 228240965 575859246 416336706 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 201 numbers
Test #28:
score: 0
Accepted
time: 630ms
memory: 8352kb
input:
200 80 6 161 11 171 12 1 8 149 10 199 14 3 35 23 2 10 137 181 12 14 197 194 13 6 1 170 12 11 163 40 3 2 22 98 7 2 1 112 8 13 189 10 146 5 75 152 11 4 60 7 1 1 12 5 68 13 195 7 96 5 1 7 99 191 13 192 13 85 6 12 180 8 115 84 6 5 65 62 5 7 94 12 176 7 93 91 6 13 193 52 4 97 7 169 12 175 12 119 8 27 2 1...
output:
375700468 841467400 95878319 402414369 68557938 507243391 676135012 644304562 901473491 929659471 585508574 712959512 934381768 127474324 178642636 136722763 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 201 numbers
Test #29:
score: 0
Accepted
time: 621ms
memory: 6812kb
input:
200 5 67 12 183 27 2 61 4 3 42 11 1 9 145 195 13 70 5 6 88 90 6 9 131 11 177 150 10 9 134 181 12 6 91 66 5 8 117 41 3 13 194 12 192 5 79 8 116 153 10 57 4 11 167 11 174 5 68 8 114 104 7 10 160 4 63 111 7 2 33 8 128 1 12 7 106 84 6 10 146 64 4 9 142 6 86 2 28 196 13 11 169 69 5 3 49 180 12 197 13 44 ...
output:
454407602 674233339 454140458 700043053 911075695 40301477 62906126 431577241 416730741 66443526 398638542 414791907 770049972 283660406 297155821 660719567 642885794 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 201 numbers
Test #30:
score: 0
Accepted
time: 410ms
memory: 5092kb
input:
200 11 198 5 83 147 8 2 25 151 8 100 6 11 195 10 190 2 32 106 6 129 7 97 6 2 24 10 191 8 150 45 3 86 5 9 156 42 3 78 5 163 9 8 142 1 16 11 196 135 8 80 5 107 6 6 103 145 8 11 1 8 140 10 174 5 85 8 139 10 183 120 7 5 93 9 159 20 1 171 9 185 10 10 175 5 84 96 5 179 10 6 111 9 165 47 3 4 65 10 173 68 4...
output:
193649645 70858212 117077553 972546030 132069817 476552562 7144257 322512914 697824020 128753868 398911725 186468018 642094064 222958766 245919119 683616925 245324017 957573487 310792461 691433383 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 201 numbers
Test #31:
score: 0
Accepted
time: 248ms
memory: 4448kb
input:
200 59 3 3 46 9 180 49 3 31 2 4 66 187 10 7 132 35 2 7 122 117 6 10 188 197 10 1 18 4 72 9 177 107 6 5 83 82 5 198 10 5 93 1 8 6 109 8 156 20 1 141 7 133 7 1 10 4 76 10 186 30 2 94 5 4 74 152 8 1 19 9 171 3 45 65 4 145 8 143 8 189 10 161 8 48 3 163 9 13 1 127 7 3 44 194 10 55 3 1 21 4 1 81 4 2 24 8 ...
output:
710868772 164314667 884964622 975464568 409864565 201789956 689019709 595324454 388273171 607706268 428445229 156837390 750235524 920745519 846235936 448135763 701107222 850826991 373542500 109127930 11115067 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 201 numbers
Test #32:
score: 0
Accepted
time: 299ms
memory: 4484kb
input:
200 109 6 89 5 10 194 7 131 5 92 4 66 78 4 160 8 8 155 172 9 2 41 8 165 7 137 5 87 8 166 180 9 1 2 111 6 2 36 6 123 2 43 125 6 8 161 40 2 46 3 77 4 30 2 4 67 124 6 9 186 200 10 7 1 94 5 57 3 6 122 1 5 5 96 3 50 27 2 48 3 175 9 149 8 10 195 7 143 2 39 145 7 8 159 7 148 1 15 193 10 47 3 197 10 3 62 3 ...
output:
589299572 711374004 615598294 983529100 358673338 312937893 930608366 909949430 977618408 932093348 577149932 707746443 251092517 346761579 29623312 413323345 120814904 78533207 378550832 296015215 828125562 872771575 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 201 numbers
Test #33:
score: 0
Accepted
time: 354ms
memory: 4524kb
input:
200 34 2 2 24 3 52 147 7 181 9 6 117 157 8 73 4 135 7 6 113 3 61 194 9 140 7 9 189 51 3 56 3 4 76 167 8 7 151 148 7 121 6 43 2 110 5 160 8 5 1 134 7 162 8 8 165 180 9 5 100 7 142 1 22 126 6 5 94 161 8 159 8 47 3 193 9 8 163 5 102 9 184 95 5 154 7 93 5 2 33 9 185 190 9 6 119 13 1 4 69 50 3 192 9 6 12...
output:
657825616 670287277 620562235 736801593 620581720 228667287 251139676 782759940 459024714 306272751 821693501 314901003 862367800 178756849 980118605 883290020 115363626 435098615 641796307 845444375 940816514 175663934 691200571 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 201 numbers
Test #34:
score: 0
Accepted
time: 31ms
memory: 3768kb
input:
200 3 134 193 4 87 2 176 4 72 2 4 169 18 1 42 1 108 3 3 129 1 20 15 1 3 130 1 29 162 4 2 94 149 3 3 133 4 172 1 17 2 56 75 2 1 12 154 4 31 1 5 1 64 2 2 70 165 4 199 4 57 2 90 2 105 3 1 21 4 178 4 195 109 3 117 3 3 150 3 142 4 183 61 2 49 1 38 1 1 16 2 74 192 4 121 3 131 3 185 4 4 188 194 4 110 3 1 2...
output:
46240861 498171459 402036732 579388118 259125433 495589906 429698219 340722708 733610152 358173413 119793681 838693192 45543933 397258724 448293950 500014466 198818313 858870106 446869816 546921778 553128778 477830275 625303924 572890740 503018381 712825198 53316664 494664316 821189148 409097501 223...
result:
ok 201 numbers
Test #35:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
200 14 199 95 9 8 75 177 13 66 8 157 12 85 9 13 193 5 26 8 2 38 6 151 12 7 56 63 7 11 138 7 59 190 13 6 36 10 120 156 12 115 10 10 118 171 13 6 2 113 10 20 4 83 9 13 176 33 5 153 12 13 169 22 4 12 159 5 27 87 9 11 129 6 44 174 13 9 93 77 8 11 122 11 125 4 23 9 81 112 10 173 13 7 51 32 5 96 9 184 13 ...
output:
552182524 796256111 780619245 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 201 numbers
Test #36:
score: 0
Accepted
time: 1ms
memory: 3736kb
input:
200 183 17 96 179 28 138 95 40 41 10 172 14 22 40 111 147 124 55 56 82 91 15 46 149 32 9 22 48 3 2 26 45 19 133 62 10 167 66 111 166 34 37 171 133 173 130 15 69 119 126 25 21 14 16 6 28 16 108 3 99 42 27 39 44 5 11 83 57 164 115 190 4 74 160 23 19 20 21 48 123 100 118 188 48 13 59 55 72 152 135 132 ...
output:
502325211 397619682 444276060 938021691 869851039 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 201 numbers
Test #37:
score: -100
Wrong Answer
time: 111ms
memory: 3736kb
input:
200 1 23 20 12 1 103 122 1 142 40 105 1 164 41 196 1 1 83 1 16 41 31 55 41 173 1 82 81 46 49 12 1 163 177 96 61 139 1 53 48 2 1 179 123 1 113 48 87 114 1 66 12 26 5 198 146 61 1 13 50 75 1 128 1 28 1 120 1 1 150 151 1 1 140 1 129 33 10 1 193 1 81 2 126 60 50 123 155 85 1 1 71 124 16 69 1 94 15 195 4...
output:
756486061 432597718 834856165 538897905 637157314 330778730 994332114 774959646 694860402 620168155 318344771 140066635 478673837 296859826 93676003 952475290 436328849 560680066 94945155 129366422 202481039 858161049 549877490 481538365 273161227 864676976 462811795 352357809 669778072 59370993 883...
result:
wrong answer 33rd numbers differ - expected: '40498911', found: '704678597'