QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#754213#9554. The Wheel of Fortuneucup-team087#AC ✓216ms12664kbC++2328.7kb2024-11-16 14:31:302024-11-18 10:03:26

Judging History

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

  • [2024-11-18 10:03:26]
  • 自动重测本题所有获得100分的提交记录
  • 测评结果:AC
  • 用时:216ms
  • 内存:12664kb
  • [2024-11-18 10:02:58]
  • hack成功,自动添加数据
  • (/hack/1191)
  • [2024-11-18 09:58:54]
  • 自动重测本题所有获得100分的提交记录
  • 测评结果:100
  • 用时:206ms
  • 内存:12904kb
  • [2024-11-18 09:58:26]
  • hack成功,自动添加数据
  • (/hack/1189)
  • [2024-11-16 14:31:30]
  • 评测
  • 测评结果:100
  • 用时:207ms
  • 内存:12832kb
  • [2024-11-16 14:31:30]
  • 提交

answer

#ifndef LOCAL
#pragma GCC optimize ("Ofast")
#pragma GCC optimize ("unroll-loops")
#endif

#include <bits/stdc++.h>
using namespace std;

using ll=long long;
#define int ll

bool dbg=false;

#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define pb push_back
#define eb emplace_back
#define a first
#define b second
#define bg begin()
#define ed end()
#define all(x) x.bg,x.ed
#define si(x) int(x.size())
#ifdef LOCAL
#define dmp(x) cerr<<__LINE__<<" "<<#x<<" "<<x<<endl
#else
#define dmp(x) void(0)
#endif

template<class t,class u> bool chmax(t&a,u b){if(a<b){a=b;return true;}else return false;}
template<class t,class u> bool chmin(t&a,u b){if(b<a){a=b;return true;}else return false;}

template<class t> using vc=vector<t>;
template<class t> using vvc=vc<vc<t>>;

using pi=pair<int,int>;
using vi=vc<int>;
using vvi=vc<vc<int>>;

template<class t,class u>
ostream& operator<<(ostream& os,const pair<t,u>& p){
	return os<<"{"<<p.a<<","<<p.b<<"}";
}

template<class t> ostream& operator<<(ostream& os,const vc<t>& v){
	os<<"{";
	for(auto e:v)os<<e<<",";
	return os<<"}";
}

#define mp make_pair
#define mt make_tuple
#define one(x) memset(x,-1,sizeof(x))
#define zero(x) memset(x,0,sizeof(x))
#ifdef LOCAL
void dmpr(ostream&os){os<<endl;}
template<class T,class... Args>
void dmpr(ostream&os,const T&t,const Args&... args){
	os<<t<<" ";
	dmpr(os,args...);
}
#define dmp2(...) dmpr(cerr,__LINE__,##__VA_ARGS__)
#else
#define dmp2(...) void(0)
#endif

using uint=unsigned;
using ull=unsigned long long;

template<class t,size_t n>
ostream& operator<<(ostream&os,const array<t,n>&a){
	return os<<vc<t>(all(a));
}

ll rand_int(ll l, ll r) { //[l, r]
	//#ifdef LOCAL
	static mt19937_64 gen;
	/*#else
	static mt19937_64 gen(chrono::steady_clock::now().time_since_epoch().count());
	#endif*/
	return uniform_int_distribution<ll>(l, r)(gen);
}

ll rand_int(ll k){ //[0,k)
	return rand_int(0,k-1);
}
string rand_string(int n,char lw,char up){
	string s(n,'?');
	rep(i,n)s[i]=rand_int(lw,up);
	return s;
}

int current_run_id,run_batch_size=1000;
int calc_random_limit(){
	return current_run_id/run_batch_size+1;
}
template<class t>
void generate_single(t&a){
	a=rand_int(1,calc_random_limit());
}
void generate_single(string&a){
	int n;generate_single(n);
	a=rand_string(n,'a','b');
}
template<class t,class u>
void generate_single(pair<t,u>&a){
	generate_single(a.a);
	generate_single(a.b);
}
//https://trap.jp/post/1224/
template<class... Args>
void input(Args&... a){
	if(dbg){
		(generate_single(a),...);
	}else{
		#ifdef USE_FAST_IO
		sc.read(a...);
		#else
		(cin >> ... >> a);
		#endif
	}
}
#define INT(...) int __VA_ARGS__;input(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;input(__VA_ARGS__)
#define ULL(...) ull __VA_ARGS__;input(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;input(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;input(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;input(__VA_ARGS__)
#define LD(...) ld __VA_ARGS__;input(__VA_ARGS__)
#define overload3(a,b,c,d,...) d
#define VI2(name,size) vi name(size);rep(i_##name,size)input(name[i_##name]);
#define VI3(name,size,offset) vi name(size);rep(i_##name,size)input(name[i_##name]),name[i_##name]+=offset;
#define VI(...) overload3(__VA_ARGS__,VI3,VI2)(__VA_ARGS__)
#define VPI(name,size) vc<pi> name(size);rep(i_##name,size)input(name[i_##name]);
#define VVI(name,sizeN,sizeM) vvi name(sizeN,vi(sizeM));\
rep(i_##name,sizeN)rep(j_##name,sizeM)input(name[i_##name][j_##name]);
#define VS(name,size) vc<string> name(size);rep(i_##name,size)input(name[i_##name]);

#define overload5(a,b,c,d,e,f,...) f
#define VVC4(type,name,sizeN,sizeM) vvc<type> name(sizeN,vc<type>(sizeM));
#define VVC5(type,name,sizeN,sizeM,ini) vvc<type> name(sizeN,vc<type>(sizeM,ini));
#define VVC(...) overload5(__VA_ARGS__,VVC5,VVC4)(__VA_ARGS__)

template<class T>
T vvvc(T v){
	return v;
}

template<class T,class...Args>
auto vvvc(int n,T v,Args...args){
	return vector(n,vvvc(v,args...));
}

template<int i,class T>
void print_tuple(ostream&,const T&){
}

template<int i,class T,class H,class ...Args>
void print_tuple(ostream&os,const T&t){
	if(i)os<<",";
	os<<get<i>(t);
	print_tuple<i+1,T,Args...>(os,t);
}

template<class ...Args>
ostream& operator<<(ostream&os,const tuple<Args...>&t){
	os<<"{";
	print_tuple<0,tuple<Args...>,Args...>(os,t);
	return os<<"}";
}

void printsuc(int suc){
	#ifdef USE_FAST_IO
		if(suc==1)pr.write('\n');
		if(suc==2)pr.write(' ');
	#else
		if(suc==1){
			if(dbg)cout<<endl;
			else{
				#ifdef LOCAL
				cout<<endl;
				#else
				cout<<"\n";
				#endif
			}
		}
		if(suc==2)
			cout<<" ";
	#endif
}

template<class t>
void print_single(t x,int suc=1){
	#ifdef USE_FAST_IO
	pr.write(x);
	#else
	cout<<x;
	#endif
	printsuc(suc);
}

template<class t,class u>
void print_single(const pair<t,u>&p,int suc=1){
	print_single(p.a,2);
	print_single(p.b,suc);
}

template<class T>
void print_single(const vector<T>&v,int suc=1){
	rep(i,v.size())
		print_single(v[i],i==int(v.size())-1?3:2);
	printsuc(suc);
}

template<class T,size_t N>
void print_single(const array<T,N>&v,int suc=1){
	rep(i,N)
		print_single(v[i],i==int(N)-1?3:2);
	printsuc(suc);
}

template<class T>
void print(const T&t){
	print_single(t);
}

template<class T,class ...Args>
void print(const T&t,const Args&...args){
	print_single(t,2);
	print(args...);
}

template<class T>
void printvv(const vvc<T>&vs){
	for(const auto&row:vs)print(row);
}

string readString(){
	string s;
	cin>>s;
	return s;
}

template<class T>
T sq(const T& t){
	return t*t;
}

void YES(bool ex=true){
	cout<<"YES\n";
	if(ex)exit(0);
	#ifdef LOCAL
	cout.flush();
	#endif
}
void NO(bool ex=true){
	cout<<"NO\n";
	if(ex)exit(0);
	#ifdef LOCAL
	cout.flush();
	#endif
}
void Yes(bool ex=true){
	cout<<"Yes\n";
	if(ex)exit(0);
	#ifdef LOCAL
	cout.flush();
	#endif
}
void No(bool ex=true){
	cout<<"No\n";
	if(ex)exit(0);
	#ifdef LOCAL
	cout.flush();
	#endif
}
//#define CAPITAL
/*
void yes(bool ex=true){
	#ifdef CAPITAL
	cout<<"YES"<<"\n";
	#else
	cout<<"Yes"<<"\n";
	#endif
	if(ex)exit(0);
	#ifdef LOCAL
	cout.flush();
	#endif
}
void no(bool ex=true){
	#ifdef CAPITAL
	cout<<"NO"<<"\n";
	#else
	cout<<"No"<<"\n";
	#endif
	if(ex)exit(0);
	#ifdef LOCAL
	cout.flush();
	#endif
}*/
void possible(bool ex=true){
	#ifdef CAPITAL
	cout<<"POSSIBLE"<<"\n";
	#else
	cout<<"Possible"<<"\n";
	#endif
	if(ex)exit(0);
	#ifdef LOCAL
	cout.flush();
	#endif
}
void impossible(bool ex=true){
	#ifdef CAPITAL
	cout<<"IMPOSSIBLE"<<"\n";
	#else
	cout<<"Impossible"<<"\n";
	#endif
	if(ex)exit(0);
	#ifdef LOCAL
	cout.flush();
	#endif
}

constexpr ll ten(int n){
	return n==0?1:ten(n-1)*10;
}

const ll infLL=LLONG_MAX/3;

#ifdef int
const int inf=infLL;
#else
const int inf=INT_MAX/2-100;
#endif

int topbit(signed t){
	return t==0?-1:31-__builtin_clz(t);
}
int topbit(ll t){
	return t==0?-1:63-__builtin_clzll(t);
}
int topbit(ull t){
	return t==0?-1:63-__builtin_clzll(t);
}
int botbit(signed a){
	return a==0?32:__builtin_ctz(a);
}
int botbit(ll a){
	return a==0?64:__builtin_ctzll(a);
}
int botbit(ull a){
	return a==0?64:__builtin_ctzll(a);
}
int popcount(signed t){
	return __builtin_popcount(t);
}
int popcount(ll t){
	return __builtin_popcountll(t);
}
int popcount(ull t){
	return __builtin_popcountll(t);
}
int bitparity(ll t){
	return __builtin_parityll(t);
}
bool ispow2(int i){
	return i&&(i&-i)==i;
}
ll mask(int i){
	return (ll(1)<<i)-1;
}
ull umask(int i){
	return (ull(1)<<i)-1;
}
ll minp2(ll n){
	if(n<=1)return 1;
	else return ll(1)<<(topbit(n-1)+1);
}

bool inc(int a,int b,int c){
	return a<=b&&b<=c;
}

template<class S> void mkuni(S&v){
	sort(all(v));
	v.erase(unique(all(v)),v.ed);
}

template<class t> bool isuni(vc<t> v){
	int s=si(v);
	mkuni(v);
	return si(v)==s;
}

template<class t>
void myshuffle(vc<t>&a){
	rep(i,si(a))swap(a[i],a[rand_int(0,i)]);
}

template<class S,class u>
int lwb(const S&v,const u&a){
	return lower_bound(all(v),a)-v.bg;
}
template<class t,class u>
bool bis(const vc<t>&v,const u&a){
	return binary_search(all(v),a);
}

//VERIFY: yosupo
//KUPC2017J
//AOJDSL1A
//without rank
struct unionfind{
	vi p,s;
	int c;
	unionfind(int n):p(n,-1),s(n,1),c(n){}
	void clear(){
		fill(all(p),-1);
		fill(all(s),1);
		c=si(p);
	}
	int find(int a){
		return p[a]==-1?a:(p[a]=find(p[a]));
	}
	//set b to a child of a
	bool unite(int a,int b){
		a=find(a);
		b=find(b);
		if(a==b)return false;
		p[b]=a;
		s[a]+=s[b];
		c--;
		return true;
	}
	bool same(int a,int b){
		return find(a)==find(b);
	}
	int sz(int a){
		return s[find(a)];
	}
};

vvc<int> readGraph(int n,int m){
	vvc<int> g(n);
	rep(i,m){
		int a,b;
		cin>>a>>b;
		//sc.read(a,b);
		a--;b--;
		g[a].pb(b);
		g[b].pb(a);
	}
	return g;
}

vvc<int> rand_tree(int n){
	vvc<int> t(n);
	unionfind uf(n);
	while(uf.c>1){
		int a=rand_int(n);
		int b=rand_int(n);
		if(uf.unite(a,b)){
			t[a].pb(b);
			t[b].pb(a);
		}
	}
	return t;
}

vvc<int> readTree(int n){
	if(dbg){
		return rand_tree(n);
	}else{
		return readGraph(n,n-1);
	}
}

vi readRooted(int n){
	assert(!dbg);
	vi par(n,-1);
	rng(i,1,n){
		input(par[i]);
		par[i]--;
		assert(inc(0,par[i],i-1));
	}
	return par;
}

void printTree(const vvc<int> t){
	int n=si(t);
	int degsum=0;
	rep(i,n)degsum+=si(t[i]);
	if(degsum==n-1){
		//directed
		rep(i,si(t))for(auto j:t[i]){
			print(i+1,j+1);
		}
	}else if(degsum==2*(n-1)){
		//undirected
		rep(i,si(t))for(auto j:t[i])if(i<j){
			print(i+1,j+1);
		}
	}else{
		assert(false);
	}
}

template<class t>
vc<t> presum(const vc<t>&a){
	vc<t> s(si(a)+1);
	rep(i,si(a))s[i+1]=s[i]+a[i];
	return s;
}
vc<ll> presum(const vi&a){
	vc<ll> s(si(a)+1);
	rep(i,si(a))s[i+1]=s[i]+a[i];
	return s;
}
//BIT で数列を管理するときに使う (CF850C)
template<class t>
vc<t> predif(vc<t> a){
	gnr(i,1,si(a))a[i]-=a[i-1];
	return a;
}
template<class t>
vvc<ll> imos(const vvc<t>&a){
	int n=si(a),m=si(a[0]);
	vvc<ll> b(n+1,vc<ll>(m+1));
	rep(i,n)rep(j,m)
		b[i+1][j+1]=b[i+1][j]+b[i][j+1]-b[i][j]+a[i][j];
	return b;
}

//verify してないや
void transvvc(int&n,int&m){
	swap(n,m);
}
template<class t,class... Args>
void transvvc(int&n,int&m,vvc<t>&a,Args&...args){
	assert(si(a)==n);
	vvc<t> b(m,vi(n));
	rep(i,n){
		assert(si(a[i])==m);
		rep(j,m)b[j][i]=a[i][j];
	}
	a.swap(b);
	transvvc(n,m,args...);
}
//CF854E
void rotvvc(int&n,int&m){
	swap(n,m);
}
template<class t,class... Args>
void rotvvc(int&n,int&m,vvc<t>&a,Args&...args){
	assert(si(a)==n);
	vvc<t> b(m,vi(n));
	rep(i,n){
		assert(si(a[i])==m);
		rep(j,m)b[m-1-j][i]=a[i][j];
	}
	a.swap(b);
	rotvvc(n,m,args...);
}

//ソートして i 番目が idx[i]
//CF850C
template<class t>
vi sortidx(const vc<t>&a){
	int n=si(a);
	vi idx(n);iota(all(idx),0);
	sort(all(idx),[&](int i,int j){return a[i]<a[j];});
	return idx;
}
//vs[i]=a[idx[i]]
//例えば sortidx で得た idx を使えば単にソート列になって返ってくる
//CF850C
template<class t>
vc<t> a_idx(const vc<t>&a,const vi&idx){
	int n=si(a);
	assert(si(idx)==n);
	vc<t> vs(n);
	rep(i,n)vs[i]=a[idx[i]];
	return vs;
}
//CF850C
vi invperm(const vi&p){
	int n=si(p);
	vi q(n);
	rep(i,n)q[p[i]]=i;
	return q;
}

template<class t,class s=t>
s SUM(const vc<t>&a){
	return accumulate(all(a),s(0));
}
template<class t,size_t K,class s=t>
s SUM(const array<t,K>&a){
	return accumulate(all(a),s(0));
}

template<class t>
t MAX(const vc<t>&a){
	return *max_element(all(a));
}

template<class t>
pair<t,int> MAXi(const vc<t>&a){
	auto itr=max_element(all(a));
	return mp(*itr,itr-a.bg);
}

template<class A>
auto MIN(const A&a){
	return *min_element(all(a));
}

template<class t>
pair<t,int> MINi(const vc<t>&a){
	auto itr=min_element(all(a));
	return mp(*itr,itr-a.bg);
}

vi vid(int n){
	vi res(n);iota(all(res),0);
	return res;
}

template<class S>
void soin(S&s){
	sort(all(s));
}

template<class S,class F>
void soin(S&s,F&&f){
	sort(all(s),forward<F>(f));
}

template<class S>
S soout(S s){
	soin(s);
	return s;
}

template<class S>
void rein(S&s){
	reverse(all(s));
}

template<class S>
S reout(S s){
	rein(s);
	return s;
}

template<class t,class u>
pair<t,u>&operator+=(pair<t,u>&a,pair<t,u> b){
	a.a+=b.a;a.b+=b.b;return a;}
template<class t,class u>
pair<t,u>&operator-=(pair<t,u>&a,pair<t,u> b){
	a.a-=b.a;a.b-=b.b;return a;}
template<class t,class u>
pair<t,u> operator+(pair<t,u> a,pair<t,u> b){return mp(a.a+b.a,a.b+b.b);}
template<class t,class u>
pair<t,u> operator-(pair<t,u> a,pair<t,u> b){return mp(a.a-b.a,a.b-b.b);}
template<class t,class u,class v>
pair<t,u>&operator*=(pair<t,u>&a,v b){
	a.a*=b;a.b*=b;return a;}
template<class t,class u,class v>
pair<t,u> operator*(pair<t,u> a,v b){return a*=b;}
template<class t,class u>
pair<t,u> operator-(pair<t,u> a){return mp(-a.a,-a.b);}
namespace std{
template<class t,class u>
istream&operator>>(istream&is,pair<t,u>&a){
	return is>>a.a>>a.b;
}
}

template<class t>
t gpp(vc<t>&vs){
	assert(si(vs));
	t res=move(vs.back());
	vs.pop_back();
	return res;
}

template<class t,class u>
void pb(vc<t>&a,const vc<u>&b){
	a.insert(a.ed,all(b));
}

template<class t,class...Args>
vc<t> cat(vc<t> a,Args&&...b){
	(pb(a,forward<Args>(b)),...);
	return a;
}

template<class t,class u>
vc<t>& operator+=(vc<t>&a,u x){
	for(auto&v:a)v+=x;
	return a;
}

template<class t,class u>
vc<t> operator+(vc<t> a,u x){
	return a+=x;
}

template<class t>
vc<t>& operator+=(vc<t>&a,const vc<t>&b){
	a.resize(max(si(a),si(b)));
	rep(i,si(b))a[i]+=b[i];
	return a;
}

template<class t>
vc<t> operator+(const vc<t>&a,const vc<t>&b){
	vc<t> c(max(si(a),si(b)));
	rep(i,si(a))c[i]+=a[i];
	rep(i,si(b))c[i]+=b[i];
	return c;
}

template<class t,class u>
vc<t>& operator-=(vc<t>&a,u x){
	for(auto&v:a)v-=x;
	return a;
}
template<class t,class u>
vc<t> operator-(vc<t> a,u x){
	return a-=x;
}
template<class t>
vc<t>& operator-=(vc<t>&a,const vc<t>&b){
	a.resize(max(si(a),si(b)));
	rep(i,si(b))a[i]-=b[i];
	return a;
}
/*
template<class t>
vc<t> operator-(const vc<t>&a,const vc<t>&b){
	vc<t> c(max(si(a),si(b)));
	rep(i,si(a))c[i]+=a[i];
	rep(i,si(b))c[i]-=b[i];
	return c;
}
*/
template<class t,class u>
vc<t>& operator*=(vc<t>&a,u x){
	for(auto&v:a)v*=x;
	return a;
}
template<class t,class u>
vc<t> operator*(vc<t> a,u x){
	return a*=x;
}

template<class t,class u>
vc<t>& operator/=(vc<t>&a,u x){
	for(auto&v:a)v/=x;
	return a;
}
template<class t,class u>
vc<t> operator/(vc<t> a,u x){
	return a/=x;
}

template<class t>
vc<t>& operator<<=(vc<t>&a,int k){
	assert(k>=0);
	a.insert(a.bg,k,t(0));
	return a;
}
template<class t>
vc<t> operator<<(vc<t> a,int k){
	return a<<=k;
}

template<class t>
vc<t>& operator>>=(vc<t>&a,int k){
	if(si(a)<=k)a.clear();
	else a.erase(a.bg,a.bg+k);
	return a;
}
template<class t>
vc<t> operator>>(vc<t> a,int k){
	return a>>=k;
}

template<class t,class u>
void remval(vc<t>&a,const u&v){
	a.erase(remove(all(a),v),a.ed);
}
//消した要素の個数を返してくれる
//UCUP 2-8-F
template<class t,class F>
int remif(vc<t>&a,F f){
	auto itr=remove_if(all(a),f);
	int res=a.ed-itr;
	a.erase(itr,a.ed);
	return res;
}
template<class t>
void rempos(vc<t>&a,int i){
	assert(inc(0,i,si(a)-1));
	a.erase(a.bg+i);
}

template<class VS,class u>
void fila(VS&vs,const u&a){
	fill(all(vs),a);
}

template<class t,class u>
int findid(const vc<t>&vs,const u&a){
	auto itr=find(all(vs),a);
	if(itr==vs.ed)return -1;
	else return itr-vs.bg;
}

template<class t>
void rtt(vc<t>&vs,int i){
	rotate(vs.bg,vs.bg+i,vs.ed);
}

//Multiuni2023-8 C
//f(lw)=false,...,f(n-1)=false,f(n)=true,...,f(up)=true,
//のときに n を返す
template<class F>
int find_min_true(int lw,int up,F f){
	while(up-lw>1){
		const int mid=(lw+up)/2;
		if(f(mid))up=mid;
		else lw=mid;
	}
	return up;
}
//f(lw)=true,f(up)=false
template<class F>
int find_max_true(int lw,int up,F f){
	while(up-lw>1){
		const int mid=(lw+up)/2;
		if(f(mid))lw=mid;
		else up=mid;
	}
	return lw;
}

template<class t> using pqmin=priority_queue<t,vc<t>,greater<t>>;
template<class t> using pqmax=priority_queue<t>;
using T=tuple<int,int,int>;

//copied from yosupo's library
//PARTLY VERIFIED

//USACO 2022 January ptlatinum C

#define GEOF

#ifdef GEOF
using ld=long double;
//using ld=double;
const ld PI=acos(ld(-1));
#else
using ld=ll;
#endif
const ld eps=1e-9;
int sgn(ld a){return a<-eps?-1:(a>eps?1:0);}
int sgn(ld a,ld b){return sgn(a-b);}
/*
using pt=complex<ld>;
#define x real()
#define y imag()
*/
struct pt {
    ld x,y;
    //pt(ld _x = ld(0), ld _y = ld(0)) : x(_x), y(_y) {}
    pt():x(0),y(0){}
    pt(ld xx,ld yy):x(xx),y(yy){}
    pt operator+(const pt& r) const { return {x + r.x, y + r.y}; }
    pt operator-(const pt& r) const { return {x - r.x, y - r.y}; }
    pt operator*(const pt& r) const {
        return {x * r.x - y * r.y, x * r.y + y * r.x};
    }
    pt inv()const{
		ld d=norm();
		return {x/d,-y/d};
	}
    pt operator/(const pt&r)const{
		return operator*(r.inv());
	}

    pt operator*(const ld& r) const { return {x * r, y * r}; }
    pt operator/(const ld& r) const { return {x / r, y / r}; }

    pt& operator+=(const pt& r) { return *this = *this + r; }
    pt& operator-=(const pt& r) { return *this = *this - r; }
    pt& operator*=(const pt& r) { return *this = *this * r; }
    pt& operator/=(const pt& r) { return *this = *this / r; }
    pt& operator*=(const ld& r) { return *this = *this * r; }
    pt& operator/=(const ld& r) { return *this = *this / r; }

    pt operator-() const { return {-x, -y}; }

	static int cmp(const pt&a,const pt&b){
		int v=sgn(a.x,b.x);
		return v?v:sgn(a.y,b.y);
	}
    bool operator<(const pt& r) const {
        return cmp(*this,r)<0;
    }
    bool operator<=(const pt& r) const {
        return cmp(*this,r)<=0;
    }
    bool operator>(const pt& r) const {
        return cmp(*this,r)>0;
    }
    bool operator==(const pt& r) const { return sgn((*this - r).rabs()) == 0; }
    bool operator!=(const pt& r) const { return !(*this == r); }

    ld norm() const { return x * x + y * y; }
    ld rabs() const { return max(std::abs(x), std::abs(y)); }  // robust abs
    pair<ld, ld> to_pair() const { return {x, y}; }
    #ifdef GEOF
    ld abs() const { return sqrt(norm()); }
    ld arg() const { return atan2(y, x); }
    static pt polar(ld le, ld th) { return {le * cos(th), le * sin(th)}; }
	#endif
};
istream& operator>>(istream& is, pt& p){
	return is>>p.x>>p.y;
}
ostream& operator<<(ostream& os, const pt& p) {
    return os << "pt(" << p.x << ", " << p.y << ")";
}
ld norm(const pt&a){
	return a.norm();
}
ld rabs(const pt&a){
	return a.rabs();
}
#ifdef GEOF
ld abs(const pt&a){
	return sqrt(norm(a));
}
//XXII Opencup Gpt of Ural K
pt normalized(const pt&a){
	return a/abs(a);
}
ld arg(const pt&a){return a.arg();}
//normalize to [-PI,PI)
//Contest 2: ptKU Contest 1, ptTZ Summer 2022 Day 4
ld normarg(ld a){
	ld res=fmod(a+PI,2*PI);
	if(res<0)res+=PI;
	else res-=PI;
	return res;
}
//normalize to [0,2*PI)
//Multiuni2023-10-E
ld normarg_nonnegative(ld a){
	ld res=fmod(a,2*PI);
	if(res<0)res+=2*PI;
	return res;
}
//AOJ1183
//arg between ab
//assume given lengths are valid
ld arg(ld a,ld b,ld c){
	return acos(min(max((a*a+b*b-c*c)/(2*a*b),ld(-1)),ld(1)));
}
//UCUP 2-20-D
ld heron(ld a,ld b,ld c){
	ld s=(a+b+c)/2;
	return sqrt(s*(s-a)*(s-b)*(s-c));
}
#endif
ld norm(const pt&a,const pt&b){
	return (a-b).norm();
}
ld dot(const pt&a,const pt&b){return a.x*b.x+a.y*b.y;}
ld crs(const pt& a,const pt& b){return a.x*b.y-a.y*b.x;}
ld crs(const pt& a,const pt& b,const pt& c){return crs(b-a,c-a);}
int ccw(const pt& a,const pt& b){return sgn(crs(a,b));}
int ccw(const pt& a,const pt& b,const pt& c){return ccw(b-a,c-a);}
//(-pi,0](0,pi]
int argtype(const pt&a){
	if(sgn(a.y)==0)return a.x<0?1:0;
	return a.y<0?0:1;
}
int argcmp(const pt&a,const pt&b){
	int at=argtype(a),bt=argtype(b);
	if(at!=bt)return at<bt?-1:1;
	return -ccw(a,b);
};
bool argless(const pt&a,const pt&b){return argcmp(a,b)<0;}
//c の位置を聞く関数です,b じゃないです
//(-2)[a,-1](0)[b,1](2)
int bet(pt a,pt b,pt c){
	pt d=b-a;
	ld e=dot(d,c-a);
	if(sgn(e)<=0)return sgn(e)-1;
	return sgn(e-norm(d))+1;
}
//AOJ0153
//三角形 abc に d が含まれるか?0-no,1-edge,2-in
int cont(pt a,pt b,pt c,pt d){
	if(ccw(a,b,c)==-1) swap(b,c);
	return min({ccw(a,b,d),ccw(b,c,d),ccw(c,a,d)})+1;
}
//(a,b) を結ぶ直線を考え,x 座標との交点の y 座標を求める
//(分子,分母)を返す
pair<ld,ld> xcut(const pt&a,const pt&b,ld x){
	return mp(a.y*(b.x-x)-b.y*(a.x-x),b.x-a.x);
}
//XXII Opencup Gpt of Ural K
pt rot90(pt a){
	return pt(-a.y,a.x);
}
#ifdef GEOF
//Multiuni 2024-6-C
pt rot(pt a,ld b){
	ld c=cos(b),s=sin(b);
	return pt(a.x*c-a.y*s,a.x*s+a.y*c);
}
ld xcutval(const pt&a,const pt&b,ld x){
	auto [p,q]=xcut(a,b,x);
	return p/q;
}
//AOJ1183
//Xmas2010 E
//-+ の 順で返す
//a の符号により,small/large が決まる
int qeq(ld a,ld b,ld c,ld&d,ld&e){
	if(sgn(a)==0){
		if(sgn(b)==0)return 0;
		d=-c/b;
		return 1;
	}
	ld f=b*b-4*a*c;
	if(sgn(f)<0)return 0;
	ld g=sqrt(max(f,ld(0)));
	d=(-b-g)/(2*a);
	e=(-b+g)/(2*a);
	return sgn(f)+1;
}
#else
pt normdir(pt a){
	if(a==pt(0,0))return a;
	int g=gcd(a.x,a.y);
	return pt(a.x/g,a.y/g);
}
#endif

ld area2(const vc<pt>&ps){
	ld res=0;
	rep(i,si(ps))res+=crs(ps[i],ps[(i+1)%si(ps)]);
	return res;
}

using ln=pair<pt,pt>;
pt dir(ln a){return a.b-a.a;}
pt eval(ln a,ld b){return a.a+dir(a)*b;}
ld crs(ln a,pt b){return crs(a.a,a.b,b);}
int ccw(ln a,pt b){return ccw(a.a,a.b,b);}
int bet(ln a,pt b){return bet(a.a,a.b,b);}
ld projt(ln a,pt b){
	pt c=dir(a);
	return dot(c,b-a.a)/norm(c);
}
pt proj(ln a,pt b){
	pt c=dir(a);
	return a.a+c*dot(c,b-a.a)/norm(c);
}
pt refl(ln a,pt b){
	return proj(a,b)*2-b;
}
//AOJ1157
//0-no,1-yes(endpoint),2-yes(innner),3-overelap
//if the two line touch like this
// x----x----x
//it returns 1
int iss(ln a,ln b){
	int c1=ccw(a.a,a.b,b.a),c2=ccw(a.a,a.b,b.b);
	int d1=ccw(b.a,b.b,a.a),d2=ccw(b.a,b.b,a.b);
	if(c1||c2||d1||d2)return 1-max(c1*c2,d1*d2);
	int f=bet(a.a,a.b,b.a),g=bet(a.a,a.b,b.b);
	if(max(f,g)==-2||min(f,g)==2)return 0;
	if(max(f,g)==-1||min(f,g)==1)return 1;
	return 3;
}
//segment a intersects line b?
//endpoints inclusive
bool isl(ln a,ln b){
	int d1=ccw(b.a,b.b,a.a),d2=ccw(b.a,b.b,a.b);
	return d1*d2<=0;
}
//並行でない->true, というだけ
//直線が一致とかは考えてないことに注意
bool ill(ln a,ln b){
	return ccw(dir(a),dir(b));
}
ld cllt(ln a,ln b){
	return crs(b.a,b.b,a.a)/crs(dir(a),dir(b));
}
//ICPC Yokohama 2022 J
pair<ld,ld> clltf(ln a,ln b){
	return mp(crs(b.a,b.b,a.a),crs(dir(a),dir(b)));
}
//AOJ1033
pt cll(ln a,ln b){
	return eval(a,crs(b.a,b.b,a.a)/crs(dir(a),dir(b)));
}
//UCUP3-4-H
bool isp(ln a,pt b){
	return ccw(a,b)==0&&inc(-1,bet(a.a,a.b,b),1);
}
#ifdef GEOF
//AOJ2201
ld dlp(ln a,pt b){
	return abs(crs(a,b)/abs(dir(a)));
}
//AOJ0153
ld dsp(ln a,pt b){
	pt c=proj(a,b);
	if(abs(bet(a.a,a.b,c))<=1)return abs(b-c);
	return min(abs(b-a.a),abs(b-a.b));
}
//ABC314H
//b から最も近い a 上の点を返す
pt dsp_tar(ln a,pt b){
	pt c=proj(a,b);
	if(abs(bet(a.a,a.b,c))<=1)return c;
	return abs(b-a.a)<abs(b-a.b)?a.a:a.b;
}
//AOJ1157
ld dss(ln a,ln b){
	if(iss(a,b))return 0;
	return min({dsp(a,b.a),dsp(a,b.b),dsp(b,a.a),dsp(b,a.b)});
}
//AOJ2160
//反時計回り方向に伸びる垂直二等分線
ln vbis(pt a,pt b){
	pt c=(a+b)*ld(0.5),d=b-a;
	return ln(c,pt(c.x-d.y,c.y+d.x));
}
ld cutareat(ln z,ld l,ld r){
	pt a=eval(z,l);
	pt b=eval(z,r);
	return -(b.x-a.x)*(a.y+b.y)/2;
}
#endif
//ABC286H
//simple polygon と線分が交わるか
//接している場合も true
/*
bool icl(const vc<pt>&ps,ln z){
	int n=si(ps);
	rep(i,n){
		pt p=ps[i],q=ps[(i+1)%n];
		if(iss(z,ln(p,q)))return true;
	}
	return cont(ps,z.a);
}*/


//stress-test してません
vc<pt> lower_convex(const vc<pt>&ps,bool onedge){
	vc<pt> res;
	assert(is_sorted(all(ps)));
	for(auto p:ps){
		int s;
		while((s=si(res))>=2){
			if(ccw(res[s-2],res[s-1],p)<=(onedge?-1:0))res.pop_back();
			else break;
		}
		res.pb(p);
	}
	return res;
}
vc<pt> upper_convex(const vc<pt>&ps,bool onedge){
	vc<pt> res;
	assert(is_sorted(all(ps)));
	for(auto p:ps){
		int s;
		while((s=si(res))>=2){
			if(ccw(res[s-2],res[s-1],p)>=(onedge?1:0))res.pop_back();
			else break;
		}
		res.pb(p);
	}
	return res;
}
vc<pt> convex(vc<pt> ps,bool onedge){
	mkuni(ps);
	if(si(ps)<=1)return ps;
	auto lw=lower_convex(ps,onedge);
	auto up=upper_convex(ps,onedge);
	lw.pop_back();
	rein(up);
	up.pop_back();
	pb(lw,up);
	return lw;
}

vc<pt> halfpint(vc<ln> s){
	sort(all(s),[&](ln a,ln b){
		int c=argcmp(dir(a),dir(b));
		if(c)return c<0;
		return ccw(b,a.a)>0;
	});
	s.erase(unique(all(s),[&](ln a,ln b){
		return argcmp(dir(a),dir(b))==0;
	}),s.ed);
	int n=si(s);
	vi cur;
	rep(ii,n*2){
		int i=ii%n,m;
		while((m=si(cur))>=2){
			if(ccw(s[i],cll(s[cur[m-2]],s[cur[m-1]]))>0)break;
			cur.pop_back();
		}
		cur.pb(i);
	}
	vi cnt(n);
	for(auto i:cur)cnt[i]++;
	vc<ln> t;
	rep(i,n)if(cnt[i]==2)t.pb(s[i]);
	int m=si(t);
	vc<pt> res(m);
	rep(i,m)res[i]=cll(t[i],t[(i+1)%m]);
	return res;
}

//UCUP 3-15-M
vc<pt> common_convex(const vc<pt>&a,const vc<pt>&b){
	if(si(a)<=2||si(b)<=2)return {};
	vc<ln> ls;
	rep(i,si(a))ls.eb(a[i],a[(i+1)%si(a)]);
	rep(i,si(b))ls.eb(b[i],b[(i+1)%si(b)]);
	return halfpint(ls);
}

//MIPT-2016 Pre-Finals Workshop, Taiwan NTU Contest G
//上がって下がる
//最大や最小では同じ値を 2 個までとっても許される
//それ以外は隣あうところは全部違う値にしてくれ
template<class t,class F>
int periodic_max(const vc<t>&v,F f_){
	int n=v.size();
	if(n==1)return 0;
	
	auto f=[&](int i){
		return f_(v[i%n]);
	};
	
	auto h=f(0);
	bool up=h<f(1);
	
	int lb=0,ub=n;
	while(ub-lb>1){
		int m=(ub+lb)/2;
		if(f(m)<h){
			if(up)ub=m;
			else lb=m;
		}else{
			if(f(m)<f(m+1))lb=m;
			else ub=m;
		}
	}
	
	return f(lb)<f(ub)?ub%n:lb%n;
}

vc<pt> common_convex_nazo(const vc<pt>&a,const vc<pt>&b){
	if(si(a)<=2||si(b)<=2)return {};
	
	//dmp(a);
	//dmp(b);
	
	int k=si(a);
	int n=si(b);
	
	vc<ln> ls;
	rep(i,k)ls.eb(a[i],a[(i+1)%k]);
	auto push=[&](int i){
		assert(i>=0);
		ls.eb(b[i%n],b[(i+1)%n]);
	};
	int ini=0;
	vc<pi> qs;
	auto add=[&](int L,int R){
		assert(inc(0,L,n-1));
		assert(inc(0,R,n-1));
		assert(L!=R);
		
		qs.eb(L,1);
		qs.eb(R,-1);
		if(L>R)ini++;
		
		push(L);
		push(R);
	};
	
	rep(step,k){
		pt u=a[step],v=a[(step+1)%k];
		int mxi=periodic_max(b,[&](pt z){
			return crs(u,v,z);
		});
		int mni=periodic_max(b,[&](pt z){
			return -crs(u,v,z);
		});
		if(ccw(u,v,b[mni])>=0){
			ini++;
		}else if(ccw(u,v,b[mxi])<=0){
			return {};
		}else{
			int L,R;
			{//adder
				int dist=mxi-mni;
				if(dist<0)dist+=n;
				int i=find_max_true(0,dist,[&](int d){
					return ccw(u,v,b[(mni+d)%n])<0;
				});
				L=(i+mni)%n;
			}
			{//del
				int dist=mni-mxi;
				if(dist<0)dist+=n;
				int i=find_max_true(0,dist,[&](int d){
					return ccw(u,v,b[(mxi+d)%n])>0;
				});
				R=(i+mxi)%n;
			}
			add(L,R);
		}
	}
	
	if(qs.empty()){
		if(ini==k)return b;
		else return {};
	}
	//dmp(0);
	soin(qs);
	//dmp(qs);
	//dmp(ini);
	int len=si(qs);
	int cur=ini,mx=cur;
	rep(i,len){
		cur+=qs[i].b;
		chmax(mx,cur);
		if(cur==k){
			int l=qs[i].a+1;
			int r=i+1<len?qs[i+1].a:qs[0].a+n;
			rng(j,l,r){
				push(j);
			}
		}
	}
	
	return halfpint(ls);
}

void slv(){
	INT(n,w);
	vc<pt> ps(n);
	rep(i,n)cin>>ps[i];
	//ps=convex(ps,false);
	//n=si(ps);
	pt R;cin>>R;
	
	pt cent;
	rng(i,2,n){
		pt c=(ps[0]+ps[i-1]+ps[i])/3;
		cent+=c*crs(ps[0],ps[i-1],ps[i]);
	}
	ld sall=area2(ps);
	//cent/=sall;
	
	vc<pt> z(n);
	rep(i,n){
		z[i]=(cent+ps[i]*(w*2))/(w*2+sall);
	}
	
	z=convex(z,false);
	ld den=area2(z);
	
	rep(i,n){
		vc<pt> a{R,ps[i],ps[(i+1)%n]};
		auto b=common_convex_nazo(a,z);
		ld num=area2(b);
		print(num/den);
	}
}

signed main(signed argc,char*argv[]){
	if(argc>1&&strcmp(argv[1],"D")==0)dbg=true;
	
	cin.tie(0);
	ios::sync_with_stdio(0);
	cout<<fixed<<setprecision(20);
	
	if(dbg){
		while(1){
			if(current_run_id%run_batch_size==0){
				cerr<<"Current Run "<<current_run_id<<endl;
			}
			slv();
			current_run_id++;
		}
	}else{
		//int t;cin>>t;rep(_,t)
		slv();
	}
}

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

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 4004kb

input:

5 5
1 0
3 0
4 2
2 4
0 2
2 2

output:

0.31377777777777777788
0.23555555555555555565
0.10755555555555555576
0.10755555555555555546
0.23555555555555555536

result:

ok 5 numbers

Test #2:

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

input:

8 8
0 0
1 0
2 0
2 1
2 2
1 2
0 2
0 1
1 1

output:

0.12499999999999999997
0.12499999999999999997
0.12500000000000000000
0.12500000000000000000
0.12500000000000000000
0.12500000000000000000
0.12499999999999999999
0.12499999999999999999

result:

ok 8 numbers

Test #3:

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

input:

3 3
-1 -10
1 -10
0 1
0 0

output:

1.00000000000000000000
0.00000000000000000000
0.00000000000000000000

result:

ok 3 numbers

Test #4:

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

input:

4 36000000
-30000 -30000
30000 -30000
30000 30000
-30000 30000
1 0

output:

0.24999861106481327163
0.24832777787037345659
0.24999861106481327113
0.25167500000000000006

result:

ok 4 numbers

Test #5:

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

input:

4 2500
5 0
5 5
0 5
0 0
1 1

output:

0.40297750000000000001
0.40297749999999999998
0.09702250000000000000
0.09702250000000000000

result:

ok 4 numbers

Test #6:

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

input:

100 1000000000
30000 0
29940 1883
29763 3759
29468 5621
29057 7460
28531 9270
27893 11043
27144 12773
26289 14452
25329 16074
24270 17633
23115 19122
21869 20536
20536 21869
19122 23115
17633 24270
16074 25329
14452 26289
12773 27144
11043 27893
9270 28531
7460 29057
5621 29468
3759 29763
1883 29940...

output:

0.00999672209375537882
0.00999875879377054636
0.01000365444769571514
0.00999923807022828558
0.01000207158382810218
0.00999912301185516328
0.01000392088908033528
0.00999866491311614469
0.01000214850283196927
0.01000148621819151728
0.01000051407800323591
0.01000176738361927638
0.01000456724032158770
0...

result:

ok 100 numbers

Test #7:

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

input:

100 1000000000
30000 0
29952 1695
29808 3385
29569 5065
29235 6728
28808 8369
28289 9984
27680 11567
26982 13113
26197 14617
25329 16074
24380 17480
23353 18830
22252 20120
21079 21346
19839 22503
18535 23588
17172 24598
15755 25529
14287 26379
12773 27144
11218 27823
9628 28412
8007 28911
6360 2931...

output:

0.00914182114203161028
0.00914254204287656840
0.00914495024386415336
0.00913904157016419459
0.00913367438393174642
0.00913500846487416522
0.00913119405018785445
0.00912932670930750410
0.00912768898566805600
0.00912132854131134475
0.00911987411839554678
0.00911610543524533750
0.00911117284044671201
0...

result:

ok 100 numbers

Test #8:

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

input:

3 1000000000
30000 0
-14999 25980
-15000 -25980
0 0

output:

0.33334569696569385771
0.33330860606861228450
0.33334569696569385771

result:

ok 3 numbers

Test #9:

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

input:

3 1000000000
30000 0
-3135 29835
-29344 -6237
-827 7866

output:

0.33336328281047293744
0.33329712305890260985
0.33333959413062445274

result:

ok 3 numbers

Test #10:

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

input:

3 1000000000
30000 0
9270 28531
-24270 17633
5000 15388

output:

0.33333333333333333329
0.33333333333333333337
0.33333333333333333323

result:

ok 3 numbers

Test #11:

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

input:

3 1000000000
30000 0
27406 12202
20073 22294
25826 11498

output:

0.33343070643893932107
0.33347196265261948598
0.33309733090844119394

result:

ok 3 numbers

Test #12:

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

input:

3 10000
30000 0
29993 628
29973 1256
29988 628

output:

0.42268427943020001766
0.42268427943019869217
0.15463144113960129021

result:

ok 3 numbers

Test #13:

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

input:

100 1000000000
30000 0
29962 1507
29848 3010
29659 4506
29395 5991
29057 7460
28645 8911
28162 10339
27606 11741
26982 13113
26289 14452
25529 15755
24705 17018
23819 18237
22873 19411
21869 20536
20809 21609
19697 22627
18535 23588
17327 24490
16074 25329
14781 26105
13451 26815
12087 27457
10692 2...

output:

0.00879082151692803165
0.00877588997999967163
0.00876459390124066008
0.00875143993368946913
0.00873009333637040357
0.00871877236812350310
0.00869651859955789456
0.00868235435372555861
0.00865835717988919734
0.00864177808270269917
0.00862626702741680552
0.00860387386319004610
0.00857735594478107741
0...

result:

ok 100 numbers

Test #14:

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

input:

100 1000000000
30000 0
29997 376
29990 753
29978 1130
29962 1507
29940 1883
29914 2259
29884 2635
29848 3010
29808 3385
29763 3759
29713 4133
29659 4506
29600 4879
29536 5250
29468 5621
29395 5991
29318 6360
29235 6728
29148 7094
29057 7460
28961 7825
28860 8188
28755 8550
28645 8911
28531 9270
2841...

output:

0.01156777952461395054
0.01137220742827091703
0.01109577390869189998
0.01088027030961731127
0.01053439296555478515
0.01033016083030515670
0.01013155694197454687
0.00981129860173633613
0.00962393624000140140
0.00936623941303236858
0.00914605094598173249
0.00894534351791360980
0.00873913211450867516
0...

result:

ok 100 numbers

Test #15:

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

input:

100 1000000000
30000 0
29990 753
29962 1507
29914 2259
29848 3010
29763 3759
29659 4506
29536 5250
29395 5991
29235 6728
29057 7460
28860 8188
28645 8911
28412 9628
28162 10339
27893 11043
27606 11741
27303 12431
26982 13113
26644 13787
26289 14452
25917 15108
25529 15755
25125 16391
24705 17018
242...

output:

0.01067057225127140328
0.01051079081465533817
0.01029771466459402268
0.01012540112862557241
0.00993856403910476662
0.00976023873199534769
0.00957632166239848901
0.00940799107036917567
0.00922727122468233239
0.00904749290610763829
0.00888406910081119310
0.00872093193355625682
0.00855261792411448238
0...

result:

ok 100 numbers

Test #16:

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

input:

3 450
0 0
3 0
0 3
1 1

output:

0.33333333333333333342
0.33333333333333333315
0.33333333333333333342

result:

ok 3 numbers

Test #17:

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

input:

500 1000000000
30000 0
29997 376
29990 753
29978 1130
29962 1507
29940 1883
29914 2259
29884 2635
29848 3010
29808 3385
29763 3759
29713 4133
29659 4506
29600 4879
29536 5250
29468 5621
29395 5991
29318 6360
29235 6728
29148 7094
29057 7460
28961 7825
28860 8188
28755 8550
28645 8911
28531 9270
2841...

output:

0.00199532618757522553
0.00200089836008306172
0.00200156420554923283
0.00200236357378682920
0.00199866266580359524
0.00199999471043185313
0.00200159273948275822
0.00199910255612858123
0.00200123184674727563
0.00199895229332170615
0.00200227621515891448
0.00199994395994306986
0.00200392842161065265
0...

result:

ok 500 numbers

Test #18:

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

input:

42 229772401
-29799 -29998
-14711 -29999
13003 -30000
13722 -30000
19205 -30000
23211 -30000
29047 -29998
29748 -29996
29950 -29953
29999 -29615
30000 -25983
30000 -18947
30000 -15272
30000 -6048
30000 -5983
30000 -3733
30000 15793
30000 19010
30000 19045
29999 29809
29931 29905
29799 29961
29153 29...

output:

0.06287207479788093050
0.11548326951543895239
0.00299609490856497211
0.02284782809474584467
0.01669312408308441607
0.02432525169831332248
0.00292897651298028112
0.00101958701368029925
0.00161224402232589440
0.01516326666792218680
0.02936768220986933434
0.01533914613177025853
0.03850021331141465710
0...

result:

ok 42 numbers

Test #19:

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

input:

74 385706227
-13913 -30000
-12810 -30000
-10465 -30000
-2263 -30000
3076 -30000
4342 -30000
7648 -30000
10069 -30000
11118 -30000
17186 -30000
17867 -30000
18197 -30000
19845 -30000
23920 -30000
24670 -30000
28450 -30000
29793 -29998
29954 -29995
29992 -29881
29999 -29275
30000 -24844
30000 -21107
3...

output:

0.00459917919353768162
0.00977794669886297675
0.03419988009555400235
0.02226202875276308442
0.00527884030736056656
0.01378502848035863590
0.01009484390530800290
0.00437401538895832095
0.02530174011458445333
0.00283956575775082610
0.00137600102798498181
0.00687166573975530306
0.01699152784557212382
0...

result:

ok 74 numbers

Test #20:

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

input:

28 423352526
29487 29719
28677 29983
23341 29999
-26763 30000
-28882 29999
-29960 29915
-29970 29204
-29983 26521
-29994 20351
-29997 12702
-30000 4342
-30000 -14762
-29996 -26505
-29991 -29789
-29168 -29847
-27585 -29956
-26267 -29997
-1281 -30000
7756 -29999
26914 -29996
29686 -29963
29991 -29508
...

output:

0.00442761995030998799
0.02230151788781194534
0.20892290420346812328
0.00883964991811966651
0.00483204746282095240
0.00300131735725316159
0.01122523821771879308
0.02574462439238505644
0.03188573047821100130
0.03484912265061543993
0.07963193530877159114
0.04895699564697386865
0.01370540130290103436
0...

result:

ok 28 numbers

Test #21:

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

input:

4 25
0 0
10 0
10 10
0 10
4 4

output:

0.00000000000000000000
0.49999999999999999967
0.50000000000000000000
0.00000000000000000000

result:

ok 4 numbers

Test #22:

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

input:

4 25
0 0
10 0
10 10
0 10
4 5

output:

0.15000000000000000024
0.69999999999999999983
0.14999999999999999980
0.00000000000000000000

result:

ok 4 numbers

Test #23:

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

input:

4 24
0 0
10 0
10 10
0 10
4 5

output:

0.14178240740740740747
0.71643518518518518504
0.14178240740740740747
0.00000000000000000000

result:

ok 4 numbers

Test #24:

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

input:

4 26
0 0
10 0
10 10
0 10
4 6

output:

0.49970414201183431982
0.49970414201183431963
0.00029585798816568031
0.00029585798816568031

result:

ok 4 numbers

Test #25:

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

input:

7 7130
-13 -11
-10 -14
-5 -15
14 -12
12 15
0 15
-6 15
1 0

output:

0.05734746577152726043
0.06213414271996679523
0.20526636718983385079
0.25157009753056073473
0.13720365558299549229
0.06860130843869406902
0.21787696276642179749

result:

ok 7 numbers

Test #26:

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

input:

10 654
-10 -2
-4 -8
-2 -9
1 -10
5 -10
10 -8
9 8
6 10
-7 7
-10 6
0 0

output:

0.10782569870451018755
0.03063104092080614916
0.04494619621080346558
0.06340552366677910086
0.09715278075226740112
0.25622888606646520776
0.06775774617225707406
0.17170499912605379528
0.04265287787097295254
0.11769425050908466608

result:

ok 10 numbers

Test #27:

score: 0
Accepted
time: 56ms
memory: 7408kb

input:

44926 337499999
-4789 30000
-4793 30000
-4807 30000
-4811 30000
-4813 30000
-4831 30000
-4859 30000
-4861 30000
-4863 30000
-4867 30000
-4870 30000
-4878 30000
-4879 30000
-4886 30000
-4894 30000
-4896 30000
-4906 30000
-4916 30000
-4921 30000
-4956 30000
-4958 30000
-4959 30000
-4962 30000
-4965 30...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 44926 numbers

Test #28:

score: 0
Accepted
time: 59ms
memory: 8240kb

input:

52806 128571428
-30000 23329
-30000 23326
-30000 23324
-30000 23320
-30000 23317
-30000 23315
-30000 23314
-30000 23313
-30000 23310
-30000 23309
-30000 23294
-30000 23291
-30000 23289
-30000 23286
-30000 23282
-30000 23281
-30000 23276
-30000 23275
-30000 23271
-30000 23269
-30000 23264
-30000 2324...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 52806 numbers

Test #29:

score: 0
Accepted
time: 68ms
memory: 10916kb

input:

80346 75524475
30000 -29336
30000 -29333
30000 -29327
30000 -29326
30000 -29322
30000 -29317
30000 -29313
30000 -29311
30000 -29310
30000 -29309
30000 -29308
30000 -29302
30000 -29301
30000 -29300
30000 -29296
30000 -29292
30000 -29291
30000 -29290
30000 -29289
30000 -29286
30000 -29282
30000 -29281...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 80346 numbers

Test #30:

score: 0
Accepted
time: 93ms
memory: 12036kb

input:

92549 110769230
30000 12570
30000 12572
30000 12573
30000 12576
30000 12577
30000 12578
30000 12579
30000 12581
30000 12583
30000 12585
30000 12587
30000 12588
30000 12589
30000 12590
30000 12593
30000 12594
30000 12596
30000 12597
30000 12599
30000 12600
30000 12601
30000 12605
30000 12607
30000 12...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 92549 numbers

Test #31:

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

input:

508 92305335
30000 28894
30000 29336
30000 29351
29853 30000
29658 30000
28933 30000
28725 30000
27800 30000
27784 30000
27663 30000
26923 30000
25852 30000
25829 30000
24275 30000
24060 30000
23476 30000
23328 30000
23068 30000
23039 30000
22860 30000
22538 30000
22222 30000
22181 30000
21131 30000...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 508 numbers

Test #32:

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

input:

4967 149999870
30000 -10807
30000 -10767
30000 -10760
30000 -10755
30000 -10717
30000 -10579
30000 -10523
30000 -10515
30000 -10472
30000 -10469
30000 -10446
30000 -10421
30000 -10416
30000 -10401
30000 -10315
30000 -10269
30000 -10261
30000 -10239
30000 -10237
30000 -10200
30000 -10145
30000 -10112...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 4967 numbers

Test #33:

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

input:

1869 79979459
-10237 30000
-10241 30000
-10322 30000
-10364 30000
-10365 30000
-10387 30000
-10401 30000
-10440 30000
-10451 30000
-10489 30000
-10492 30000
-10539 30000
-10551 30000
-10571 30000
-10572 30000
-10599 30000
-10600 30000
-10722 30000
-10744 30000
-10745 30000
-10792 30000
-10797 30000
...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 1869 numbers

Test #34:

score: 0
Accepted
time: 45ms
memory: 7832kb

input:

46772 42022645
24353 30000
24352 30000
24351 30000
24350 30000
24349 30000
24348 30000
24347 30000
24346 30000
24345 30000
24344 30000
24343 30000
24342 30000
24341 30000
24340 30000
24339 30000
24338 30000
24337 30000
24336 30000
24335 30000
24334 30000
24333 30000
24332 30000
24331 30000
24329 300...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 46772 numbers

Test #35:

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

input:

3 100
0 0
200 0
100 100
100 34

output:

1.00000000000000000000
0.00000000000000000000
0.00000000000000000000

result:

ok 3 numbers

Test #36:

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

input:

3 1000000
0 0
200 0
100 100
100 34

output:

0.34013332659932659930
0.32993333670033670051
0.32993333670033670024

result:

ok 3 numbers

Test #37:

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

input:

8 181798
-30 24
-29 -1
-25 -28
-9 -30
23 -26
29 6
22 25
-18 30
-1 0

output:

0.11696955857896585547
0.12681384485082767079
0.08270146157276476143
0.15470155962141418460
0.15392663405776841827
0.10196032039584132307
0.18587719425978055778
0.07704942666263722864

result:

ok 8 numbers

Test #38:

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

input:

20 2118062
-100 -77
-99 -94
-95 -100
-87 -100
-41 -100
-35 -100
-2 -100
32 -100
91 -98
100 -91
100 -4
98 97
85 98
51 100
-21 100
-70 99
-98 98
-99 93
-100 -3
-100 -29
0 0

output:

0.02245892913486050911
0.01225951654296385100
0.01011087377605689135
0.05813752421232712530
0.00758315533204266851
0.04170735432623467686
0.04297121352643641884
0.07537620081968454160
0.01919623033674830336
0.10993217142084836281
0.12752104378408753796
0.01717219837943963028
0.04425096247536062887
0...

result:

ok 20 numbers

Test #39:

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

input:

75 214805932
-1000 -833
-997 -918
-992 -968
-983 -983
-971 -992
-957 -997
-795 -999
-606 -1000
-591 -1000
-518 -1000
-453 -1000
-343 -1000
-278 -1000
-227 -1000
-92 -1000
36 -1000
254 -1000
412 -1000
587 -1000
647 -1000
816 -1000
925 -1000
967 -999
992 -991
997 -988
1000 -955
1000 -920
1000 -884
100...

output:

0.01094507974466413140
0.00680979473883367359
0.00295108054997956241
0.00258219725278508053
0.00234453095452093019
0.02044295834604131467
0.02371752510671905035
0.00187632716499136015
0.00913145886965661154
0.00813075104832438015
0.01375973254331818178
0.00813075104832438015
0.00637951236099297519
0...

result:

ok 75 numbers

Test #40:

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

input:

29 116602363
-1500 809
-1499 -730
-1498 -1457
-1493 -1499
-549 -1500
-337 -1500
450 -1500
612 -1500
1372 -1500
1419 -1497
1475 -1464
1485 -1447
1495 -1347
1496 -1253
1499 -939
1500 -180
1500 232
1499 646
1497 1424
1445 1472
1414 1497
1397 1499
1320 1500
858 1500
201 1500
-69 1500
-1084 1500
-1336 14...

output:

0.12832415976438058284
0.06063979713285252478
0.00390394575310838321
0.07882258156289640476
0.01769483339466563110
0.06568789566793326266
0.01352152363177279357
0.06343430839594154236
0.00415210835776583410
0.00727223170168845986
0.00221084690826237159
0.00907385484470692890
0.00789982130027310111
0...

result:

ok 29 numbers

Test #41:

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

input:

37 228390685
-10000 -3648
-9998 -7240
-9995 -9873
-9981 -9914
-9715 -9994
-5410 -9999
-1746 -10000
4667 -9998
8271 -9994
9455 -9978
9785 -9955
9859 -9935
9986 -9789
9997 -8751
9999 -7979
10000 2428
10000 3843
10000 6453
9993 9062
9984 9839
9974 9861
9875 9923
9854 9935
9259 9976
8713 9995
5558 9997
...

output:

0.04494597941117396968
0.03296009962041711270
0.00068559778486421982
0.00429830044068232050
0.05388945355623778532
0.04584345988103082962
0.08023037071844488060
0.04510492821309906501
0.01496996669755739345
0.00439162818645178120
0.00116643802042452363
0.00337894878114386530
0.01309934403029453061
0...

result:

ok 37 numbers

Test #42:

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

input:

128 938582299
-29970 1251
-29943 -1635
-29915 -2253
-29895 -2460
-29604 -4485
-29541 -4920
-29355 -6022
-28837 -8215
-28695 -8696
-27918 -10970
-26683 -13577
-25940 -15058
-25144 -16315
-24547 -17211
-23471 -18579
-22518 -19767
-20929 -21462
-20465 -21915
-19969 -22386
-18916 -23251
-16725 -24873
-1...

output:

0.01532419774765799886
0.00328793837863709883
0.00110554993162784494
0.01085681500052774588
0.00233259373434152604
0.00593227980344863760
0.01196327286323644020
0.00266530566361167921
0.01276358505973692480
0.01530217138296690122
0.00879263355948821851
0.00790423554175610036
0.00571982976510228481
0...

result:

ok 128 numbers

Test #43:

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

input:

63 280454190
-1000 -527
-998 -874
-997 -917
-995 -969
-992 -994
-970 -997
-881 -999
-830 -1000
-811 -1000
-739 -1000
-558 -1000
-482 -1000
-13 -1000
73 -1000
191 -1000
259 -1000
446 -1000
524 -1000
809 -1000
836 -1000
1000 -995
1000 -900
1000 -837
1000 -806
1000 -788
1000 -339
1000 -238
1000 -138
10...

output:

0.04352951926052433692
0.00547636449126744934
0.00671326142990130267
0.00347456739785251976
0.00310712562609932649
0.01134005842223961332
0.00648214164724084921
0.00237624338038533522
0.00900471175725360169
0.02263684483420697092
0.00950497352154546845
0.05865569186322137768
0.01075562793227513535
0...

result:

ok 63 numbers

Test #44:

score: 0
Accepted
time: 15ms
memory: 4092kb

input:

6768 280454190
-1000 -527
-998 -874
-997 -917
-996 -943
-995 -969
-992 -994
-970 -997
-881 -999
-830 -1000
-829 -1000
-828 -1000
-827 -1000
-826 -1000
-825 -1000
-824 -1000
-823 -1000
-822 -1000
-821 -1000
-820 -1000
-819 -1000
-818 -1000
-817 -1000
-816 -1000
-815 -1000
-814 -1000
-813 -1000
-812 -...

output:

0.04352951926052433692
0.00547636449126744934
0.00335663071495065177
0.00335663071495065090
0.00347456739785251976
0.00310712562609932649
0.01134005842223961332
0.00648214164724084921
0.00012506544107193481
0.00012506544107296668
0.00012506544107296669
0.00012506544107296669
0.00012506544107296669
0...

result:

ok 6768 numbers

Test #45:

score: 0
Accepted
time: 33ms
memory: 4924kb

input:

14836 456781370
-20000 -3648
-19999 -4546
-19998 -5444
-19997 -6342
-19996 -7240
-19990 -9873
-19962 -9914
-19829 -9934
-19696 -9954
-19563 -9974
-19430 -9994
-17708 -9995
-15986 -9996
-14264 -9997
-12542 -9998
-10820 -9999
-3492 -10000
2921 -9999
9334 -9998
11136 -9997
12938 -9996
14740 -9995
16542...

output:

0.01123902272352086376
0.01123902272356397637
0.01123902272356397636
0.01123902272342158168
0.03296751123319666262
0.00068571260722521695
0.00107463140953619721
0.00107463140953619720
0.00107463140953619720
0.00107463112026325435
0.01077789352619471628
0.01077789352619471627
0.01077789352619471628
0...

result:

ok 14836 numbers

Test #46:

score: 0
Accepted
time: 26ms
memory: 4668kb

input:

13536 1000000000
-2000 -1054
-1998 -1401
-1996 -1748
-1995 -1791
-1994 -1834
-1993 -1860
-1992 -1886
-1991 -1912
-1990 -1938
-1987 -1963
-1984 -1988
-1962 -1991
-1940 -1994
-1851 -1996
-1762 -1998
-1711 -1999
-1660 -2000
-1659 -2000
-1658 -2000
-1657 -2000
-1656 -2000
-1655 -2000
-1654 -2000
-1653 -...

output:

0.02176474126371086211
0.02176474126371053518
0.00273817993099472194
0.00273817993099463416
0.00167831393760121654
0.00167831393760121655
0.00167831393760121655
0.00167831393760121544
0.00173728222886515820
0.00173728222886515819
0.00155356152412685716
0.00155356152412778129
0.00567002453035267941
0...

result:

ok 13536 numbers

Test #47:

score: 0
Accepted
time: 96ms
memory: 7616kb

input:

44457 228390685
-30000 -10944
-29999 -12740
-29998 -14536
-29997 -16332
-29996 -18128
-29995 -19924
-29994 -21720
-29991 -24353
-29988 -26986
-29985 -29619
-29971 -29660
-29957 -29701
-29943 -29742
-29810 -29782
-29677 -29822
-29544 -29862
-29411 -29902
-29278 -29942
-29145 -29982
-28284 -29983
-274...

output:

0.00751981784571821079
0.00751981784686231466
0.00751981784686231467
0.00751981784686231462
0.00751981784686231463
0.00751981782168289365
0.01102896262514664445
0.01102896262514664431
0.01102892318309827151
0.00022927915784262471
0.00022927915784262475
0.00022919723094020322
0.00071786873137303314
0...

result:

ok 44457 numbers

Test #48:

score: 0
Accepted
time: 216ms
memory: 12664kb

input:

100000 567640616
-26900 -20713
-26899 -20730
-26898 -20747
-26897 -20764
-26896 -20781
-26895 -20798
-26894 -20815
-26893 -20832
-26892 -20849
-26891 -20866
-26890 -20883
-26889 -20900
-26888 -20917
-26887 -20934
-26886 -20951
-26885 -20968
-26884 -20985
-26883 -21002
-26882 -21019
-26881 -21036
-26...

output:

0.00008598316513051886
0.00008598955840623678
0.00008599595239503901
0.00008600234373536009
0.00008600533732494581
0.00008600533732494581
0.00008600533732494584
0.00008600533732494581
0.00008600533732494584
0.00008600533732494583
0.00008600533732494580
0.00008600533732494582
0.00008600533732494580
0...

result:

ok 100000 numbers

Test #49:

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

input:

3 1
0 1
29997 29999
-30000 -30000
-1 0

output:

0.33333333332686505065
0.33333333334626619800
0.33333333331473956484

result:

ok 3 numbers

Test #50:

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

input:

31 868326414
-4992 2357
-4991 377
-4987 -3635
-4977 -4864
-4930 -4879
-4908 -4883
-4592 -4914
-3892 -4957
-3066 -4984
-2538 -4995
-843 -4998
3132 -4995
3987 -4994
4702 -4991
4873 -4970
4893 -4945
4983 -4523
4994 -3407
4994 3487
4992 3931
4920 4249
4768 4864
4657 4959
2860 4985
-398 5000
-1741 4998
-...

output:

0.04975072757088145143
0.10080423405599095913
0.03103978348044391517
0.00152540551536789814
0.00063903004409302809
0.00852511062470948812
0.01829125944722447644
0.02111851279911186435
0.01340287092702301416
0.04261338728939712381
0.09989146187865515698
0.02149168157927499401
0.01801601015489360110
0...

result:

ok 31 numbers

Test #51:

score: 0
Accepted
time: 15ms
memory: 4072kb

input:

7771 868326414
-4992 2357
-4991 377
-4990 -626
-4989 -1629
-4988 -2632
-4987 -3635
-4977 -4864
-4930 -4879
-4919 -4881
-4908 -4883
-4592 -4914
-3892 -4957
-3066 -4984
-3018 -4985
-2970 -4986
-2922 -4987
-2874 -4988
-2826 -4989
-2778 -4990
-2730 -4991
-2682 -4992
-2634 -4993
-2586 -4994
-2538 -4995
-...

output:

0.04975072757088145145
0.02520105851399773980
0.02520105851399773979
0.02520105851399773980
0.02520105851399773979
0.03103978348044391519
0.00152540551536789813
0.00031951502151922046
0.00031951502257380764
0.00852511062470948813
0.01829125944722447644
0.02111851279911186435
0.00121844281142903172
0...

result:

ok 7771 numbers

Test #52:

score: 0
Accepted
time: 159ms
memory: 9164kb

input:

60003 90000
30000 3
-30000 3
-30000 0
-29999 0
-29998 0
-29997 0
-29996 0
-29995 0
-29994 0
-29993 0
-29992 0
-29991 0
-29990 0
-29989 0
-29988 0
-29987 0
-29986 0
-29985 0
-29984 0
-29983 0
-29982 0
-29981 0
-29980 0
-29979 0
-29978 0
-29977 0
-29976 0
-29975 0
-29974 0
-29973 0
-29972 0
-29971 0
-...

output:

0.66666666666666666668
0.16666666666666666670
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 60003 numbers

Test #53:

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

input:

11 20938
-9 -10
-5 -10
6 -10
7 -9
10 -4
10 -3
9 3
7 8
-3 9
-5 9
-8 8
0 0

output:

0.06314999419713881067
0.17366320507475988500
0.02523924300334826272
0.09777067846391024627
0.01575087318351803234
0.08974151736963077227
0.08025021172788588585
0.13661592060335699627
0.02826748657117303239
0.05027233934954357002
0.23927853045573450620

result:

ok 11 numbers

Test #54:

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

input:

10 57015
-15 -5
-14 -9
1 -15
6 -13
12 -9
14 -5
15 8
9 11
0 15
-9 10
0 0

output:

0.05098352652696230469
0.17192484974987694814
0.06049084030081028571
0.08014150277512940107
0.05186014396072133557
0.14692699499234396908
0.07299471083952334595
0.10595449580002098829
0.10585815861320832370
0.15286477644140309776

result:

ok 10 numbers

Test #55:

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

input:

77 961361440
-1000 -822
-999 -900
-998 -932
-996 -985
-971 -998
-853 -999
-649 -1000
-465 -1000
-396 -1000
-173 -1000
150 -1000
204 -1000
219 -1000
324 -1000
327 -1000
444 -1000
598 -1000
727 -1000
759 -1000
782 -1000
858 -1000
967 -1000
998 -997
1000 -898
1000 -891
1000 -859
1000 -837
1000 -638
100...

output:

0.00985749123927439074
0.00411047704956562111
0.00684804375876559017
0.00469888500716960004
0.01484901677474191137
0.02559343440093928476
0.02301106738196140739
0.00862915026823552777
0.02788841318574670570
0.04039442806724747059
0.00675324803601041304
0.00187590223222511474
0.01313131562557580313
0...

result:

ok 77 numbers

Test #56:

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

input:

3 1500
0 1
-1 -1
1 0
0 0

output:

0.33333333333333333334
0.33333333333333333334
0.33333333333333333334

result:

ok 3 numbers

Test #57:

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

input:

3 1350001
0 30000
-30000 -30000
29999 1
0 0

output:

0.35531972913071760561
0.31147039825866839650
0.33320987261061401453

result:

ok 3 numbers

Test #58:

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

input:

50 828950930
-1000 -708
-999 -854
-996 -951
-990 -987
-971 -997
-908 -999
-424 -1000
-351 -1000
-93 -1000
219 -1000
577 -1000
846 -1000
927 -1000
975 -995
997 -984
999 -925
1000 -873
1000 -852
1000 -644
1000 -489
1000 -379
1000 -332
1000 130
1000 243
1000 608
1000 745
1000 820
999 947
998 996
949 10...

output:

0.01835038528616771755
0.01244118291662420687
0.00519861705461917899
0.00358394647148048860
0.00809937175840977101
0.06059225211050351953
0.00913091510059894665
0.03227090542403506960
0.03902528097790287487
0.04477900830156804231
0.03364679674056369661
0.01013156333080170791
0.00658364266566942042
0...

result:

ok 50 numbers

Test #59:

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

input:

22 646077457
-4996 170
-4990 -4394
-4951 -4999
2246 -4993
3407 -4977
4701 -4959
4905 -4888
4967 -4491
4973 -4312
4993 -2907
5000 2673
5000 3821
4998 4708
4997 4749
4714 4974
4650 4994
1899 4999
1628 4999
-4514 4993
-4977 4855
-4987 4311
-4996 2879
-2 3

output:

0.11440592816349566911
0.01600872875143990667
0.18054371508841598281
0.02929440227027942673
0.03265312296311150383
0.00675672911838135422
0.01129959364110446295
0.00459955112390849521
0.03551578873863516155
0.13999409454446782503
0.02882095297952649887
0.02230678218716505663
0.00105252437889129787
0...

result:

ok 22 numbers

Test #60:

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

input:

10 915658335
-4800 1741
-4379 -2106
-4143 -3458
-3281 -3640
4898 -4506
4905 -796
3959 3735
3413 4665
-748 4645
-2679 4021
286 59

output:

0.12629836639097987607
0.04566325027695677623
0.02570304034073919944
0.22331435236953944974
0.11481299151945355935
0.13475443936699960002
0.03632085244101524014
0.12794321446657442889
0.06363161688616522154
0.10155787594157664861

result:

ok 10 numbers

Test #61:

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

input:

12 372760604
-481 367
-480 320
-408 12
-338 -221
-124 -488
330 -472
476 -426
488 -227
489 -74
489 213
358 498
-417 487
40 30

output:

0.01483383416925407550
0.08555078970341734866
0.06489032373750404124
0.09498541767648357326
0.14284010908996581749
0.05321291187234096847
0.05665572552111585917
0.04226086154444303663
0.07915381590916807897
0.09332766933915265474
0.22063832405606971362
0.05165021738108483221

result:

ok 12 numbers

Test #62:

score: 0
Accepted
time: 10ms
memory: 4232kb

input:

6370 828950930
-1000 -708
-999 -854
-996 -951
-995 -957
-994 -963
-993 -969
-992 -975
-991 -981
-990 -987
-971 -997
-908 -999
-424 -1000
-423 -1000
-422 -1000
-421 -1000
-420 -1000
-419 -1000
-418 -1000
-417 -1000
-416 -1000
-415 -1000
-414 -1000
-413 -1000
-412 -1000
-411 -1000
-410 -1000
-409 -100...

output:

0.01835038528616771755
0.01244118291662420687
0.00086643617576986238
0.00086643617576986332
0.00086643617576986332
0.00086643617576986332
0.00086643617576986332
0.00086643617576986332
0.00358394647148048860
0.00809937175840977101
0.06059225211050351953
0.00012508102877520630
0.00012508102877532973
0...

result:

ok 6370 numbers

Test #63:

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

input:

68 836156053
-1000 -845
-997 -951
-995 -984
-970 -997
-903 -1000
-749 -1000
-660 -1000
-528 -1000
-88 -1000
125 -1000
185 -1000
338 -1000
562 -1000
769 -1000
789 -1000
791 -1000
897 -1000
994 -993
998 -938
1000 -798
1000 -794
1000 -624
1000 -474
1000 -124
1000 -84
1000 -60
1000 10
1000 167
1000 325
...

output:

0.01357881843971366847
0.00435420475813656883
0.00469600426073952855
0.00872129256605633176
0.01926693861718176778
0.01113478920083881385
0.01651451881472722954
0.05504839604909076510
0.02664842808740075675
0.00750659946123964980
0.01914182862616110696
0.02802463798862802587
0.02589776814127679176
0...

result:

ok 68 numbers

Test #64:

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

input:

18 42490852
-5674 670
-5664 -1701
-5655 -3334
-5596 -4457
-5503 -4867
-5313 -5366
-4775 -5639
-3211 -5668
3470 -5669
4681 -5623
5653 -5509
5670 5531
5586 5565
4546 5624
3023 5657
-4407 5667
-5566 5655
-5653 4594
10 14

output:

0.05278297083654949121
0.03636788400646017216
0.02570273775572477933
0.01063590467335581224
0.01441387323879202228
0.01703671117495123333
0.03519021353769231882
0.14877257124115860374
0.02759281420987192480
0.02355819812984893401
0.24452357983972405707
0.00257032135323224820
0.02391328550846815747
0...

result:

ok 18 numbers

Test #65:

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

input:

46 578466723
-1234 -751
-1233 -1036
-1232 -1189
-1209 -1233
-994 -1234
-878 -1234
-692 -1234
-242 -1234
20 -1234
62 -1234
106 -1234
564 -1234
648 -1234
1023 -1234
1193 -1230
1234 -1229
1234 -1181
1234 -785
1234 -765
1234 -299
1234 -140
1234 505
1234 739
1233 1214
1215 1226
1139 1232
1026 1234
944 12...

output:

0.02894604651915837393
0.01557886521141651958
0.00669812780316355661
0.02187159957773934156
0.01175644470869438808
0.01885085099842376355
0.04560689757683168602
0.02655334925584422608
0.00425664377383762403
0.00445934109640132043
0.04641768686708647156
0.00851328754767524807
0.03800574798069307170
0...

result:

ok 46 numbers

Test #66:

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

input:

185 206514932
-345 -303
-344 -342
-343 -345
-330 -345
-328 -345
-309 -345
-306 -345
-302 -345
-293 -345
-291 -345
-262 -345
-221 -345
-220 -345
-216 -345
-207 -345
-176 -345
-174 -345
-165 -345
-151 -345
-135 -345
-105 -345
-93 -345
-91 -345
-82 -345
-75 -345
-71 -345
-51 -345
-39 -345
-16 -345
-9 -...

output:

0.01445219806342518796
0.00144332898233203574
0.00471130311549099404
0.00072481586392169139
0.00688575070725606820
0.00108722379588253710
0.00144963172784338279
0.00326167138764761125
0.00072481586392169140
0.01050983002686452515
0.01485872521039467348
0.00036240793196084570
0.00144963172784338278
0...

result:

ok 185 numbers

Test #67:

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

input:

24 12606579
-29995 24816
-29994 1627
-29982 -22716
-29872 -27836
-29774 -28692
-29355 -29864
-26947 -29915
-19036 -29963
-13875 -29979
26469 -29987
28120 -29597
29723 -28499
29942 -23068
29963 -21079
29981 -17228
29991 9950
29950 29009
29375 29546
28852 29736
23957 29949
-21449 29999
-29689 29097
-2...

output:

0.09646743007685917963
0.10126564309158749461
0.02163934343973711486
0.00392674598111104313
0.00651576737045948507
0.01023409514095911313
0.03317788667305084529
0.02160438010510113649
0.16865950985956015208
0.00835130115740836250
0.01094519761756142139
0.02350108661922987897
0.00841653528287788563
0...

result:

ok 24 numbers

Test #68:

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

input:

6 3600000
0 30000
-29999 30000
-30000 29999
-30000 -30000
30000 -30000
30000 30000
0 0

output:

0.12499579863001725066
0.00000833319213080963
0.24999576392554434315
0.25000006947839025046
0.25000006947839025325
0.12499996529552709849

result:

ok 6 numbers

Test #69:

score: 0
Accepted
time: 187ms
memory: 12664kb

input:

100000 3600000
0 30000
-1 30000
-2 30000
-3 30000
-4 30000
-5 30000
-6 30000
-7 30000
-8 30000
-9 30000
-10 30000
-11 30000
-12 30000
-13 30000
-14 30000
-15 30000
-16 30000
-17 30000
-18 30000
-19 30000
-20 30000
-21 30000
-22 30000
-23 30000
-24 30000
-25 30000
-26 30000
-27 30000
-28 30000
-29 30...

output:

0.00000416666550985091
0.00000416666550985090
0.00000416666550985092
0.00000416666550985091
0.00000416666550985091
0.00000416666550985091
0.00000416666550985091
0.00000416666550985090
0.00000416666550985091
0.00000416666550985091
0.00000416666550985091
0.00000416666550985092
0.00000416666550985092
0...

result:

ok 100000 numbers

Test #70:

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

input:

7 3603603
0 30000
-29999 30000
-30000 29999
-30000 -30000
30000 -30000
30000 29999
29999 30000
0 30

output:

0.00000000000000000000
0.00000000000000000000
0.12512488875789492405
0.74975022248421014861
0.12512488875789492320
0.00000000000000000000
0.00000000000000000000

result:

ok 7 numbers

Test #71:

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

input:

7 3603604
0 30000
-29999 30000
-30000 29999
-30000 -30000
30000 -30000
30000 29999
29999 30000
0 30

output:

0.00000000000000000000
0.00000000000000000000
0.12512495806352198408
0.74975008387295604263
0.12512495806352197740
0.00000000000000000000
0.00000000000000000000

result:

ok 7 numbers

Test #72:

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

input:

7 3603605
0 30000
-29999 30000
-30000 29999
-30000 -30000
30000 -30000
30000 29999
29999 30000
0 30

output:

0.00000000000000151102
0.00000000000000000010
0.12512502736912674224
0.74974994526174349417
0.12512502736912674167
0.00000000000000000010
0.00000000000000151102

result:

ok 7 numbers

Test #73:

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

input:

34 49230709
-3045 -2132
-3038 -2895
-3030 -3035
-2890 -3039
-2661 -3045
-1777 -3045
-1737 -3045
-839 -3045
354 -3045
1164 -3045
2471 -3045
2794 -3042
2963 -3037
3036 -3012
3041 -2891
3045 -1779
3045 -414
3044 1599
3042 2975
3041 3040
2595 3043
2222 3044
-1442 3045
-1653 3045
-1814 3045
-2527 3045
-2...

output:

0.03154657018308693245
0.00605065252967653002
0.00589591709554515446
0.00962286956256201696
0.03631527250268222780
0.00164322500012136777
0.03689040125272470653
0.04900918562861979386
0.03327530625245769741
0.05369237687763411148
0.01336904357031617530
0.00712424293079734934
0.00399029162622283869
0...

result:

ok 34 numbers

Test #74:

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

input:

33 808263406
-4045 2875
-4044 -2401
-4036 -3732
-4030 -3924
-4021 -4042
-3150 -4045
-581 -4045
3460 -4045
3690 -4045
3798 -4045
3954 -4032
4040 -4003
4041 -3752
4044 -2641
4045 -1497
4045 -847
4045 1386
4044 3847
4026 3893
3973 4022
3883 4028
3729 4035
3293 4040
2991 4042
383 4045
7 4045
-2044 4045
...

output:

0.16316590952025470099
0.04130477467692411227
0.00609656729854936448
0.00390621034313564975
0.02700595662764799322
0.07944049079861689301
0.12495874788525480757
0.00711222766978683635
0.00333965473189990577
0.00520148872873341859
0.00352761020929775334
0.00778455333193911129
0.03441581870009088985
0...

result:

ok 33 numbers

Test #75:

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

input:

19 242975558
-20203 17335
-20190 -14872
-20188 -19407
-18706 -20022
-17933 -20188
-14884 -20209
-3023 -20203
16254 -20190
18806 -20105
19710 -19989
20094 -19717
20196 -13758
20200 -8920
20201 19657
20104 20152
19845 20163
10824 20200
-17311 20208
-20172 19908
3 13

output:

0.19945216411552962563
0.02808521367836966346
0.01263210012993119004
0.00570103571801853483
0.01900218842997492418
0.07352078121427054186
0.11948608660413922431
0.01623373468055500802
0.00624625648627877535
0.00400058727796582906
0.03736641857146588680
0.03000437507829164539
0.17716728846513860470
0...

result:

ok 19 numbers

Test #76:

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

input:

14 102952702
-189 171
-187 -3
-185 -155
-176 -174
-42 -188
52 -191
146 -188
184 -167
185 -164
187 -143
187 -62
186 188
-33 190
-140 179
1 1

output:

0.11825955909559569572
0.10331085688218617712
0.01784740662092871275
0.09371205752937688997
0.06467827601013834286
0.06578429617523176148
0.03696380543456766091
0.00259148802955916263
0.01515860053656757243
0.05445389246912748029
0.16783986714118250486
0.14935470423150485407
0.07444415320733689771
0...

result:

ok 14 numbers

Test #77:

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

input:

68 12606579
-29995 24816
-29994 1627
-29982 -22716
-29971 -23228
-29960 -23740
-29949 -24252
-29938 -24764
-29927 -25276
-29916 -25788
-29905 -26300
-29894 -26812
-29883 -27324
-29872 -27836
-29823 -28264
-29774 -28692
-29355 -29864
-26947 -29915
-24310 -29931
-21673 -29947
-19036 -29963
-13875 -299...

output:

0.09646743007685918078
0.10126564309158749617
0.00216392333551777199
0.00216393556713548018
0.00216393556713548174
0.00216393556713548330
0.00216393556713548255
0.00216393556713548181
0.00216393556713548104
0.00216393556713548261
0.00216393556713548185
0.00216393556713548111
0.00196333699186334369
0...

result:

ok 68 numbers

Test #78:

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

input:

68 12606579
-24816 -29995
-1627 -29994
22716 -29982
23228 -29971
23740 -29960
24252 -29949
24764 -29938
25276 -29927
25788 -29916
26300 -29905
26812 -29894
27324 -29883
27836 -29872
28264 -29823
28692 -29774
29864 -29355
29915 -26947
29931 -24310
29947 -21673
29963 -19036
29979 -13875
29980 -8832
29...

output:

0.09646743007685918078
0.10126564309158749618
0.00216392333551777199
0.00216393556713548018
0.00216393556713548174
0.00216393556713548330
0.00216393556713548255
0.00216393556713548181
0.00216393556713548104
0.00216393556713548261
0.00216393556713548185
0.00216393556713548111
0.00196333699186334369
0...

result:

ok 68 numbers

Test #79:

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

input:

68 12606579
29995 -24816
29994 -1627
29982 22716
29971 23228
29960 23740
29949 24252
29938 24764
29927 25276
29916 25788
29905 26300
29894 26812
29883 27324
29872 27836
29823 28264
29774 28692
29355 29864
26947 29915
24310 29931
21673 29947
19036 29963
13875 29979
8832 29980
3789 29981
-1254 29982
-...

output:

0.09646743007685918079
0.10126564309158749619
0.00216392333551777199
0.00216393556713548018
0.00216393556713548174
0.00216393556713548330
0.00216393556713548256
0.00216393556713548181
0.00216393556713548104
0.00216393556713548261
0.00216393556713548185
0.00216393556713548111
0.00196333699186334369
0...

result:

ok 68 numbers

Test #80:

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

input:

68 12606579
24816 29995
1627 29994
-22716 29982
-23228 29971
-23740 29960
-24252 29949
-24764 29938
-25276 29927
-25788 29916
-26300 29905
-26812 29894
-27324 29883
-27836 29872
-28264 29823
-28692 29774
-29864 29355
-29915 26947
-29931 24310
-29947 21673
-29963 19036
-29979 13875
-29980 8832
-29981...

output:

0.09646743007685918079
0.10126564309158749619
0.00216392333551777199
0.00216393556713548018
0.00216393556713548174
0.00216393556713548330
0.00216393556713548256
0.00216393556713548181
0.00216393556713548104
0.00216393556713548261
0.00216393556713548185
0.00216393556713548111
0.00196333699186334369
0...

result:

ok 68 numbers

Test #81:

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

input:

68 12606579
27949 -29976
28010 -29968
28071 -29960
28132 -29952
28193 -29944
28254 -29936
28315 -29928
28376 -29920
28437 -29912
28498 -29904
29097 -29689
29548 -25569
29999 -21449
29974 1254
29949 23957
29736 28852
29546 29375
29009 29950
9950 29991
-3639 29986
-17228 29981
-21079 29963
-21742 2995...

output:

0.00028471319081327411
0.00028478984378484114
0.00028478991864718352
0.00028478991864718424
0.00028478991864718495
0.00028478991864718569
0.00028478991864718410
0.00028478991864718250
0.00028478991864718323
0.00333865313828175770
0.01857344911599575171
0.01857395140272853682
0.09489893684961855938
0...

result:

ok 68 numbers

Test #82:

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

input:

68 12606579
-29976 -27949
-29968 -28010
-29960 -28071
-29952 -28132
-29944 -28193
-29936 -28254
-29928 -28315
-29920 -28376
-29912 -28437
-29904 -28498
-29689 -29097
-25569 -29548
-21449 -29999
1254 -29974
23957 -29949
28852 -29736
29375 -29546
29950 -29009
29991 -9950
29986 3639
29981 17228
29963 2...

output:

0.00028471319081327411
0.00028478984378484114
0.00028478991864718352
0.00028478991864718424
0.00028478991864718495
0.00028478991864718569
0.00028478991864718410
0.00028478991864718250
0.00028478991864718323
0.00333865313828175770
0.01857344911599575171
0.01857395140272853682
0.09489893684961855938
0...

result:

ok 68 numbers

Test #83:

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

input:

68 12606579
-27949 29976
-28010 29968
-28071 29960
-28132 29952
-28193 29944
-28254 29936
-28315 29928
-28376 29920
-28437 29912
-28498 29904
-29097 29689
-29548 25569
-29999 21449
-29974 -1254
-29949 -23957
-29736 -28852
-29546 -29375
-29009 -29950
-9950 -29991
3639 -29986
17228 -29981
21079 -29963...

output:

0.00028471319081327411
0.00028478984378484114
0.00028478991864718352
0.00028478991864718424
0.00028478991864718495
0.00028478991864718569
0.00028478991864718410
0.00028478991864718250
0.00028478991864718323
0.00333865313828175770
0.01857344911599575170
0.01857395140272853682
0.09489893684961855938
0...

result:

ok 68 numbers

Test #84:

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

input:

68 12606579
29976 27949
29968 28010
29960 28071
29952 28132
29944 28193
29936 28254
29928 28315
29920 28376
29912 28437
29904 28498
29689 29097
25569 29548
21449 29999
-1254 29974
-23957 29949
-28852 29736
-29375 29546
-29950 29009
-29991 9950
-29986 -3639
-29981 -17228
-29963 -21079
-29956 -21742
-...

output:

0.00028471319081327411
0.00028478984378484114
0.00028478991864718352
0.00028478991864718424
0.00028478991864718495
0.00028478991864718569
0.00028478991864718410
0.00028478991864718250
0.00028478991864718323
0.00333865313828175770
0.01857344911599575170
0.01857395140272853682
0.09489893684961855936
0...

result:

ok 68 numbers

Test #85:

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

input:

70 242975558
-20203 17335
-20190 -14872
-20188 -19407
-19694 -19612
-19200 -19817
-18706 -20022
-17933 -20188
-14884 -20209
-3023 -20203
16254 -20190
18806 -20105
19032 -20076
19258 -20047
19484 -20018
19710 -19989
19734 -19972
19758 -19955
19782 -19938
19806 -19921
19830 -19904
19854 -19887
19878 -...

output:

0.19945216411552962589
0.02808521367836966349
0.00421069977481005546
0.00421070017756056721
0.00421070017756056720
0.00570103571801853484
0.01900218842997492420
0.07352078121427054186
0.11948608660413922426
0.01623373468055500802
0.00156156218685924472
0.00156156476647317684
0.00156156476647317685
0...

result:

ok 70 numbers

Test #86:

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

input:

70 242975558
-17335 -20203
14872 -20190
19407 -20188
19612 -19694
19817 -19200
20022 -18706
20188 -17933
20209 -14884
20203 -3023
20190 16254
20105 18806
20076 19032
20047 19258
20018 19484
19989 19710
19972 19734
19955 19758
19938 19782
19921 19806
19904 19830
19887 19854
19870 19878
19853 19902
19...

output:

0.19945216411552962589
0.02808521367836966349
0.00421069977481005546
0.00421070017756056721
0.00421070017756056720
0.00570103571801853484
0.01900218842997492420
0.07352078121427054186
0.11948608660413922426
0.01623373468055500802
0.00156156218685924472
0.00156156476647317684
0.00156156476647317685
0...

result:

ok 70 numbers

Test #87:

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

input:

70 242975558
20203 -17335
20190 14872
20188 19407
19694 19612
19200 19817
18706 20022
17933 20188
14884 20209
3023 20203
-16254 20190
-18806 20105
-19032 20076
-19258 20047
-19484 20018
-19710 19989
-19734 19972
-19758 19955
-19782 19938
-19806 19921
-19830 19904
-19854 19887
-19878 19870
-19902 198...

output:

0.19945216411552962589
0.02808521367836966349
0.00421069977481005546
0.00421070017756056721
0.00421070017756056720
0.00570103571801853484
0.01900218842997492420
0.07352078121427054186
0.11948608660413922426
0.01623373468055500802
0.00156156218685924472
0.00156156476647317684
0.00156156476647317685
0...

result:

ok 70 numbers

Test #88:

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

input:

70 242975558
17335 20203
-14872 20190
-19407 20188
-19612 19694
-19817 19200
-20022 18706
-20188 17933
-20209 14884
-20203 3023
-20190 -16254
-20105 -18806
-20076 -19032
-20047 -19258
-20018 -19484
-19989 -19710
-19972 -19734
-19955 -19758
-19938 -19782
-19921 -19806
-19904 -19830
-19887 -19854
-198...

output:

0.19945216411552962589
0.02808521367836966349
0.00421069977481005546
0.00421070017756056721
0.00421070017756056720
0.00570103571801853484
0.01900218842997492420
0.07352078121427054186
0.11948608660413922426
0.01623373468055500802
0.00156156218685924472
0.00156156476647317684
0.00156156476647317685
0...

result:

ok 70 numbers

Test #89:

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

input:

70 242975558
17418 -20202
17501 -20201
17584 -20200
17667 -20199
17750 -20198
17833 -20197
17916 -20196
17999 -20195
18082 -20194
18165 -20193
18248 -20192
18331 -20191
18414 -20190
18497 -20189
18580 -20188
18663 -20187
18746 -20186
18829 -20185
18912 -20184
18995 -20183
19078 -20182
19161 -20181
1...

output:

0.00051949881734030661
0.00051949881734030657
0.00051949881734030662
0.00051949881734030660
0.00051949881734030664
0.00051949881734030661
0.00051949881734030658
0.00051949881734030663
0.00051949881734030666
0.00051949881734030657
0.00051949881734030662
0.00051949881734030658
0.00051949881734030662
0...

result:

ok 70 numbers

Test #90:

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

input:

70 242975558
-20202 -17418
-20201 -17501
-20200 -17584
-20199 -17667
-20198 -17750
-20197 -17833
-20196 -17916
-20195 -17999
-20194 -18082
-20193 -18165
-20192 -18248
-20191 -18331
-20190 -18414
-20189 -18497
-20188 -18580
-20187 -18663
-20186 -18746
-20185 -18829
-20184 -18912
-20183 -18995
-20182 ...

output:

0.00051949881734030661
0.00051949881734030657
0.00051949881734030662
0.00051949881734030660
0.00051949881734030664
0.00051949881734030661
0.00051949881734030658
0.00051949881734030663
0.00051949881734030666
0.00051949881734030657
0.00051949881734030662
0.00051949881734030658
0.00051949881734030662
0...

result:

ok 70 numbers

Test #91:

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

input:

70 242975558
-17418 20202
-17501 20201
-17584 20200
-17667 20199
-17750 20198
-17833 20197
-17916 20196
-17999 20195
-18082 20194
-18165 20193
-18248 20192
-18331 20191
-18414 20190
-18497 20189
-18580 20188
-18663 20187
-18746 20186
-18829 20185
-18912 20184
-18995 20183
-19078 20182
-19161 20181
-...

output:

0.00051949881734030661
0.00051949881734030658
0.00051949881734030662
0.00051949881734030660
0.00051949881734030664
0.00051949881734030661
0.00051949881734030658
0.00051949881734030663
0.00051949881734030666
0.00051949881734030657
0.00051949881734030662
0.00051949881734030658
0.00051949881734030662
0...

result:

ok 70 numbers

Test #92:

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

input:

70 242975558
20202 17418
20201 17501
20200 17584
20199 17667
20198 17750
20197 17833
20196 17916
20195 17999
20194 18082
20193 18165
20192 18248
20191 18331
20190 18414
20189 18497
20188 18580
20187 18663
20186 18746
20185 18829
20184 18912
20183 18995
20182 19078
20181 19161
20180 19244
20179 19327...

output:

0.00051949881734030661
0.00051949881734030658
0.00051949881734030662
0.00051949881734030660
0.00051949881734030664
0.00051949881734030661
0.00051949881734030658
0.00051949881734030663
0.00051949881734030666
0.00051949881734030657
0.00051949881734030662
0.00051949881734030658
0.00051949881734030662
0...

result:

ok 70 numbers

Test #93:

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

input:

21 677783716
-29099 5278
-29026 -15104
-28554 -28893
-20857 -29027
-11113 -29175
-2466 -29176
22733 -29049
27727 -28699
29057 -26960
29188 -19544
29212 16156
29060 24699
28803 27371
27847 28533
13259 29165
2917 29179
-15498 29024
-20676 28941
-25976 27627
-28575 23832
-28964 16568
178 -136

output:

0.08876204742664588616
0.06099210589309127058
0.03353143930312363308
0.04238131512193249568
0.03739094986040401485
0.10891329294307107599
0.02267569640387119406
0.01279020679350808098
0.03241297047849718490
0.15428008090414228465
0.03730165371813598447
0.01244112599479404465
0.00886694150000000610
0...

result:

ok 21 numbers

Test #94:

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

input:

19 633459245
-452 311
-450 46
-438 -367
-425 -435
-363 -454
382 -456
432 -453
443 -394
448 -351
453 -15
456 356
451 440
327 447
95 454
-220 449
-264 446
-291 442
-425 398
-451 380
5 -2

output:

0.07482161651288850853
0.11634399082629067469
0.02165487186386902563
0.02174625577830698950
0.20958562374810558478
0.01479997165133370790
0.01872680529792143088
0.01291388163118897817
0.09352409767476907670
0.10324583702553355602
0.02463908372785000838
0.03597654665360166288
0.06609175729889073636
0...

result:

ok 19 numbers

Test #95:

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

input:

9 687819
-23 -13
-9 -20
1 -22
18 -23
14 18
0 23
-12 23
-18 19
-23 3
-2 0

output:

0.10562598646381424057
0.06870402641428021524
0.11910701379756467125
0.23368563959760952800
0.10657407311496654875
0.08859973394440813092
0.05714300321627714703
0.11268717515432766369
0.10787334829675185455

result:

ok 9 numbers

Test #96:

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

input:

11 12235098
-48 18
-31 -56
16 -66
60 -65
68 -56
68 -55
66 -18
43 59
-13 68
-33 57
-46 34
10 -2

output:

0.15930340726389506709
0.11883268092729835030
0.11375368003064976082
0.03845535398813146577
0.00233795635042587574
0.08223156741229456352
0.15898101267422539089
0.14966940382197906775
0.06663169899959563170
0.07078358342541491218
0.03901965510608991413

result:

ok 11 numbers

Test #97:

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

input:

2006 13
-1000 -1
-999 -1
-998 -1
-997 -1
-996 -1
-995 -1
-994 -1
-993 -1
-992 -1
-991 -1
-990 -1
-989 -1
-988 -1
-987 -1
-986 -1
-985 -1
-984 -1
-983 -1
-982 -1
-981 -1
-980 -1
-979 -1
-978 -1
-977 -1
-976 -1
-975 -1
-974 -1
-973 -1
-972 -1
-971 -1
-970 -1
-969 -1
-968 -1
-967 -1
-966 -1
-965 -1
-96...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 2006 numbers

Test #98:

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

input:

2006 13
1 -1000
1 -999
1 -998
1 -997
1 -996
1 -995
1 -994
1 -993
1 -992
1 -991
1 -990
1 -989
1 -988
1 -987
1 -986
1 -985
1 -984
1 -983
1 -982
1 -981
1 -980
1 -979
1 -978
1 -977
1 -976
1 -975
1 -974
1 -973
1 -972
1 -971
1 -970
1 -969
1 -968
1 -967
1 -966
1 -965
1 -964
1 -963
1 -962
1 -961
1 -960
1 -9...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 2006 numbers

Test #99:

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

input:

2006 13
1000 1
999 1
998 1
997 1
996 1
995 1
994 1
993 1
992 1
991 1
990 1
989 1
988 1
987 1
986 1
985 1
984 1
983 1
982 1
981 1
980 1
979 1
978 1
977 1
976 1
975 1
974 1
973 1
972 1
971 1
970 1
969 1
968 1
967 1
966 1
965 1
964 1
963 1
962 1
961 1
960 1
959 1
958 1
957 1
956 1
955 1
954 1
953 1
952...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 2006 numbers

Test #100:

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

input:

2006 13
-1 1000
-1 999
-1 998
-1 997
-1 996
-1 995
-1 994
-1 993
-1 992
-1 991
-1 990
-1 989
-1 988
-1 987
-1 986
-1 985
-1 984
-1 983
-1 982
-1 981
-1 980
-1 979
-1 978
-1 977
-1 976
-1 975
-1 974
-1 973
-1 972
-1 971
-1 970
-1 969
-1 968
-1 967
-1 966
-1 965
-1 964
-1 963
-1 962
-1 961
-1 960
-1 9...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 2006 numbers

Test #101:

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

input:

2009 13
-1000 -1
-999 -1
-998 -1
-997 -1
-996 -1
-995 -1
-994 -1
-993 -1
-992 -1
-991 -1
-990 -1
-989 -1
-988 -1
-987 -1
-986 -1
-985 -1
-984 -1
-983 -1
-982 -1
-981 -1
-980 -1
-979 -1
-978 -1
-977 -1
-976 -1
-975 -1
-974 -1
-973 -1
-972 -1
-971 -1
-970 -1
-969 -1
-968 -1
-967 -1
-966 -1
-965 -1
-96...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 2009 numbers

Test #102:

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

input:

2009 13
-1000 -1
-999 -1
-998 -1
-997 -1
-996 -1
-995 -1
-994 -1
-993 -1
-992 -1
-991 -1
-990 -1
-989 -1
-988 -1
-987 -1
-986 -1
-985 -1
-984 -1
-983 -1
-982 -1
-981 -1
-980 -1
-979 -1
-978 -1
-977 -1
-976 -1
-975 -1
-974 -1
-973 -1
-972 -1
-971 -1
-970 -1
-969 -1
-968 -1
-967 -1
-966 -1
-965 -1
-96...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 2009 numbers

Test #103:

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

input:

11 13
-1000 -1
-999 -1
-998 -1
0 -1
1 -1
998 -1
999 -1
1000 -1
4379 3
4375 3
-1000 2
1013 1

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.05971443476484783766
0.00014560722709127259
0.92515514113530683478
0.01498481687275405501

result:

ok 11 numbers

Test #104:

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

input:

167 1
-80 -1
-79 -1
-78 -1
-77 -1
-76 -1
-75 -1
-74 -1
-73 -1
-72 -1
-71 -1
-70 -1
-69 -1
-68 -1
-67 -1
-66 -1
-65 -1
-64 -1
-63 -1
-62 -1
-61 -1
-60 -1
-59 -1
-58 -1
-57 -1
-56 -1
-55 -1
-54 -1
-53 -1
-52 -1
-51 -1
-50 -1
-49 -1
-48 -1
-47 -1
-46 -1
-45 -1
-44 -1
-43 -1
-42 -1
-41 -1
-40 -1
-39 -1
...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 167 numbers

Test #105:

score: 0
Accepted
time: 17ms
memory: 3944kb

input:

6006 37
-3000 -1
-2999 -1
-2998 -1
-2997 -1
-2996 -1
-2995 -1
-2994 -1
-2993 -1
-2992 -1
-2991 -1
-2990 -1
-2989 -1
-2988 -1
-2987 -1
-2986 -1
-2985 -1
-2984 -1
-2983 -1
-2982 -1
-2981 -1
-2980 -1
-2979 -1
-2978 -1
-2977 -1
-2976 -1
-2975 -1
-2974 -1
-2973 -1
-2972 -1
-2971 -1
-2970 -1
-2969 -1
-296...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 6006 numbers

Test #106:

score: 0
Accepted
time: 25ms
memory: 4424kb

input:

10009 61
-5000 -1
-4999 -1
-4998 -1
-4997 -1
-4996 -1
-4995 -1
-4994 -1
-4993 -1
-4992 -1
-4991 -1
-4990 -1
-4989 -1
-4988 -1
-4987 -1
-4986 -1
-4985 -1
-4984 -1
-4983 -1
-4982 -1
-4981 -1
-4980 -1
-4979 -1
-4978 -1
-4977 -1
-4976 -1
-4975 -1
-4974 -1
-4973 -1
-4972 -1
-4971 -1
-4970 -1
-4969 -1
-49...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 10009 numbers

Test #107:

score: 0
Accepted
time: 29ms
memory: 4348kb

input:

10009 61
1 -5000
1 -4999
1 -4998
1 -4997
1 -4996
1 -4995
1 -4994
1 -4993
1 -4992
1 -4991
1 -4990
1 -4989
1 -4988
1 -4987
1 -4986
1 -4985
1 -4984
1 -4983
1 -4982
1 -4981
1 -4980
1 -4979
1 -4978
1 -4977
1 -4976
1 -4975
1 -4974
1 -4973
1 -4972
1 -4971
1 -4970
1 -4969
1 -4968
1 -4967
1 -4966
1 -4965
1 -...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 10009 numbers

Test #108:

score: 0
Accepted
time: 24ms
memory: 4408kb

input:

10009 61
5000 1
4999 1
4998 1
4997 1
4996 1
4995 1
4994 1
4993 1
4992 1
4991 1
4990 1
4989 1
4988 1
4987 1
4986 1
4985 1
4984 1
4983 1
4982 1
4981 1
4980 1
4979 1
4978 1
4977 1
4976 1
4975 1
4974 1
4973 1
4972 1
4971 1
4970 1
4969 1
4968 1
4967 1
4966 1
4965 1
4964 1
4963 1
4962 1
4961 1
4960 1
4959...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 10009 numbers

Test #109:

score: 0
Accepted
time: 29ms
memory: 4416kb

input:

10009 61
-1 5000
-1 4999
-1 4998
-1 4997
-1 4996
-1 4995
-1 4994
-1 4993
-1 4992
-1 4991
-1 4990
-1 4989
-1 4988
-1 4987
-1 4986
-1 4985
-1 4984
-1 4983
-1 4982
-1 4981
-1 4980
-1 4979
-1 4978
-1 4977
-1 4976
-1 4975
-1 4974
-1 4973
-1 4972
-1 4971
-1 4970
-1 4969
-1 4968
-1 4967
-1 4966
-1 4965
-1 ...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 10009 numbers

Test #110:

score: 0
Accepted
time: 23ms
memory: 4312kb

input:

10009 61
0 -5000
1 -5000
2 -5000
3 21903
3 21904
3 21905
3 21906
1 13453
-1 5000
-1 4999
-1 4998
-1 4997
-1 4996
-1 4995
-1 4994
-1 4993
-1 4992
-1 4991
-1 4990
-1 4989
-1 4988
-1 4987
-1 4986
-1 4985
-1 4984
-1 4983
-1 4982
-1 4981
-1 4980
-1 4979
-1 4978
-1 4977
-1 4976
-1 4975
-1 4974
-1 4973
-1 ...

output:

0.00000000000000000000
0.00048813733644041199
0.83304773062757387275
0.00001989741753159060
0.00001989267326581988
0.00001988793069637232
0.16640445401449193242
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 10009 numbers

Test #111:

score: 0
Accepted
time: 28ms
memory: 4356kb

input:

10009 61
5000 0
5000 1
5000 2
-21903 3
-21904 3
-21905 3
-21906 3
-13453 1
-5000 -1
-4999 -1
-4998 -1
-4997 -1
-4996 -1
-4995 -1
-4994 -1
-4993 -1
-4992 -1
-4991 -1
-4990 -1
-4989 -1
-4988 -1
-4987 -1
-4986 -1
-4985 -1
-4984 -1
-4983 -1
-4982 -1
-4981 -1
-4980 -1
-4979 -1
-4978 -1
-4977 -1
-4976 -1
...

output:

0.00000000000000000000
0.00048813733644041199
0.83304773062757387275
0.00001989741753159060
0.00001989267326581988
0.00001988793069637232
0.16640445401449193242
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 10009 numbers

Test #112:

score: 0
Accepted
time: 27ms
memory: 4336kb

input:

10009 61
0 5000
-1 5000
-2 5000
-3 -21903
-3 -21904
-3 -21905
-3 -21906
-1 -13453
1 -5000
1 -4999
1 -4998
1 -4997
1 -4996
1 -4995
1 -4994
1 -4993
1 -4992
1 -4991
1 -4990
1 -4989
1 -4988
1 -4987
1 -4986
1 -4985
1 -4984
1 -4983
1 -4982
1 -4981
1 -4980
1 -4979
1 -4978
1 -4977
1 -4976
1 -4975
1 -4974
1 ...

output:

0.00000000000000000000
0.00048813733644041199
0.83304773062757387275
0.00001989741753159060
0.00001989267326581988
0.00001988793069637232
0.16640445401449193242
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 10009 numbers

Test #113:

score: 0
Accepted
time: 24ms
memory: 4348kb

input:

10009 61
-5000 0
-5000 -1
-5000 -2
21903 -3
21904 -3
21905 -3
21906 -3
13453 -1
5000 1
4999 1
4998 1
4997 1
4996 1
4995 1
4994 1
4993 1
4992 1
4991 1
4990 1
4989 1
4988 1
4987 1
4986 1
4985 1
4984 1
4983 1
4982 1
4981 1
4980 1
4979 1
4978 1
4977 1
4976 1
4975 1
4974 1
4973 1
4972 1
4971 1
4970 1
496...

output:

0.00000000000000000000
0.00048813733644041199
0.83304773062757387275
0.00001989741753159060
0.00001989267326581988
0.00001988793069637232
0.16640445401449193242
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 10009 numbers

Test #114:

score: 0
Accepted
time: 33ms
memory: 4624kb

input:

13009 80
-6500 -1
-6499 -1
-6498 -1
-6497 -1
-6496 -1
-6495 -1
-6494 -1
-6493 -1
-6492 -1
-6491 -1
-6490 -1
-6489 -1
-6488 -1
-6487 -1
-6486 -1
-6485 -1
-6484 -1
-6483 -1
-6482 -1
-6481 -1
-6480 -1
-6479 -1
-6478 -1
-6477 -1
-6476 -1
-6475 -1
-6474 -1
-6473 -1
-6472 -1
-6471 -1
-6470 -1
-6469 -1
-64...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 13009 numbers

Test #115:

score: 0
Accepted
time: 37ms
memory: 4676kb

input:

13009 80
1 -6500
1 -6499
1 -6498
1 -6497
1 -6496
1 -6495
1 -6494
1 -6493
1 -6492
1 -6491
1 -6490
1 -6489
1 -6488
1 -6487
1 -6486
1 -6485
1 -6484
1 -6483
1 -6482
1 -6481
1 -6480
1 -6479
1 -6478
1 -6477
1 -6476
1 -6475
1 -6474
1 -6473
1 -6472
1 -6471
1 -6470
1 -6469
1 -6468
1 -6467
1 -6466
1 -6465
1 -...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 13009 numbers

Test #116:

score: 0
Accepted
time: 36ms
memory: 4564kb

input:

13009 80
6500 1
6499 1
6498 1
6497 1
6496 1
6495 1
6494 1
6493 1
6492 1
6491 1
6490 1
6489 1
6488 1
6487 1
6486 1
6485 1
6484 1
6483 1
6482 1
6481 1
6480 1
6479 1
6478 1
6477 1
6476 1
6475 1
6474 1
6473 1
6472 1
6471 1
6470 1
6469 1
6468 1
6467 1
6466 1
6465 1
6464 1
6463 1
6462 1
6461 1
6460 1
6459...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 13009 numbers

Test #117:

score: 0
Accepted
time: 37ms
memory: 4604kb

input:

13009 80
-1 6500
-1 6499
-1 6498
-1 6497
-1 6496
-1 6495
-1 6494
-1 6493
-1 6492
-1 6491
-1 6490
-1 6489
-1 6488
-1 6487
-1 6486
-1 6485
-1 6484
-1 6483
-1 6482
-1 6481
-1 6480
-1 6479
-1 6478
-1 6477
-1 6476
-1 6475
-1 6474
-1 6473
-1 6472
-1 6471
-1 6470
-1 6469
-1 6468
-1 6467
-1 6466
-1 6465
-1 ...

output:

0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 13009 numbers

Test #118:

score: 0
Accepted
time: 35ms
memory: 4664kb

input:

13009 80
0 -6500
1 -6500
2 -6500
3 28479
3 28480
3 28481
3 28482
1 17491
-1 6500
-1 6499
-1 6498
-1 6497
-1 6496
-1 6495
-1 6494
-1 6493
-1 6492
-1 6491
-1 6490
-1 6489
-1 6488
-1 6487
-1 6486
-1 6485
-1 6484
-1 6483
-1 6482
-1 6481
-1 6480
-1 6479
-1 6478
-1 6477
-1 6476
-1 6475
-1 6474
-1 6473
-1 ...

output:

0.00000000000000000000
0.00023652986367761936
0.82430659390277291382
0.00001611941014868311
0.00001611645407556117
0.00001611349883180749
0.17540852687049614322
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 13009 numbers

Test #119:

score: 0
Accepted
time: 37ms
memory: 4620kb

input:

13009 80
6500 0
6500 1
6500 2
-28479 3
-28480 3
-28481 3
-28482 3
-17491 1
-6500 -1
-6499 -1
-6498 -1
-6497 -1
-6496 -1
-6495 -1
-6494 -1
-6493 -1
-6492 -1
-6491 -1
-6490 -1
-6489 -1
-6488 -1
-6487 -1
-6486 -1
-6485 -1
-6484 -1
-6483 -1
-6482 -1
-6481 -1
-6480 -1
-6479 -1
-6478 -1
-6477 -1
-6476 -1
...

output:

0.00000000000000000000
0.00023652986367761936
0.82430659390277291382
0.00001611941014868311
0.00001611645407556117
0.00001611349883180749
0.17540852687049614322
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 13009 numbers

Test #120:

score: 0
Accepted
time: 35ms
memory: 4732kb

input:

13009 80
0 6500
-1 6500
-2 6500
-3 -28479
-3 -28480
-3 -28481
-3 -28482
-1 -17491
1 -6500
1 -6499
1 -6498
1 -6497
1 -6496
1 -6495
1 -6494
1 -6493
1 -6492
1 -6491
1 -6490
1 -6489
1 -6488
1 -6487
1 -6486
1 -6485
1 -6484
1 -6483
1 -6482
1 -6481
1 -6480
1 -6479
1 -6478
1 -6477
1 -6476
1 -6475
1 -6474
1 ...

output:

0.00000000000000000000
0.00023652986367761936
0.82430659390277291382
0.00001611941014868311
0.00001611645407556117
0.00001611349883180749
0.17540852687049614322
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 13009 numbers

Test #121:

score: 0
Accepted
time: 36ms
memory: 4620kb

input:

13009 80
-6500 0
-6500 -1
-6500 -2
28479 -3
28480 -3
28481 -3
28482 -3
17491 -1
6500 1
6499 1
6498 1
6497 1
6496 1
6495 1
6494 1
6493 1
6492 1
6491 1
6490 1
6489 1
6488 1
6487 1
6486 1
6485 1
6484 1
6483 1
6482 1
6481 1
6480 1
6479 1
6478 1
6477 1
6476 1
6475 1
6474 1
6473 1
6472 1
6471 1
6470 1
646...

output:

0.00000000000000000000
0.00023652986367761936
0.82430659390277291382
0.00001611941014868311
0.00001611645407556117
0.00001611349883180749
0.17540852687049614322
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0.00000000000000000000
0...

result:

ok 13009 numbers

Extra Test:

score: 0
Extra Test Passed