QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#433330#8795. Mysterious Sequenceucup-team008#AC ✓1ms4056kbC++2313.8kb2024-06-08 10:23:552024-06-08 10:23:55

Judging History

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

  • [2024-06-08 10:23:55]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:4056kb
  • [2024-06-08 10:23:55]
  • 提交

answer

// {{{ y0105w49 template 24K21
// hi mom
#ifndef NULL
#ifdef __GNUC__
#ifndef __clang__
// #include <bits/stdc++.h>
#include <bits/extc++.h>
#include <tr2/dynamic_bitset>
#define EXTS
#else
#ifdef ARST
#include <bits/clang++.h>
#else
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cwchar>
#include <cwctype>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
// #include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
// #include <cuchar>
#endif
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <codecvt>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif
#if __cplusplus >= 201402L
#include <shared_mutex>
#endif
#if __cplusplus >= 201703L
#include <any>
#include <charconv>
// #include <execution>
#include <filesystem>
#include <optional>
// #include <memory_resource>
#include <string_view>
#include <variant>
#endif
#if __cplusplus >= 202002L
#include <barrier>
#include <bit>
#include <compare>
#include <concepts>
#if __cpp_impl_coroutine
# include <coroutine>
#endif
#include <latch>
#include <numbers>
#include <ranges>
#include <span>
// #include <stop_token>
#include <semaphore>
// #include <source_location>
// #include <syncstream>
#include <version>
#endif
#if __cplusplus > 202002L
// #include <expected>
// #include <spanstream>
#if __has_include(<stacktrace>)
# include <stacktrace>
#endif
#include <stdatomic.h>
#endif
#endif
#endif
#else
#error "unsupported"
#endif
#endif
using namespace std;
#ifdef ARST
#define JO 1
#define OJ 0
#else
#define JO 0
#define OJ 1
#endif
#define STR(x) #x
#define GCCDIAG(s) _Pragma(STR(GCC diagnostic s)) static_assert(true)
#define Wsave GCCDIAG(push)
#define Wpop GCCDIAG(pop)
#define Wsupp(w) GCCDIAG(ignored "-W" w)
#define Wpush(w) Wsave; Wsupp(w)
#define typeof __typeof__
namespace gbd_ns {
	template<typename C> struct is_iterable {
		template<class T> static long check(...);
		template<class T> static char check(int,typename T::const_iterator = C().end());
		enum {
			value = sizeof(check<C>(0)) == sizeof(char),
			neg_value = sizeof(check<C>(0)) != sizeof(char)
		};
	};
	template<class T> struct _gbd3C;
	template<class T> ostream &_gbd3(ostream &os,const T &x) { return _gbd3C<T>::call(os,x); }
	template<> ostream &_gbd3(ostream &os,const string &x) { return os<<'"'<<x<<'"'; }
	template<> ostream &_gbd3(ostream &os,char *const &x) { return os<<'"'<<x<<'"'; }
	template<class T> ostream &_gbd3_5(ostream &os,const T &x) { return _gbd3(os,x); }
	template<class A,class B> ostream &_gbd4(ostream &os,const pair<A,B> &p) {
		_gbd3(os<<'(',p.first);
		_gbd3(os<<',',p.second);
		return os<<')';
	}
	template<class T,size_t N> struct _gbd4_tupleC {
		static void call(ostream &os,const T &t) {
			_gbd4_tupleC<T,N-1>::call(os,t);
			os<<','<<get<N-1>(t);
		}
	};
	template<class T> struct _gbd4_tupleC<T,1> {
		static void call(ostream &os,const T &t) { os<<get<0>(t); }
	};
	template<typename... Types> ostream &_gbd4(ostream &os,const tuple<Types...> &t) {
		os<<'(';
		_gbd4_tupleC<tuple<Types...>,sizeof...(Types)>::call(os,t);
		return os<<')';
	}
	template<> ostream &_gbd4(ostream &os,const tuple<> &t) { (void)t; return os<<"()"; }
	template<class T> ostream &_gbd4(ostream &os,const T &x) {
		return os<<x;
	}
	template<class T> struct _gbd3C {
		template<class U=T> static ostream &call(ostream &os,enable_if_t<is_iterable<U>::value,const T> &V) {
			os<<"{";
			bool ff=0;
			for(const auto &E:V) _gbd3_5<decltype(E)>(ff?os<<",":os,E), ff=1;
			return os<<"}";
		}
		template<class U=T> static ostream &call(ostream &os,enable_if_t<is_iterable<U>::neg_value,const T> &x) {
			return _gbd4(os,x);
		}
	};
	template<class T,typename... Args> ostream &_gbd2(ostream &os,bool,vector<string>::iterator nm,const T &x,Args&&... args);
	ostream &_gbd2(ostream &os,bool,vector<string>::iterator) { return os; }
	template<typename... Args> ostream &_gbd2(ostream &os,bool fi,vector<string>::iterator nm,const char *x,Args&&... args) {
		return _gbd2(os<<(fi?"":"  ")<<x,0,nm+1,args...);
	}
	template<class T,typename... Args> ostream &_gbd2(ostream &os,bool fi,vector<string>::iterator nm,const T &x,Args&&... args) {
		return _gbd2(_gbd3<T>(os<<(fi?"":"  ")<<*nm<<"=",x),0,nm+1,args...);
	}
	vector<string> split(string s) {
		vector<string> Z;
		string z="";
		s+=',';
		int dep=0;
		for(char c:s) {
			if(c==',' && !dep) Z.push_back(z),z="";
			else z+=c;
			if(c=='(' || c=='{' || c=='[') ++dep;
			if(c==')' || c=='}' || c==']') --dep;
		}
		return Z;
	}
	template<typename... Args> ostream &_gbd1(ostream &os,const string &nm,Args&&... args) {
		return _gbd2(os,1,split(nm).begin(),args...);
	}
	template<typename... Args> string _gbd1(const string &nm,Args&&... args) {
		ostringstream oss;
		_gbd2(oss,1,split(nm).begin(),args...);
		return oss.str();
	}
}
bool DBG=1,EMACS=0;
#define dbg(...) (JO&&DBG?gbd_ns::_gbd1(cerr<<"\033[38;5;5m"<<__FILE__<<":"<<__LINE__<<(EMACS?":note: ":": "),#__VA_ARGS__,__VA_ARGS__)<<"\033[0m"<<endl:cerr)
#define dbgt(...) dbg(fmt_time(),__VA_ARGS__)
#define fmt(...) gbd_ns::_gbd1(#__VA_ARGS__,__VA_ARGS__)
template<class Fun> struct _y_combinator_result {
	Fun _fun;
	template<class T> explicit _y_combinator_result(T &&fun) : _fun(forward<T>(fun)) {}
	template<typename... Args> decltype(auto) operator()(Args&&... args) {
		return _fun(ref(*this),forward<Args>(args)...);
	}
};
template<class Fun> [[nodiscard]] decltype(auto) fix(Fun &&fun) {
	return _y_combinator_result<decay_t<Fun>>(forward<Fun>(fun));
}
#define nop void()
#define sz(x) (int((x).size()))
#define all(v) (v).begin(),(v).end()
#define forenum(i,...) for(int i:{-1}) for(__VA_ARGS__) if(++i,0) assert(0); else
#define forenumll(i,...) for(long long i:{-1}) for(__VA_ARGS__) if(++i,0) assert(0); else
#define forbs(k,i,bs) for(ptrdiff_t k=0,i=(bs)._Find_first();i<(ptrdiff_t)(bs).size();i=(bs)._Find_next(i),++k)
#define fordbs(k,i,bs) for(ptrdiff_t k=0,i=(bs).find_first();i<(ptrdiff_t)(bs).size();i=(bs).find_next(i),++k)
#define get(x,i) get<i>(x)
template<class T> T &smin(T &x,const T &y) { return y<x?x=y:x; }
template<class T> T &smax(T &x,const T &y) { return y>x?x=y:x; }
template<class T> bool inb(const T &x,const T &l,const T &r) { return l<=x&&x<=r; }
template<class T> bool cinb(const T &x,const T &l,const T &r) { return l<=r?l<=x&&x<=r:l<=x||x<=r; }
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
template<template<class> class C,class T> T popv(C<T> &v) { T z=v.back(); v.pop_back(); return z; }
template<template<class> class C,class T> T popq(C<T> &v) { T z=v.front(); v.pop(); return z; }
template<template<class> class C,class T> T pops(C<T> &v) { T z=*v.begin(); v.erase(v.begin()); return z; }
template<template<class,class> class C,class K,class V> pair<K,V> popm(C<K,V> &v) { pair<K,V> z=*v.begin(); v.erase(v.begin()); return z; }
template<template<class> class C,class T> void erase1(C<T> &v,const T &x) { v.erase(v.find(x)); }
template<template<class> class C,class T> int lbi(C<T> &v,const T &x) { return int(lower_bound(all(v),x)-v.begin()); }
template<template<class> class C,class T> int findi(C<T> &v,const T &x) { auto it=lower_bound(all(v),x); return it!=v.end()&&*it==x?int(it-v.begin()):-1; }
template<class V> int sortu(V &v) { sort(all(v)); int z=int(unique(all(v))-v.begin()); v.resize(z); return z; }
template<typename T,typename... Args> T tee(T (*f)(Args... args),Args&&... args) { T z=f(forward<Args>(args)...); cout<<z<<endl; return z; }
template<typename... Args> void tee(void (*f)(Args... args),Args&&... args) { f(forward<Args>(args)...); }
#ifdef EXTS
template<class S,class T> using omap=__gnu_pbds::tree<S,T,less<S>,__gnu_pbds::rb_tree_tag,__gnu_pbds::tree_order_statistics_node_update>;
template<class T> using oset=omap<T,__gnu_pbds::null_type>;
template<class T> using rope=__gnu_cxx::rope<T>;
using dbitset=tr2::dynamic_bitset<>;
#endif
constexpr int e0=1, e1=10, e2=100, e3=1000;
constexpr int e4=10*e3, e5=100*e3, e6=1000*e3;
constexpr int e7=10*e6, e8=100*e6, e9=1000*e6;
constexpr long long e10=10LL*e9, e11=100LL*e9, e12=1000LL*e9;
constexpr long long e13=10*e12, e14=100*e12, e15=1000*e12;
constexpr long long e16=10*e15, e17=100*e15, e18=1000*e15;
constexpr __int128_t e21=__int128_t(e3)*e18, e24=__int128_t(e6)*e18, e27=__int128_t(e9)*e18;
constexpr __int128_t e30=e3*e27, e33=e6*e27, e36=e9*e27;
using ulll=__uint128_t;
using lll=__int128_t;
using ull=unsigned long long;
using ll=long long;
using uint=unsigned int;
using ushort=unsigned short;
using uchar=char;
using ld=long double;
#ifdef EXTS
using lld=__float128;
#endif
long long START_TIME=chrono::duration_cast<chrono::microseconds>(chrono::steady_clock::now().time_since_epoch()).count();
inline long long now_U_03BC_s() { return chrono::duration_cast<chrono::microseconds>(chrono::steady_clock::now().time_since_epoch()).count()-START_TIME; }
const char *fmt_time(long long U_03BC_s=now_U_03BC_s()) { static char dur[20]; sprintf(dur,"%llu.%03llus",U_03BC_s/e6,(U_03BC_s%e6)/e3); return dur; }
#define timed(cb) do { dbg("timed "#cb" ..."); unsigned long long start=now_U_03BC_s(); cb; dbg("timed "#cb" took",fmt_time(now_U_03BC_s()-start)); } while(0)
int arg1; bool inp; vector<string> args;
unsigned seed=unsigned(JO&&getenv("sd")?atoi(getenv("sd")):OJ?START_TIME:START_TIME%e5);
mt19937 igen(seed<<1),gen(seed<<1|1);
#define irand(...) (assert(!inp),_rand(igen,__VA_ARGS__))
#define rand(...) _rand(gen,__VA_ARGS__)
template<class T> enable_if_t<numeric_limits<T>::is_integer,T> _rand(mt19937 &g,T l,T r) { return uniform_int_distribution<T>(l,r)(g); }
template<class T> enable_if_t<numeric_limits<T>::is_integer,T> _rand(mt19937 &g,T n) { return _rand(g,T(1),n); }
[[deprecated]] int _rand(mt19937 &g) { return _rand(g,0,numeric_limits<int>::max()); }
template<class T> enable_if_t<numeric_limits<T>::is_iec559,T> _rand(mt19937 &g,T l,T r) { return uniform_real_distribution<T>(l,r)(g); }
bool _rand(mt19937 &g,double p) { return bernoulli_distribution(p)(g); }
template<class T> T _rand(mt19937 &g,initializer_list<T> il) { return *(il.begin()+_rand(g,0,(int)il.size()-1)); }
template<class T> T _rand(mt19937 &g,double p,T a,T b) { return _rand(g,p)?a:b; }
template<class T> T _rand(mt19937 &g,initializer_list<T> il,initializer_list<double> wt) { assert(il.size()==wt.size()); return *(il.begin()+discrete_distribution<int>(wt)(g)); }
#define random_shuffle(...) static_assert(false,"random_shuffle deprecated, use shuffle")
#define ine(x,e) (inp?cin>>(x),nop:((x)=(e),nop))
#define inr(x,...) ine(x,irand(__VA_ARGS__))
#define endl '\n'
string garb;
void exit0() { DBG=1; dbgt("gg (early)",seed); exit(0); }
#ifndef MAIN
#define MAIN _main
#endif
void MAIN();
int32_t main([[maybe_unused]]int argc,[[maybe_unused]]char *argv[]) {
	ios_base::sync_with_stdio(0); cin.tie(0); cin.exceptions(ios_base::failbit | ios_base::badbit);
	arg1=0,args={argv,argv+argc};
	if(sz(args)>1) {
		if(args[1][0]=='i') freopen((string(__FILE__).substr(0,string(__FILE__).find('.'))+"."+args[1].substr(1)+".in").c_str(),"r",stdin);
		else if(args[1][0]=='I') freopen(args[1].substr(1).c_str(),"r",stdin);
		else arg1=stoi(args[1]);
	}
	inp=!arg1;
	if(JO && getenv("EMACS")) EMACS=1;
	dbgt(arg1,seed,args);
	#ifdef QUIET
	DBG=0;
	#endif
	MAIN();
	DBG=1;
	dbgt("gg;wp",seed);
	return 0;
}
constexpr int inf=e9+99;
constexpr ll linf=1LL*e9*e9+99;
#if __cplusplus >= 202002L
constexpr long double U_03C4__ld=2*numbers::pi_v<long double>;
#else
const long double U_03C4__ld=2*acosl(-1);
#endif
#define U_03C4_ ((flt)U_03C4__ld)
constexpr long double U_03B5__ld=1e-8l;
#define U_03B5_ ((flt)U_03B5__ld)
// }}}
using flt=long double; //CARE
constexpr int P=e9+7;//998'244'353;


flt f(flt x1,flt x2,flt a,flt b) {
	return a*x2+b*x1;
}

flt f(flt x1,flt x2,flt a,flt b,int n) {
	n-=2;
	for(;n--;) x1=f(x1,x2,a,b), swap(x1,x2);
	return x2;
}


auto solve() { /* CURSOR START */
	flt A,B; int n; inr(A,.25,1.), inr(B,.25,1.), ine(n,arg1);
	flt X1,Xn; inr(X1,1.,100.), inr(Xn,1.,100.);
	dbg(n,A,B,X1,Xn);
	flt L=-1,R=1;
	dbg("foo");
	for(;f(X1,R,A,B,n)<Xn;) R*=2;
	dbg("foo");
	for(;f(X1,L,A,B,n)>Xn;) L*=2;
	dbg("foo");
	for(int it=800;--it;) {
		flt M=midpoint(L,R);
		(f(X1,M,A,B,n)<Xn?L:R)=M;
	}
	dbg("foo");
	cout<<fixed<<setprecision(22)<<X1<<endl;
	flt X2=midpoint(L,R);
	for(int i=2;i<=n;i++) {
		cout<<X2<<endl;
		X1=f(X1,X2,A,B);
		swap(X1,X2);
	}
	dbg("foo");
}



void _main() { int NTC=1;
	// ine(NTC,5);
	for(int TC=1;TC<=NTC;TC++) {
		// cout<<"Case #"<<TC<<": ";
		tee(solve);
	}
	if(JO&&inp) assert((cin>>ws).eof());
}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3880kb

input:

1.0 1.0 10 1 10

output:

1.0000000000000000000000
-0.3235294117647058823625
0.6764705882352941176375
0.3529411764705882352750
1.0294117647058823529667
1.3823529411764705882417
2.4117647058823529410999
3.7941176470588235292332
6.2058823529411764703331
10.0000000000000000000000

result:

ok 10 numbers

Test #2:

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

input:

1 1 2 1 100

output:

1.0000000000000000000000
100.0000000000000000000000

result:

ok 2 numbers

Test #3:

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

input:

1 1 5 50 100

output:

50.0000000000000000000000
-0.0000000000000000017347
50.0000000000000000000000
50.0000000000000000000000
100.0000000000000000000000

result:

ok 5 numbers

Test #4:

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

input:

0.25 0.25 10 1 1

output:

1.0000000000000000000000
55.8755364806866952759323
14.2188841201716738189831
17.5236051502145922728615
7.9356223175965665229611
6.3648068669527896991725
3.5751072961373390555334
2.4849785407725321886765
1.5150214592274678111067
0.9999999999999999999458

result:

ok 10 numbers

Test #5:

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

input:

0.25 0.63 6 93 12

output:

93.0000000000000000000000
-14.2048079586650447432572
55.0387980103337388151918
4.8106704886244565158582
35.8771103686663695789272
12.0000000000000000000000

result:

ok 6 numbers

Test #6:

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

input:

0.25 0.80 10 5 63

output:

5.0000000000000000000000
78.7695361835313554443871
23.6923840458828388610968
68.9387249582957940680084
36.1885884762802196058795
64.1981270857066901591725
45.0004025524508482272723
62.6086023066780641838092
51.6524726186301946298518
63.0000000000000000069389

result:

ok 10 numbers

Test #7:

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

input:

0.25 0.99 3 18 30

output:

18.0000000000000000000000
48.7199999999999999941713
29.9999999999999999982653

result:

ok 3 numbers

Test #8:

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

input:

0.28 0.64 9 6 10

output:

6.0000000000000000000000
20.9504033485078051124439
9.7061129375821854313455
16.1259697655680071925327
10.7271838144116406898315
13.3242321179987839958533
10.5961826342631095605393
11.4944396931128924345400
10.0000000000000000000000

result:

ok 9 numbers

Test #9:

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

input:

0.31 0.40 7 10 49

output:

10.0000000000000000000000
240.1150639986882639187460
78.4356698395933618142561
120.3610832497492477283219
68.6862037432596115246741
69.4371564603101786641859
48.9999999999999999930611

result:

ok 7 numbers

Test #10:

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

input:

0.32 0.28 5 36 6

output:

36.0000000000000000000000
10.1213768115942028980730
13.3188405797101449270711
7.0960144927536231880538
5.9999999999999999995663

result:

ok 5 numbers

Test #11:

score: 0
Accepted
time: 1ms
memory: 3756kb

input:

0.35 0.65 10 86 82

output:

86.0000000000000000000000
79.5339247862308320186076
83.7368736751807912072065
81.0049568973633177318416
82.7807028029446754849308
81.6264679643167929412595
82.3767206094249165929111
81.8890563901046362182967
82.2060381326628184586736
82.0000000000000000000000

result:

ok 10 numbers

Test #12:

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

input:

0.36 0.68 8 72 59

output:

72.0000000000000000000000
38.2399186426056982152089
62.7263707113380513565037
48.5846381330535732750997
60.1444018116091613027074
54.6895385826557278996507
60.5864271216502917292990
58.9999999999999999965306

result:

ok 8 numbers

Test #13:

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

input:

0.43 0.61 2 93 84

output:

93.0000000000000000000000
84.0000000000000000000000

result:

ok 2 numbers

Test #14:

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

input:

0.46 0.96 6 65 35

output:

65.0000000000000000000000
-16.6174236628180476867123
54.7559851151036980632103
9.2350264366423753309085
56.8138578713550427903844
35.0000000000000000000000

result:

ok 6 numbers

Test #15:

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

input:

0.50 0.90 4 19 1

output:

19.0000000000000000000000
-6.5652173913043478268789
13.8173913043478260864738
0.9999999999999999991326

result:

ok 4 numbers

Test #16:

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

input:

0.54 0.35 3 16 22

output:

16.0000000000000000000000
30.3703703703703703671579
22.0000000000000000000000

result:

ok 3 numbers

Test #17:

score: 0
Accepted
time: 1ms
memory: 3940kb

input:

0.55 0.89 10 74 13

output:

74.0000000000000000000000
-48.3219370765765190781083
39.2829346078829145065547
-21.4009099638174990001827
23.1913113209161694597271
-6.2915886412936809076943
17.1798933229038663199340
3.8494274368457504684714
17.4072901476496037821706
12.9999999999999999965306

result:

ok 10 numbers

Test #18:

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

input:

0.56 0.36 3 31 88

output:

31.0000000000000000000000
137.2142857142857142738190
88.0000000000000000000000

result:

ok 3 numbers

Test #19:

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

input:

0.57 0.93 7 71 48

output:

71.0000000000000000000000
-34.0805653616860180846193
46.6040777438389696926690
-5.1306014723797840944991
40.4173494625137648822433
18.2664298243196467734506
48.0000000000000000000000

result:

ok 7 numbers

Test #20:

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

input:

0.58 0.41 8 30 69

output:

30.0000000000000000000000
89.4321216828098121409685
64.1706305760296910403739
73.8861356240492437794098
69.1639171981207347139620
70.4083875807702160784518
69.1940708480762265569775
68.9999999999999999930611

result:

ok 8 numbers

Test #21:

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

input:

0.58 0.49 6 31 96

output:

31.0000000000000000000000
99.5576135384171724412861
72.9334158522819600151132
91.0846118281479513040244
88.5664486279439721605478
95.9999999999999999861222

result:

ok 6 numbers

Test #22:

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

input:

0.61 0.29 8 62 25

output:

62.0000000000000000000000
34.4076512571337153126305
38.9686672668515663407740
33.7491058973482329075289
31.8878681047693763143946
29.2388402541403070959009
27.0831743054087064597607
24.9999999999999999965306

result:

ok 8 numbers

Test #23:

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

input:

0.63 0.89 9 37 85

output:

37.0000000000000000000000
-5.8878533021768835135218
29.2206524196285633860476
13.1688215854285686056552
34.3027382522894196334451
33.3309763099737604297168
51.5279521198210525428918
62.1271787513639098844698
84.9999999999999999861222

result:

ok 9 numbers

Test #24:

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

input:

0.64 0.67 2 74 42

output:

74.0000000000000000000000
42.0000000000000000000000

result:

ok 2 numbers

Test #25:

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

input:

0.65 0.56 2 94 96

output:

94.0000000000000000000000
96.0000000000000000000000

result:

ok 2 numbers

Test #26:

score: 0
Accepted
time: 1ms
memory: 3872kb

input:

0.65 0.90 10 97 23

output:

97.0000000000000000000000
-61.7035762791175542846256
47.1926754185735897115239
-24.8579796291329655436725
26.3157211177798031360303
-5.2669629396627969507988
20.2606230952210048038009
8.4291383661971358669251
23.7135007237270426360548
22.9999999999999999930611

result:

ok 10 numbers

Test #27:

score: 0
Accepted
time: 1ms
memory: 4052kb

input:

0.67 0.88 4 70 42

output:

70.0000000000000000000000
0.5478215065091429009699
61.9670404093611257440033
42.0000000000000000034694

result:

ok 4 numbers

Test #28:

score: 0
Accepted
time: 1ms
memory: 3956kb

input:

0.69 0.39 10 2 27

output:

2.0000000000000000000000
22.3659076870161257384606
16.2124763040411267595031
19.9093126477246665020915
20.0602914855060593217473
21.6062330576118008674397
22.7318144890995057338240
24.1113828899472612942584
25.5022618448124175280500
26.9999999999999999982653

result:

ok 10 numbers

Test #29:

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

input:

0.69 0.57 4 88 47

output:

88.0000000000000000000000
11.8436095975528152181994
58.3320906223114424987708
46.9999999999999999965306

result:

ok 4 numbers

Test #30:

score: 0
Accepted
time: 1ms
memory: 3940kb

input:

0.71 0.89 8 4 41

output:

4.0000000000000000000000
6.8388903626910718244400
8.4156121575106609955519
12.0616970546276232306021
16.0536997289701007796126
22.1330371861873562294720
30.0022491609764126157395
41.0000000000000000000000

result:

ok 8 numbers

Test #31:

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

input:

0.72 0.49 8 21 48

output:

21.0000000000000000000000
19.9404423699403013162113
24.6471185063570169485742
27.5167420858477998479863
31.8891423699253541979015
36.4433861284116769468922
41.8649177737198309595668
47.9999999999999999965306

result:

ok 8 numbers

Test #32:

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

input:

0.74 0.58 3 57 29

output:

57.0000000000000000000000
-5.4864864864864864848690
29.0000000000000000000000

result:

ok 3 numbers

Test #33:

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

input:

0.76 0.70 2 91 18

output:

91.0000000000000000000000
18.0000000000000000000000

result:

ok 2 numbers

Test #34:

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

input:

0.77 0.36 10 31 25

output:

31.0000000000000000000000
5.2149720850264223671530
15.1755285054703452233063
13.5625468998216778737306
15.9063513748320162427899
17.1304074425564565407193
18.9167002257079973834286
20.7328058531154823390663
22.7742725881538004596705
24.9999999999999999965306

result:

ok 10 numbers

Test #35:

score: 0
Accepted
time: 1ms
memory: 3896kb

input:

0.77 0.96 8 78 68

output:

78.0000000000000000000000
-40.0975570076049792969664
44.0048811041441659402951
-4.6098962771097723514768
38.6950657266038745910053
25.3697001834596019761991
56.6819322388036131304956
68.0000000000000000069389

result:

ok 8 numbers

Test #36:

score: 0
Accepted
time: 1ms
memory: 3908kb

input:

0.78 0.52 7 73 77

output:

73.0000000000000000000000
8.7275475060529322923059
44.7674870547212871881027
39.4569646058301287984416
54.0555256610025697990018
62.6809316106136714154273
77.0000000000000000000000

result:

ok 7 numbers

Test #37:

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

input:

0.78 0.69 4 42 97

output:

42.0000000000000000000000
57.2979051139864448555228
73.6723659889094269898058
97.0000000000000000000000

result:

ok 4 numbers

Test #38:

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

input:

0.78 0.70 10 54 99

output:

54.0000000000000000000000
-13.0128863508996959752473
27.6499486462982371377806
12.4579394984828377848998
29.0721568612253794677835
31.3968400006937824325837
44.8400450033989159230596
56.9530231031368021216155
75.8113895228259467989895
98.9999999999999999861222

result:

ok 10 numbers

Test #39:

score: 0
Accepted
time: 1ms
memory: 3960kb

input:

0.78 0.76 10 97 83

output:

97.0000000000000000000000
-43.7347369590404876082967
39.6069051719484196694143
-2.3450140547510032393297
28.2721369679750164222165
20.2700561534097503466750
37.2974678953206177506319
44.4972676349414921065373
63.0539443556980333319140
83.0000000000000000000000

result:

ok 10 numbers

Test #40:

score: 0
Accepted
time: 1ms
memory: 4052kb

input:

0.78 0.95 10 100 32

output:

100.0000000000000000000000
-63.2695788173641278095971
45.6497285224559803118449
-24.4993116289802567754619
24.2577790257285810116700
-4.3532784074629507480719
19.6493329166210503773649
11.1908651878746160830691
27.3957411173321984023538
32.0000000000000000312250

result:

ok 10 numbers

Test #41:

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

input:

0.79 0.90 10 98 42

output:

98.0000000000000000000000
-58.2469146280413620844763
42.1849374438473239505576
-19.0961225845978399551228
22.8805068576302979913017
0.8890900913898794541423
21.2948373440652729601114
17.6231025840624571481008
33.0876046510680868126264
42.0000000000000000138778

result:

ok 10 numbers

Test #42:

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

input:

0.81 0.48 10 97 1

output:

97.0000000000000000000000
-38.2575016815992159438520
15.5714236379046350837452
-5.7507476604648692349378
2.8161777412176807596986
-0.4792549066368158173623
0.9635688414086659526266
0.5504484063553478292866
0.9083762530239913989688
0.9999999999999999912180

result:

ok 10 numbers

Test #43:

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

input:

0.81 0.86 10 20 100

output:

20.0000000000000000000000
-3.3328428696514015849850
14.5003972755823647170989
8.8790769253215100576329
19.6623939665112568032229
23.5625452686506166605912
35.9953204788066803455904
49.4199985188729414078979
70.9861744120608276348294
100.0000000000000000000000

result:

ok 10 numbers

Test #44:

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

input:

0.84 0.85 10 74 95

output:

74.0000000000000000000000
-36.2908048770982899419724
32.4157239032374364512412
-3.6179760668140998336462
24.5142654216279771237780
17.5167032973755159245416
35.5511563781792139307680
44.7521691604397282363004
67.8103050162217035612411
94.9999999999999999861222

result:

ok 10 numbers

Test #45:

score: 0
Accepted
time: 1ms
memory: 3908kb

input:

0.88 0.37 10 3 96

output:

3.0000000000000000000000
29.0218284903764229890055
26.6492090715312522301167
34.1893805243867784683653
39.9468622179269283768710
47.8033095457988050046294
56.8472514209359119016773
67.7128057823691603261951
80.6207521142311484899090
95.9999999999999999930611

result:

ok 10 numbers

Test #46:

score: 0
Accepted
time: 1ms
memory: 3928kb

input:

0.91 0.50 10 100 98

output:

100.0000000000000000000000
-22.5868578544844235828082
29.4459593524191745386731
15.5023940834592370389966
28.8301582921574929760378
33.9866410875929371299131
45.3429225357883192784603
58.2553800513638391084248
75.6838571146352532270640
97.9999999999999999930611

result:

ok 10 numbers

Test #47:

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

input:

0.94 0.48 10 44 97

output:

44.0000000000000000000000
-1.5827434387178068990899
19.6322211676052615133420
17.6945710469643985099375
26.0563629445970601251903
32.9863752704641478019632
43.5142469676428877943530
56.7368522794071054697607
74.2194796871112652814073
96.9999999999999999930611

result:

ok 10 numbers

Test #48:

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

input:

0.94 0.54 10 28 95

output:

28.0000000000000000000000
0.4525463071458404778536
15.5453935287170900503631
14.8570449228528185057346
22.3601347329888780236795
29.0413309073500673362922
39.3733238087230574299424
52.6932430701687103472008
70.7932433426690387381908
95.0000000000000000000000

result:

ok 10 numbers

Test #49:

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

input:

0.95 0.57 10 2 94

output:

2.0000000000000000000000
9.2272841741610597907780
9.9059199654530068011177
14.6701759464521605414583
19.5830415294377663919245
26.9658897424436095804218
36.7799289271009559459946
50.3114896339387656087894
68.7604746406893722193709
94.0000000000000000000000

result:

ok 10 numbers

Test #50:

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

input:

0.98 0.90 10 21 99

output:

21.0000000000000000000000
-8.2131934849701753540568
10.8510703847292281527814
3.2421748405614857712308
12.9432946900065613928324
15.6023861527117673596993
26.9393036506634372655861
40.4426651150907591446282
63.8791850983860374987855
98.9999999999999999791833

result:

ok 10 numbers

Extra Test:

score: 0
Extra Test Passed