QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#438220#8795. Mysterious SequenceTobo#AC ✓11ms8092kbC++2011.6kb2024-06-10 14:09:012024-06-10 14:09:03

Judging History

你现在查看的是最新测评结果

  • [2024-06-10 14:09:03]
  • 评测
  • 测评结果:AC
  • 用时:11ms
  • 内存:8092kb
  • [2024-06-10 14:09:01]
  • 提交

answer

#include <bits/stdc++.h>
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("avx2")
// #pragma GCC optimize(3, "inline")
// #include <ext/pb_ds/tree_policy.hpp>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
// tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> s;
using i64 = long long;
using u32 = unsigned int;
using u64 = unsigned long long;
using i128 = __int128_t;
using namespace std;
const int N = 2e5 + 5;
// const int B = 3e6;
// const int M = 2e6 + 5;
// const int base = 16;
const i64 base = 13131;
// const int mod = 998244353;
// const int mod = 1e9 + 7;
const i64 mod = 1000000000000000003LL;
// const double pi = acos(-1);
mt19937_64 rnd(chrono::duration_cast<chrono::nanoseconds>(chrono::system_clock::now().time_since_epoch()).count());

template <int mod>
unsigned int down(unsigned int x)
{
    return x >= mod ? x - mod : x;
}
template <int mod>
struct Modint
{
    unsigned int x;
    Modint() = default;
    Modint(unsigned int x) : x(x) {}
    friend istream &operator>>(istream &in, Modint &a) { return in >> a.x; }
    friend ostream &operator<<(ostream &out, Modint a) { return out << a.x; }
    friend Modint operator+(Modint a, Modint b) { return down<mod>(a.x + b.x); }
    friend Modint operator-(Modint a, Modint b) { return down<mod>(a.x - b.x + mod); }
    friend Modint operator*(Modint a, Modint b) { return 1ULL * a.x * b.x % mod; }
    friend Modint operator/(Modint a, Modint b) { return a * ~b; }
    friend Modint operator^(Modint a, int b)
    {
        Modint ans = 1;
        for (; b; b >>= 1, a *= a)
            if (b & 1)
                ans *= a;
        return ans;
    }
    friend Modint operator~(Modint a) { return a ^ (mod - 2); }
    friend Modint operator-(Modint a) { return down<mod>(mod - a.x); }
    friend Modint &operator+=(Modint &a, Modint b) { return a = a + b; }
    friend Modint &operator-=(Modint &a, Modint b) { return a = a - b; }
    friend Modint &operator*=(Modint &a, Modint b) { return a = a * b; }
    friend Modint &operator/=(Modint &a, Modint b) { return a = a / b; }
    friend Modint &operator^=(Modint &a, int b) { return a = a ^ b; }
    friend Modint &operator++(Modint &a) { return a += 1; }
    friend Modint operator++(Modint &a, int)
    {
        Modint x = a;
        a += 1;
        return x;
    }
    friend Modint &operator--(Modint &a) { return a -= 1; }
    friend Modint operator--(Modint &a, int)
    {
        Modint x = a;
        a -= 1;
        return x;
    }
    friend bool operator==(Modint a, Modint b) { return a.x == b.x; }
    friend bool operator!=(Modint a, Modint b) { return !(a == b); }
};
typedef Modint<998244353> mint;
// typedef Modint<1000000007> mint;

template <typename T>
struct Fenwick
{
    int n;
    vector<T> a;
    Fenwick(int n = 0) { init(n); }
    void init(int n)
    {
        this->n = n;
        a.assign(n + 1, T());
    }
    void add(int x, T v)
    {
        for (int i = x; i <= n; i += i & -i)
            a[i] += v;
    }
    T sum(int x)
    {
        auto ans = T();
        for (int i = x; i; i -= i & -i)
            ans += a[i];
        return ans;
    }
    T rangeSum(int l, int r) { return sum(r) - sum(l - 1); }
    int kth(T k)
    {
        int x = 0;
        for (int i = 1 << std::__lg(n); i; i >>= 1)
        {
            if (x + i <= n && k >= a[x + i])
            {
                x += i;
                k -= a[x];
            }
        }
        return x;
    }
};

const int P = 998244353;
using i64 = long long;
using Poly = vector<int>;
/*---------------------------------------------------------------------------*/
#define MUL(a, b) (i64(a) * (b) % P)
#define ADD(a, b) (((a) += (b)) >= P ? (a) -= P : 0) // (a += b) %= P
#define SUB(a, b) (((a) -= (b)) < 0 ? (a) += P : 0)  // ((a -= b) += P) %= P
Poly getInv(int L)
{
    Poly inv(L);
    inv[1] = 1;
    for (int i = 2; i < L; i++)
        inv[i] = MUL((P - P / i), inv[P % i]);
    return inv;
}
int POW(i64 a, int b = P - 2, i64 x = 1)
{
    for (; b; b >>= 1, a = a * a % P)
        if (b & 1)
            x = x * a % P;
    return x;
}
auto inv = getInv(N);

namespace NTT
{
    const int g = 3;
    Poly Omega(int L)
    {
        int wn = POW(g, P / L);
        Poly w(L);
        w[L >> 1] = 1;
        for (int i = L / 2 + 1; i < L; i++)
            w[i] = MUL(w[i - 1], wn);
        for (int i = L / 2 - 1; i >= 1; i--)
            w[i] = w[i << 1];
        return w;
    }
    auto W = Omega(1 << 20); // Length
    void DIF(int *a, int n)
    {
        for (int k = n >> 1; k; k >>= 1)
            for (int i = 0, y; i < n; i += k << 1)
                for (int j = 0; j < k; ++j)
                    y = a[i + j + k], a[i + j + k] = MUL(a[i + j] - y + P, W[k + j]), ADD(a[i + j], y);
    }
    void IDIT(int *a, int n)
    {
        for (int k = 1; k < n; k <<= 1)
            for (int i = 0, x, y; i < n; i += k << 1)
                for (int j = 0; j < k; ++j)
                    x = a[i + j], y = MUL(a[i + j + k], W[k + j]),
                    a[i + j + k] = x - y < 0 ? x - y + P : x - y, ADD(a[i + j], y);
        int Inv = P - (P - 1) / n;
        for (int i = 0; i < n; i++)
            a[i] = MUL(a[i], Inv);
        reverse(a + 1, a + n);
    }
}
/*---------------------------------------------------------------------------*/
namespace Polynomial
{
    // basic operator
    int norm(int n) { return 1 << (__lg(n - 1) + 1); }
    void norm(Poly &a)
    {
        if (!a.empty())
            a.resize(norm(a.size()), 0);
        else
            a = {0};
    }
    void DFT(Poly &a) { NTT::DIF(a.data(), a.size()); }
    void IDFT(Poly &a) { NTT::IDIT(a.data(), a.size()); }
    Poly &dot(Poly &a, Poly &b)
    {
        for (int i = 0; i < a.size(); i++)
            a[i] = MUL(a[i], b[i]);
        return a;
    }

    // mul / div int
    Poly &operator*=(Poly &a, int b)
    {
        for (auto &x : a)
            x = MUL(x, b);
        return a;
    }
    Poly operator*(Poly a, int b) { return a *= b; }
    Poly operator*(int a, Poly b) { return b * a; }
    Poly &operator/=(Poly &a, int b) { return a *= POW(b); }
    Poly operator/(Poly a, int b) { return a /= b; }

    // Poly add / sub
    Poly &operator+=(Poly &a, Poly b)
    {
        a.resize(max(a.size(), b.size()));
        for (int i = 0; i < b.size(); i++)
            ADD(a[i], b[i]);
        return a;
    }
    Poly operator+(Poly a, Poly b) { return a += b; }
    Poly &operator-=(Poly &a, Poly b)
    {
        a.resize(max(a.size(), b.size()));
        for (int i = 0; i < b.size(); i++)
            SUB(a[i], b[i]);
        return a;
    }
    Poly operator-(Poly a, Poly b) { return a -= b; }

    // Poly mul
    Poly operator*(Poly a, Poly b)
    {
        int n = a.size() + b.size() - 1, L = norm(n);
        if (a.size() <= 8 || b.size() <= 8)
        {
            Poly c(n);
            for (int i = 0; i < a.size(); i++)
                for (int j = 0; j < b.size(); j++)
                    c[i + j] = (c[i + j] + (i64)a[i] * b[j]) % P;
            return c;
        }
        a.resize(L), b.resize(L);
        DFT(a), DFT(b), dot(a, b), IDFT(a);
        return a.resize(n), a;
    }

    // Poly inv
    Poly Inv2k(Poly a)
    { // |a| = 2 ^ k
        int n = a.size(), m = n >> 1;
        if (n == 1)
            return {POW(a[0])};
        Poly b = Inv2k(Poly(a.begin(), a.begin() + m)), c = b;
        b.resize(n), DFT(a), DFT(b), dot(a, b), IDFT(a);
        for (int i = 0; i < n; i++)
            a[i] = i < m ? 0 : P - a[i];
        DFT(a), dot(a, b), IDFT(a);
        return move(c.begin(), c.end(), a.begin()), a;
    }
    Poly Inv(Poly a)
    {
        int n = a.size();
        norm(a), a = Inv2k(a);
        return a.resize(n), a;
    }

    // Poly calculus
    Poly deriv(Poly a)
    {
        for (int i = 1; i < a.size(); i++)
            a[i - 1] = MUL(i, a[i]);
        return a.pop_back(), a;
    }
    Poly integ(Poly a)
    {
        a.push_back(0);
        for (int i = a.size() - 1; i >= 1; i--)
            a[i] = MUL(inv[i], a[i - 1]);
        return a[0] = 0, a;
    }

    // Poly ln
    Poly Ln(Poly a)
    {
        int n = a.size();
        a = deriv(a) * Inv(a);
        return a.resize(n - 1), integ(a);
    }

    // Poly exp
    Poly Exp(Poly a)
    {
        int n = a.size(), k = norm(n);
        Poly b = {1}, c, d;
        a.resize(k);
        for (int L = 2; L <= k; L <<= 1)
        {
            d = b, b.resize(L), c = Ln(b), c.resize(L);
            for (int i = 0; i < L; i++)
                c[i] = a[i] - c[i] + (a[i] < c[i] ? P : 0);
            ADD(c[0], 1), DFT(b), DFT(c), dot(b, c), IDFT(b);
            move(d.begin(), d.end(), b.begin());
        }
        return b.resize(n), b;
    }

    // Poly pow
    Poly Pow(Poly &a, int b) { return Exp(Ln(a) * b); } // a[0] = 1
    Poly Pow(Poly a, int b1, int b2)
    { // b1 = b % P, b2 = b % phi(P) and b >= n iff a[0] > 0
        /*
        a0 > 1 : f^k(x) = (f(x) * inv(a0))^k * a0^k
        a0 = 0 : 右移至第一个系数不为0的项,设为x^d,则f(x) / x^d,转化为问题一,然后乘上(x^d)^k
        */
        int n = a.size(), d = 0, k, a0;
        while (d < n && !a[d])
            ++d;
        if ((i64)d * b1 >= n)
            return Poly(n);
        a.erase(a.begin(), a.begin() + d); // f(x) / x^d
        a0 = a[0];
        k = POW(a0), norm(a *= k); // f(x) * inv(a0)
        a = Pow(a, b1) * POW(a0, b2);
        a.resize(n), d *= b1;
        for (int i = n - 1; i >= 0; i--)
            a[i] = i >= d ? a[i - d] : 0; // 乘上(x^d)^k
        return a;
    }
    Poly Pow(Poly a, string str)
    {
        const int Phi = P - 1;
        i64 k = 0, ol = 0, t = 0;
        for (int i = 0; i < str.size(); i++)
        {
            k = (k * 10 + str[i] - '0') % P, ol = (ol * 10 + str[i] - '0') % Phi;
            if (t <= P)
                t = (t * 10 + str[i] - '0');
        }
        if (k < P && t >= P)
            k += P;

        return Pow(a, k, ol);
    }
    pair<Poly, Poly> div(Poly f, Poly g)
    { // F(x) = G(x) * Q(x) + R(x)
        int n = f.size() - 1, m = g.size() - 1;
        if (n < m)
            return pair<Poly, Poly>{Poly{0}, f};

        Poly f_reverse = f, g_reverse = g;
        reverse(f_reverse.begin(), f_reverse.end());
        reverse(g_reverse.begin(), g_reverse.end());
        g_reverse.resize(n - m + 1);

        Poly q = f_reverse * Inv(g_reverse);
        q.resize(n - m + 1);
        reverse(q.begin(), q.end());

        Poly r(m), tmp = g * q;
        for (int i = 0; i < m; i++)
            r[i] = (f[i] - tmp[i] + P) % P;
        return pair<Poly, Poly>{q, r};
    }
}
using namespace Polynomial;

void solve()
{
    double A, B;
    cin >> A >> B;
    int n;
    cin >> n;
    vector<double> x(n + 1);
    cin >> x[1] >> x[n];
    vector<pair<double, double>> coef(n + 1);
    coef[1] = {0, 1}, coef[2] = {1, 0};
    for (int i = 3; i <= n; i++)
    {
        coef[i] = {A * coef[i - 1].first + B * coef[i - 2].first,
                   A * coef[i - 1].second + B * coef[i - 2].second};
    }
    x[2] = (x[n] - coef[n].second * x[1]) / coef[n].first;
    for (int i = 3; i < n; i++)
        x[i] = A * x[i - 1] + B * x[i - 2];
    for (int i = 1; i <= n; i++)
        cout << x[i] << '\n';
}
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 1;
    // cin >> t;
    cout << fixed << setprecision(15);
    while (t--)
        solve();
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 3ms
memory: 8012kb

input:

1.0 1.0 10 1 10

output:

1.000000000000000
-0.323529411764706
0.676470588235294
0.352941176470588
1.029411764705882
1.382352941176471
2.411764705882353
3.794117647058824
6.205882352941178
10.000000000000000

result:

ok 10 numbers

Test #2:

score: 0
Accepted
time: 3ms
memory: 7900kb

input:

1 1 2 1 100

output:

1.000000000000000
100.000000000000000

result:

ok 2 numbers

Test #3:

score: 0
Accepted
time: 0ms
memory: 7864kb

input:

1 1 5 50 100

output:

50.000000000000000
0.000000000000000
50.000000000000000
50.000000000000000
100.000000000000000

result:

ok 5 numbers

Test #4:

score: 0
Accepted
time: 5ms
memory: 8012kb

input:

0.25 0.25 10 1 1

output:

1.000000000000000
55.875536480686698
14.218884120171674
17.523605150214593
7.935622317596566
6.364806866952790
3.575107296137339
2.484978540772532
1.515021459227468
1.000000000000000

result:

ok 10 numbers

Test #5:

score: 0
Accepted
time: 2ms
memory: 8040kb

input:

0.25 0.63 6 93 12

output:

93.000000000000000
-14.204807958665043
55.038798010333743
4.810670488624458
35.877110368666372
12.000000000000000

result:

ok 6 numbers

Test #6:

score: 0
Accepted
time: 5ms
memory: 8044kb

input:

0.25 0.80 10 5 63

output:

5.000000000000000
78.769536183531358
23.692384045882839
68.938724958295793
36.188588476280216
64.198127085706687
45.000402552450851
62.608602306678065
51.652472618630199
63.000000000000000

result:

ok 10 numbers

Test #7:

score: 0
Accepted
time: 3ms
memory: 8000kb

input:

0.25 0.99 3 18 30

output:

18.000000000000000
48.719999999999999
30.000000000000000

result:

ok 3 numbers

Test #8:

score: 0
Accepted
time: 5ms
memory: 7992kb

input:

0.28 0.64 9 6 10

output:

6.000000000000000
20.950403348507802
9.706112937582185
16.125969765568005
10.727183814411640
13.324232117998783
10.596182634263108
11.494439693112891
10.000000000000000

result:

ok 9 numbers

Test #9:

score: 0
Accepted
time: 3ms
memory: 7996kb

input:

0.31 0.40 7 10 49

output:

10.000000000000000
240.115063998688214
78.435669839593345
120.361083249749214
68.686203743259597
69.437156460310163
49.000000000000000

result:

ok 7 numbers

Test #10:

score: 0
Accepted
time: 2ms
memory: 7912kb

input:

0.32 0.28 5 36 6

output:

36.000000000000000
10.121376811594200
13.318840579710146
7.096014492753623
6.000000000000000

result:

ok 5 numbers

Test #11:

score: 0
Accepted
time: 0ms
memory: 7996kb

input:

0.35 0.65 10 86 82

output:

86.000000000000000
79.533924786230841
83.736873675180789
81.004956897363328
82.780702802944674
81.626467964316802
82.376720609424922
81.889056390104642
82.206038132662826
82.000000000000000

result:

ok 10 numbers

Test #12:

score: 0
Accepted
time: 6ms
memory: 8048kb

input:

0.36 0.68 8 72 59

output:

72.000000000000000
38.239918642605673
62.726370711338042
48.584638133053559
60.144401811609150
54.689538582655715
60.586427121650281
59.000000000000000

result:

ok 8 numbers

Test #13:

score: 0
Accepted
time: 6ms
memory: 8016kb

input:

0.43 0.61 2 93 84

output:

93.000000000000000
84.000000000000000

result:

ok 2 numbers

Test #14:

score: 0
Accepted
time: 2ms
memory: 7920kb

input:

0.46 0.96 6 65 35

output:

65.000000000000000
-16.617423662818052
54.755985115103698
9.235026436642375
56.813857871355040
35.000000000000000

result:

ok 6 numbers

Test #15:

score: 0
Accepted
time: 0ms
memory: 8016kb

input:

0.50 0.90 4 19 1

output:

19.000000000000000
-6.565217391304349
13.817391304347828
1.000000000000000

result:

ok 4 numbers

Test #16:

score: 0
Accepted
time: 3ms
memory: 8044kb

input:

0.54 0.35 3 16 22

output:

16.000000000000000
30.370370370370367
22.000000000000000

result:

ok 3 numbers

Test #17:

score: 0
Accepted
time: 5ms
memory: 8064kb

input:

0.55 0.89 10 74 13

output:

74.000000000000000
-48.321937076576525
39.282934607882908
-21.400909963817504
23.191311320916164
-6.291588641293689
17.179893322903858
3.849427436845739
17.407290147649590
13.000000000000000

result:

ok 10 numbers

Test #18:

score: 0
Accepted
time: 5ms
memory: 7864kb

input:

0.56 0.36 3 31 88

output:

31.000000000000000
137.214285714285694
88.000000000000000

result:

ok 3 numbers

Test #19:

score: 0
Accepted
time: 5ms
memory: 8004kb

input:

0.57 0.93 7 71 48

output:

71.000000000000000
-34.080565361686020
46.604077743838971
-5.130601472379787
40.417349462513769
18.266429824319644
48.000000000000000

result:

ok 7 numbers

Test #20:

score: 0
Accepted
time: 0ms
memory: 8068kb

input:

0.58 0.41 8 30 69

output:

30.000000000000000
89.432121682809822
64.170630576029694
73.886135624049246
69.163917198120728
70.408387580770210
69.194070848076223
69.000000000000000

result:

ok 8 numbers

Test #21:

score: 0
Accepted
time: 5ms
memory: 8092kb

input:

0.58 0.49 6 31 96

output:

31.000000000000000
99.557613538417186
72.933415852281968
91.084611828147956
88.566448627943970
96.000000000000000

result:

ok 6 numbers

Test #22:

score: 0
Accepted
time: 6ms
memory: 8068kb

input:

0.61 0.29 8 62 25

output:

62.000000000000000
34.407651257133729
38.968667266851575
33.749105897348244
31.887868104769382
29.238840254140310
27.083174305408708
25.000000000000000

result:

ok 8 numbers

Test #23:

score: 0
Accepted
time: 6ms
memory: 8068kb

input:

0.63 0.89 9 37 85

output:

37.000000000000000
-5.887853302176884
29.220652419628564
13.168821585428567
34.302738252289416
33.330976309973757
51.527952119821052
62.127178751363907
85.000000000000000

result:

ok 9 numbers

Test #24:

score: 0
Accepted
time: 0ms
memory: 8088kb

input:

0.64 0.67 2 74 42

output:

74.000000000000000
42.000000000000000

result:

ok 2 numbers

Test #25:

score: 0
Accepted
time: 0ms
memory: 7996kb

input:

0.65 0.56 2 94 96

output:

94.000000000000000
96.000000000000000

result:

ok 2 numbers

Test #26:

score: 0
Accepted
time: 0ms
memory: 8064kb

input:

0.65 0.90 10 97 23

output:

97.000000000000000
-61.703576279117570
47.192675418573579
-24.857979629132988
26.315721117779781
-5.266962939662832
20.260623095220961
8.429138366197076
23.713500723726966
23.000000000000000

result:

ok 10 numbers

Test #27:

score: 0
Accepted
time: 6ms
memory: 8016kb

input:

0.67 0.88 4 70 42

output:

70.000000000000000
0.547821506509144
61.967040409361125
42.000000000000000

result:

ok 4 numbers

Test #28:

score: 0
Accepted
time: 0ms
memory: 7888kb

input:

0.69 0.39 10 2 27

output:

2.000000000000000
22.365907687016133
16.212476304041132
19.909312647724676
20.060291485506067
21.606233057611810
22.731814489099513
24.111382889947269
25.502261844812423
27.000000000000000

result:

ok 10 numbers

Test #29:

score: 0
Accepted
time: 3ms
memory: 8040kb

input:

0.69 0.57 4 88 47

output:

88.000000000000000
11.843609597552826
58.332090622311448
47.000000000000000

result:

ok 4 numbers

Test #30:

score: 0
Accepted
time: 2ms
memory: 7992kb

input:

0.71 0.89 8 4 41

output:

4.000000000000000
6.838890362691074
8.415612157510662
12.061697054627626
16.053699728970102
22.133037186187359
30.002249160976415
41.000000000000000

result:

ok 8 numbers

Test #31:

score: 0
Accepted
time: 0ms
memory: 7964kb

input:

0.72 0.49 8 21 48

output:

21.000000000000000
19.940442369940307
24.647118506357018
27.516742085847802
31.889142369925352
36.443386128411674
41.864917773719824
48.000000000000000

result:

ok 8 numbers

Test #32:

score: 0
Accepted
time: 0ms
memory: 7884kb

input:

0.74 0.58 3 57 29

output:

57.000000000000000
-5.486486486486480
29.000000000000000

result:

ok 3 numbers

Test #33:

score: 0
Accepted
time: 5ms
memory: 7900kb

input:

0.76 0.70 2 91 18

output:

91.000000000000000
18.000000000000000

result:

ok 2 numbers

Test #34:

score: 0
Accepted
time: 2ms
memory: 7996kb

input:

0.77 0.36 10 31 25

output:

31.000000000000000
5.214972085026422
15.175528505470346
13.562546899821680
15.906351374832017
17.130407442556457
18.916700225707999
20.732805853115483
22.774272588153803
25.000000000000000

result:

ok 10 numbers

Test #35:

score: 0
Accepted
time: 2ms
memory: 7900kb

input:

0.77 0.96 8 78 68

output:

78.000000000000000
-40.097557007604983
44.004881104144161
-4.609896277109783
38.695065726603858
25.369700183459582
56.681932238803583
68.000000000000000

result:

ok 8 numbers

Test #36:

score: 0
Accepted
time: 0ms
memory: 8048kb

input:

0.78 0.52 7 73 77

output:

73.000000000000000
8.727547506052925
44.767487054721286
39.456964605830130
54.055525661002576
62.680931610613683
77.000000000000000

result:

ok 7 numbers

Test #37:

score: 0
Accepted
time: 2ms
memory: 7884kb

input:

0.78 0.69 4 42 97

output:

42.000000000000000
57.297905113986445
73.672365988909434
97.000000000000000

result:

ok 4 numbers

Test #38:

score: 0
Accepted
time: 0ms
memory: 8068kb

input:

0.78 0.70 10 54 99

output:

54.000000000000000
-13.012886350899695
27.649948646298235
12.457939498482839
29.072156861225380
31.396840000693786
44.840045003398920
56.953023103136815
75.811389522825962
99.000000000000000

result:

ok 10 numbers

Test #39:

score: 0
Accepted
time: 5ms
memory: 8044kb

input:

0.78 0.76 10 97 83

output:

97.000000000000000
-43.734736959040490
39.606905171948419
-2.345014054751001
28.272136967975019
20.270056153409755
37.297467895320622
44.497267634941501
63.053944355698050
83.000000000000000

result:

ok 10 numbers

Test #40:

score: 0
Accepted
time: 3ms
memory: 8092kb

input:

0.78 0.95 10 100 32

output:

100.000000000000000
-63.269578817364128
45.649728522455980
-24.499311628980251
24.257779025728581
-4.353278407462945
19.649332916621056
11.190865187874628
27.395741117332214
32.000000000000000

result:

ok 10 numbers

Test #41:

score: 0
Accepted
time: 2ms
memory: 8048kb

input:

0.79 0.90 10 98 42

output:

98.000000000000000
-58.246914628041367
42.184937443847318
-19.096122584597850
22.880506857630287
0.889090091389861
21.294837344065247
17.623102584062419
33.087604651068034
42.000000000000000

result:

ok 10 numbers

Test #42:

score: 0
Accepted
time: 0ms
memory: 8000kb

input:

0.81 0.48 10 97 1

output:

97.000000000000000
-38.257501681599223
15.571423637904623
-5.750747660464880
2.816177741217666
-0.479254906636833
0.963568841408645
0.550448406355323
0.908376253023961
1.000000000000000

result:

ok 10 numbers

Test #43:

score: 0
Accepted
time: 5ms
memory: 8032kb

input:

0.81 0.86 10 20 100

output:

20.000000000000000
-3.332842869651405
14.500397275582362
8.879076925321506
19.662393966511249
23.562545268650609
35.995320478806669
49.419998518872930
70.986174412060805
100.000000000000000

result:

ok 10 numbers

Test #44:

score: 0
Accepted
time: 3ms
memory: 7916kb

input:

0.84 0.85 10 74 95

output:

74.000000000000000
-36.290804877098296
32.415723903237435
-3.617976066814105
24.514265421627972
17.516703297375507
35.551156378179201
44.752169160439706
67.810305016221662
95.000000000000000

result:

ok 10 numbers

Test #45:

score: 0
Accepted
time: 3ms
memory: 7908kb

input:

0.88 0.37 10 3 96

output:

3.000000000000000
29.021828490376418
26.649209071531246
34.189380524386770
39.946862217926920
47.803309545798797
56.847251420935898
67.712805782369145
80.620752114231124
96.000000000000000

result:

ok 10 numbers

Test #46:

score: 0
Accepted
time: 6ms
memory: 8064kb

input:

0.91 0.50 10 100 98

output:

100.000000000000000
-22.586857854484428
29.445959352419170
15.502394083459230
28.830158292157485
33.986641087592929
45.342922535788304
58.255380051363822
75.683857114635231
98.000000000000000

result:

ok 10 numbers

Test #47:

score: 0
Accepted
time: 11ms
memory: 8044kb

input:

0.94 0.48 10 44 97

output:

44.000000000000000
-1.582743438717800
19.632221167605266
17.694571046964406
26.056362944597065
32.986375270464151
43.514246967642890
56.736852279407103
74.219479687111260
97.000000000000000

result:

ok 10 numbers

Test #48:

score: 0
Accepted
time: 2ms
memory: 7868kb

input:

0.94 0.54 10 28 95

output:

28.000000000000000
0.452546307145841
15.545393528717092
14.857044922852818
22.360134732988879
29.041330907350066
39.373323808723057
52.693243070168712
70.793243342669030
95.000000000000000

result:

ok 10 numbers

Test #49:

score: 0
Accepted
time: 0ms
memory: 7888kb

input:

0.95 0.57 10 2 94

output:

2.000000000000000
9.227284174161063
9.905919965453011
14.670175946452165
19.583041529437772
26.965889742443615
36.779928927100961
50.311489633938777
68.760474640689381
94.000000000000000

result:

ok 10 numbers

Test #50:

score: 0
Accepted
time: 2ms
memory: 7988kb

input:

0.98 0.90 10 21 99

output:

21.000000000000000
-8.213193484970178
10.851070384729228
3.242174840561483
12.943294690006558
15.602386152711762
26.939303650663430
40.442665115090747
63.879185098386017
99.000000000000000

result:

ok 10 numbers

Extra Test:

score: 0
Extra Test Passed