QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#621661#8960. Old Solution MethodsCrysfly🌈AC ✓705ms4284kbC++147.0kb2024-10-08 16:03:382024-10-08 16:03:39

Judging History

This is the latest submission verdict.

  • [2024-10-08 16:03:39]
  • Judged
  • Verdict: AC
  • Time: 705ms
  • Memory: 4284kb
  • [2024-10-08 16:03:38]
  • Submitted

answer

// what is matter? never mind. 
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2")
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define ull unsigned long long
//#define int long long
#define SZ(x) ((int)((x).size()))
#define ALL(x) (x).begin(),(x).end()
using namespace std;
inline int read()
{
	char c=getchar();int x=0;bool f=0;
	for(;!isdigit(c);c=getchar())f^=!(c^45);
	for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
	return f?-x:x;
}

#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;

#define maxn 400005
#define inf 0x3f3f3f3f

typedef double db;
const db eps=1e-8,pi=3.14159265358979323846;
int sgn(db x){return x<-eps?-1:x>eps;}
int cmp(db a,db b){return sgn(a-b);}

struct P{
	db x,y;
	P(db x=0,db y=0):x(x),y(y){}
	P&operator +=(P o){return x+=o.x,y+=o.y,*this;}
	P&operator -=(P o){return x-=o.x,y-=o.y,*this;}
	P&operator *=(db o){return x*=o,y*=o,*this;}
	P&operator /=(db o){return x/=o,y/=o,*this;}
	friend P operator +(P a,P b){return a+=b;}
	friend P operator -(P a,P b){return a-=b;}
	friend P operator *(P a,db b){return a*=b;}
	friend P operator /(P a,db b){return a/=b;}
	friend bool operator <(P a,P b){return fabs(a.x-b.x)<eps?a.y<b.y:a.x<b.x;}
	friend bool operator ==(P a,P b){return cmp(a.x,b.x)==0 && cmp(a.y,b.y)==0;}
	friend db operator %(P a,P b){return a.x*b.x+a.y*b.y;} // dot
	friend db operator *(P a,P b){return a.x*b.y-a.y*b.x;} // cross
	
	P rot(db o){
		db s=sin(o),c=cos(o),xx=x*c-y*s,yy=x*s+y*c;
		x=xx,y=yy;return *this;
	}
	P rot90(){swap(x,y),x=-x;return *this;}
	db ang(){return atan2(y,x);}
	db l(){return sqrt(x*x+y*y);}
	db l2(){return x*x+y*y;}
	
	int half(){return sgn(y)==1||(sgn(y)==0&&sgn(x)>=0);}
	P unit(){return ((*this))/l();}
	
	void read(){cin>>x>>y;}
	void out(){cout<<"("<<x<<","<<y<<")"<<endl;}
};
bool cmp_dir(P a,P b){
	if(a.half()!=b.half())return a.half()<b.half();
	return sgn(a*b)>0;
}

db dis(P a,P b){return (a-b).l();}
db cross(P a,P b,P c){
	// (a->b)*(a->c)
	return (b.x-a.x)*(c.y-a.y)-(b.y-a.y)*(c.x-a.x);
}
int cmp3(P a,P b,P c){
	return sgn(cross(a,b,c));
}

bool in_tri(P a,P b,P c,P p){
	if(cmp3(a,b,c)<0) swap(b,c);
	return cmp3(a,b,p)>=0 && cmp3(b,c,p)>=0 && cmp3(c,a,p)>=0;
}
db area_tri(P a,P b,P c){
	return fabs(cross(a,b,c))/2;
}

bool paral(P p1,P p2,P q1,P q2){
	// is parallel
	return sgn((p2-p1)*(q2-q1))==0;
}
P interl(P p1,P p2,P q1,P q2){
	// intersect point
	db s1=cross(q1,q2,p1),s2=-cross(q1,q2,p2);
	return (p1*s2+p2*s1)/(s1+s2);
}

bool inter(db l1,db r1,db l2,db r2){
	if(l1>r1)swap(l1,r1); if(l2>r2)swap(l2,r2);
	return !(cmp(r1,l2)==-1||cmp(r2,l1)==-1);
}
bool ismid(db a,db m,db b){
	return sgn(a-m)==0||sgn(b-m)==0||((a<m)!=(b<m));
}
bool ismid(P a,P m,P b){
	return ismid(a.x,m.x,b.x)&&ismid(a.y,m.y,b.y);
}

bool isseg(P p1,P p2,P q1,P q2){
	return inter(p1.x,p2.x,q1.x,q2.x) && inter(p1.y,p2.y,q1.y,q2.y) &&
	cmp3(p1,p2,q1)*cmp3(p1,p2,q2)<=0 && cmp3(q1,q2,p1)*cmp3(q1,q2,p2)<=0;
}
bool isseg_strict(P p1,P p2,P q1,P q2){
	return cmp3(p1,p2,q1)*cmp3(p1,p2,q2)<0 && cmp3(q1,q2,p1)*cmp3(q1,q2,p2)<0;
}

struct L{
	P a,b;
	L(P aa=P(0,0),P bb=P(0,0)){a=aa,b=bb;}
	bool in(P p){return sgn((b-a)*(p-a))>0;}
	int in_sgn(P p){return sgn((b-a)*(p-a));}
	P dir(){return b-a;}
	bool onl(P p){
		return cmp3(a,b,p)==0;
	}
	bool onseg(P p){
		return onl(p)&&ismid(a,p,b);
	}
	bool onseg_strict(P p){
		return onl(p)&&sgn((p-a)%(a-b))*sgn((p-b)%(a-b))<0;
	}
	void out(){cout<<"("<<a.x<<","<<a.y<<")---("<<b.x<<","<<b.y<<")\n";}
};

bool isseg(L a,L b){
	return isseg(a.a,a.b,b.a,b.b);
}
bool paral(L a,L b){
	// is parallel
	return paral(a.a,a.b,b.a,b.b);
}
P operator &(L a,L b){
	return interl(a.a,a.b,b.a,b.b);
}
bool samedir(L a,L b){
	return paral(a,b) && sgn(a.dir()%b.dir())==1;
}
bool operator <(L a,L b){
	if(samedir(a,b)) return b.in(a.a);
	return cmp_dir(a.dir(),b.dir());
}

P proj(L a,P b){
	P d=a.dir();
	return a.a+d*((d%(b-a.a))/d.l2());
}
P reflect(L a,P b){
	return proj(a,b)*2-b;
}
db nearest(L a,P b){
	if(a.a==a.b) return	dis(a.a,b);
	P h=proj(a,b);
	if(ismid(a.a,h,a.b)) return dis(h,b);
	return min(dis(a.a,b),dis(a.b,b));
}

db rad(P a,P b){
	return atan2l(a*b,a%b);
}

// polygon
db area(vector<P>a){
	db res=0;
	For(i,0,(int)a.size()-1)res+=a[i]*a[(i+1)%a.size()];
	return res/2;
}
int contain(vector<P>a,P p){
	int n=a.size(),res=0;
	For(i,0,n-1){
		P u=a[i],v=a[(i+1)%n];
		if(L(u,v).onseg(p))return 1;
		if(cmp(u.y,v.y)<=0)swap(u,v);
		if(cmp(p.y,u.y)>0 || cmp(p.y,v.y)<=0)continue;
		res^=cmp3(p,u,v)>0;
	}
	return res*2;
}
vector<P>cut(vector<P>&a,P q1,P q2){
	vector<P>b; int n=a.size();
	For(i,0,n-1){
		P p1=a[i],p2=a[(i+1)%n];
		int d1=cmp3(q1,q2,p1),d2=cmp3(q1,q2,p2);
		if(d1>=0)b.pb(p1);
		if(d1*d2<0)b.pb(interl(p1,p2,q1,q2));
	}
	return b;
}

vector<P>convex(vector<P>a){
	int n=a.size(),m=0; if(n<=1)return a;
	sort(a.begin(),a.end());
	vector<P>st(n*2); int tp=0;
	For(i,0,n-1){
		while(tp>1 && cmp3(st[tp-2],st[tp-1],a[i])<=0)--tp;
		st[tp++]=a[i];
	}
	int t=tp;
	Rep(i,n-2,0){
		while(tp>t && cmp3(st[tp-2],st[tp-1],a[i])<=0)--tp;
		st[tp++]=a[i];
	}
	st.resize(tp-1);
	return st;
}

bool check(L a,L b,L c){
	return c.in(a&b);
}
int checksgn(L a,L b,L c){
	return c.in_sgn(a&b);
}
vector<P>hpis(vector<L>&l){
	sort(l.begin(),l.end());
	deque<L>q;
	For(i,0,(int)l.size()-1){
		if(i&&samedir(l[i],l[i-1]))continue;
		while(q.size()>1 && !check(q[q.size()-2],q[q.size()-1],l[i]))q.pop_back();
		while(q.size()>1 && !check(q[1],q[0],l[i]))q.pop_front();
		q.pb(l[i]);
	}
	while(q.size()>2 && !check(q[q.size()-2],q[q.size()-1],q[0]))q.pop_back();
	while(q.size()>2 && !check(q[1],q[0],q[q.size()-1]))q.pop_front();
	vector<P>res;
	For(i,0,(int)q.size()-1) res.pb(q[i]&q[(i+1)%q.size()]);
	return res;
}

mt19937_64 rnd(64);

vector<L>cut(vector<L>&a,L l){
	vector<L>b; int n=a.size();
	For(i,0,n-1){
		L a1=a[i],a2=a[(i+1)%n],a3=a[(i+2)%n];
		int d1=checksgn(a1,a2,l),d2=checksgn(a2,a3,l);
		if(d1>0 || d2>0 || (d1==0&&d2==0)) b.pb(a2);
		if(d1>=0 && d2<0) b.pb(l);
	}
	return b;
}

P A[7];

void work(){
	For(i,0,5)A[i].read();
	vector<L>b(3);
	db mx=0;
	
	auto calc=[&](db rt){
		For(j,0,2) {
			P to=A[j+3]-A[j];
			to.rot(rt);
			b[j]=L(A[j],A[j]+to);
		}
		vector<P>c;
		For(j,0,2) For(jj,j+1,2) c.pb(b[j]&b[jj]);
		db res=fabs(cross(c[0],c[1],c[2]));
		mx=max(mx,res);
		return res;
	};
	
	auto work=[&](db l,db r){
		db t1=calc(l),t2=calc(l+1e-4);
		if(t1<t2){
			db tl=t1,tr=calc(r);
			For(_,1,20){
				db mid=(l+r)*0.5;
				db tmid=calc(mid);
				db tmid2=calc(mid+1e-4);
				if(tmid<tmid2) l=mid;
				else r=mid;
			}
		}
	};
	
	work(0,pi/2);
	work(pi/2,pi);
	
	printf("%.10lf\n",mx/2);
}

signed main()
{
//	freopen("my.out","w",stdout);
	int T=read();
	while(T--)work();
	return 0;
}
/*

*/

詳細信息

Test #1:

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

input:

1
1 1
4 1
4 5
1 2
5 1
5 6

output:

8.4999999975

result:

ok found '8.5000000', expected '8.5000000', error '0.0000000'

Test #2:

score: 0
Accepted
time: 654ms
memory: 4220kb

input:

100000
16 13
-1 -16
20 11
-19 16
12 -19
-7 -9
6 16
14 -13
12 4
-7 -20
12 -13
-7 17
0 -18
-19 9
-13 -3
1 16
15 15
2 0
-20 -4
5 10
-2 -17
1 7
2 -2
14 -1
12 10
16 8
3 2
15 19
17 18
8 -20
6 17
13 -15
19 -17
-17 -20
20 -18
-9 -6
14 -9
-6 16
3 -10
-15 -19
-4 -10
14 9
17 -16
-13 -9
-19 9
-10 -3
-6 -16
17 -...

output:

3634.2299631236
478.8358645560
3826.6702319733
494.6196346207
280.8350760820
516.3117198441
783.0477272378
5037.9384905228
2666.3447214130
1482.8586470370
715.6190475090
167.9832596948
9277.4280598878
640.0803920333
6704.0720993148
3490.6542565951
290.1262367083
134.9394892741
1663.9104228904
1890.7...

result:

ok 100000 numbers

Test #3:

score: 0
Accepted
time: 670ms
memory: 4220kb

input:

100000
-10 -10
7 4
11 -16
-14 -15
-5 9
-1 9
-13 20
-18 7
-4 8
16 -16
12 7
-14 -18
-18 -12
0 -6
10 0
-1 -18
6 17
11 8
-18 -1
14 0
1 2
-20 11
0 -19
19 18
-2 -14
0 13
20 4
-11 18
13 9
10 -6
15 20
12 -4
-15 10
17 3
17 18
17 -6
18 -5
-5 5
-8 3
-17 -12
15 12
-5 11
-7 2
11 -16
9 -8
-15 -9
14 16
15 -17
4 4
...

output:

21.6302083329
4.2613857798
554.9201304619
865.7781185349
1148.2537281031
350.2085310849
1942.8577935841
414.4311634468
2665.2621721783
2924.6778304761
67.5292482988
1704.1634933579
4796.6578983629
51790.7880080259
613.1560691987
92744.4832294951
229.2324561268
157.9659775558
783.6464790319
531.97666...

result:

ok 100000 numbers

Test #4:

score: 0
Accepted
time: 697ms
memory: 4140kb

input:

100000
-3 -3
-12 -3
-4 18
-18 5
18 -14
-17 -5
3 17
13 -12
-15 8
-6 4
4 -7
-8 -9
-11 15
4 -18
9 7
12 -8
-5 -14
13 -3
2 -3
-20 13
-16 15
9 10
-11 12
-2 -3
16 -14
4 19
3 -16
-15 -19
9 11
10 13
5 -5
-10 19
-17 0
16 -2
-15 14
-3 15
7 -12
-2 16
4 -15
1 -7
16 -17
-8 -15
-12 17
9 16
15 -17
-15 15
-13 -17
2 ...

output:

515.6333571391
308.1046595286
1375.7495495422
193.9882131680
1349.7406953257
5781.1229670737
943.1547977639
1437.2615110722
529.0534842535
1922.2569825408
402.5867526333
318.2770090426
303.7437452185
172.1758395893
3157.0454857428
186.2461078813
699.9427678376
1308.5658306754
122.0214164161
943.1985...

result:

ok 100000 numbers

Test #5:

score: 0
Accepted
time: 664ms
memory: 4088kb

input:

100000
-12 -18
1 -7
17 10
-12 13
5 -12
-6 -14
-20 -2
-19 8
19 -10
-7 15
-16 -19
-9 -9
-14 -8
-3 -13
6 -8
-3 20
11 -9
-3 0
3 -2
-17 -9
11 -17
-10 19
18 17
8 -5
6 -3
18 14
-4 -20
8 1
-11 -16
-12 18
-19 -15
4 -6
-14 -19
-2 -2
-10 -9
-10 5
-17 16
4 -4
-4 7
11 17
-3 1
-10 19
10 19
9 1
20 14
20 -19
-17 6
...

output:

947.9149494414
1143.4390266443
262.9904243853
253.3465165626
344.2729292371
432.4229705275
735.0686239072
38.1920476433
203.8369635460
683.4282654532
1790.4986651583
1392.3935094567
343.7646538411
3258.8127883760
237.9127589120
327.4558957066
2952.1293017482
535.4324775723
923.0409270012
395.7334303...

result:

ok 100000 numbers

Test #6:

score: 0
Accepted
time: 697ms
memory: 4188kb

input:

100000
19 14
-20 -13
-5 -12
-19 13
-2 20
-5 -18
14 -11
8 7
-3 1
13 -10
-15 0
-12 -4
-5 -16
19 2
-14 11
7 14
-2 9
11 -7
4 -14
-17 9
-6 20
15 -5
13 -8
-16 -19
8 14
-8 -18
-19 -12
-13 0
11 8
-14 2
4 -2
-8 4
-12 5
-8 10
-8 11
13 9
2 -2
10 -8
14 -10
-8 14
2 -4
17 5
-9 -5
-19 -12
18 18
-8 17
-5 -4
1 -15
-...

output:

477.3022055558
165.4697801442
2813.1261885808
590.6288968001
1512.9531248764
213.7910344093
181.3939393913
3111.3265243320
277.0639533080
288.2191282519
375.2848540951
468.2703795014
219.5930786587
112.0655044293
251.1396099411
1143.7878786612
1357.8567651138
1157.0721777347
1981.6833325816
1687.559...

result:

ok 100000 numbers

Test #7:

score: 0
Accepted
time: 665ms
memory: 4208kb

input:

100000
-1 9
-8 2
-15 5
-20 -18
15 10
2 -10
-9 -9
-17 19
-18 -13
17 -7
-4 -5
-8 19
6 13
2 -6
12 13
4 -17
2 1
-19 -1
2 -18
-2 3
5 -19
-10 6
-14 -16
-6 -3
-18 8
-6 -2
8 1
3 -14
1 3
3 20
-9 -19
-5 -11
7 8
-7 -12
17 15
-19 19
5 -5
8 -12
-9 10
-3 15
18 12
13 -16
-7 -14
13 11
-3 19
-10 17
5 -8
-4 -14
-6 -8...

output:

26.2455536329
990.9589475092
2619.0218503380
0.6868970982
536.3647327732
207.6484203607
409.9370143993
3240.3086315737
264.8498286965
206.7527219031
1537.0673659597
83.5451410638
664.4632016762
2047.6636019315
5737.5448101632
1730.6373767594
2216.1111105850
199.0397617265
116.3854311100
399.42374557...

result:

ok 100000 numbers

Test #8:

score: 0
Accepted
time: 649ms
memory: 4164kb

input:

100000
-5 15
8 -12
-4 13
10 17
-8 -20
-11 -10
11 -15
4 15
20 16
3 -6
-18 4
-11 -15
10 5
-2 13
20 0
13 -19
17 10
-5 4
-2 -16
-1 2
12 -3
20 17
-12 -16
10 -10
-8 3
-3 -7
-16 -6
-10 -13
5 -13
15 -2
13 15
4 1
-18 -12
-20 14
2 -10
7 -6
-11 -10
7 -18
-8 -14
13 18
-1 -3
3 9
-7 5
18 18
10 2
-1 -9
11 -12
6 -1...

output:

1668.8233860465
1030.8970584103
158973.6625704940
4135.5005071400
266.7729974143
3982.3966890375
11.5116244293
5152.6505042538
555.6955239623
1603.9198297197
16179.3999992411
2868.8783362010
28696.4125310665
696.1878298827
776.8496835687
195.0840510312
697.6038729686
855.2085886603
8192.4698171931
3...

result:

ok 100000 numbers

Test #9:

score: 0
Accepted
time: 677ms
memory: 4276kb

input:

100000
13 -16
11 4
-19 10
-16 6
9 -5
1 -6
-12 5
10 2
-1 -1
-14 15
-2 7
-6 -12
-2 -12
-6 4
7 -18
-10 14
3 4
10 -19
17 -4
-17 12
-14 -20
17 4
12 -11
14 19
14 -12
19 -5
9 -15
6 -6
-1 1
19 0
-10 17
-11 -4
14 20
-17 15
-19 16
-18 -12
0 18
-16 14
4 3
-17 8
10 4
14 3
5 8
-13 -7
17 -16
10 10
10 -1
-2 15
-20...

output:

32557.1969134560
375.9251141121
859.4395602995
342.7508030942
112.2222222006
1307.5238094849
517.9825580448
2878.1593565007
657158.7319567800
1306.5775536627
369.0769598330
565.5243473327
353.7897896182
357.8886027449
611.1748555632
2037.3633276877
8808.2157894226
922.6414755478
3531.1981714790
469....

result:

ok 100000 numbers

Test #10:

score: 0
Accepted
time: 677ms
memory: 4148kb

input:

100000
18 19
8 -16
18 -14
2 -19
6 4
10 -17
14 -18
18 6
17 -2
-19 -16
20 7
-13 9
-16 -11
-3 -9
-16 19
-16 0
-2 14
-18 13
-12 -11
-17 5
11 11
-10 -3
-14 -6
-15 13
-2 10
12 -20
-7 -19
-15 -15
0 -7
6 19
-10 12
-11 13
12 10
19 -1
-20 -11
-20 15
12 6
-4 -2
5 7
16 -8
1 2
-13 -12
19 -18
10 12
0 -5
10 -17
5 ...

output:

1388.8688161677
931.9162540430
2697.2499997960
960.8945267066
2211.4415174675
929.7158671259
604.4185367830
1191.0768485671
668.5289431177
7269.9063736299
1682.5008981598
548.2299366912
826.6523899244
184.9107799667
495.4721338570
276.9943446667
1648.1345491113
972.8209300515
42.6370839325
3911.9900...

result:

ok 100000 numbers

Test #11:

score: 0
Accepted
time: 662ms
memory: 4148kb

input:

100000
6 3
-10 -2
-6 16
-5 -13
4 13
5 4
10 -17
-11 -11
12 -5
12 1
10 14
14 9
-15 16
-2 0
-7 -19
-8 -14
-15 -9
11 9
0 1
14 -13
-12 20
-12 3
-12 -20
-3 7
10 -1
6 -4
-9 -5
-14 12
20 -10
-16 -13
-10 -14
14 -13
3 0
20 10
18 -13
1 -11
12 -13
-15 -10
-12 -12
12 -20
13 -3
18 -6
-1 14
-5 -11
1 -16
2 1
-19 -6...

output:

693.0572627148
2728.1024590150
1332.6135974528
261.9447650058
171.2435469194
866.9422145122
216.0499999016
752.2385893701
1742.0000790021
491.3342680939
972.5340717760
34405.7380925996
31140.3981877286
1200.4464285663
1474.7039221940
177.2257357394
126.2133333141
2165.8720739489
16327.5663032038
215...

result:

ok 100000 numbers

Test #12:

score: 0
Accepted
time: 680ms
memory: 4284kb

input:

100000
-4 -2
-15 -4
-1 -1
-17 -1
-7 -14
0 -1
11 -9
-2 -6
4 -9
7 -1
10 -1
5 12
-20 -2
-12 -11
-4 -1
-11 9
-10 -1
-12 -16
17 -3
-3 1
-1 -13
12 -16
9 7
9 -16
17 -16
3 8
16 8
0 -19
0 17
12 -19
-1 20
-4 7
-11 12
1 15
-10 15
-1 19
2 14
-4 13
-9 -20
-1 12
-12 5
-7 15
3 -1
6 -11
11 8
3 9
15 16
7 -9
13 5
2 -...

output:

36.4016393443
39.4697388144
935.7374967482
589.9767649512
8.1851851842
457.0032932981
43.5597059616
2160.6249999718
119.5435165239
226.6341721165
630.7246374560
9056.7874584471
21.4811109113
303.4300586032
5899.8114136820
29.8387096743
384.6821636474
671.7967405855
2634.3718165877
254.8030358148
110...

result:

ok 100000 numbers

Test #13:

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

input:

100000
-16 -9
-15 11
-2 -15
-5 -12
-12 7
1 13
-17 1
-11 7
-14 15
-8 -18
-4 -5
0 6
6 -9
10 -3
3 12
8 17
-6 11
-2 4
4 4
16 -1
2 -10
4 2
-2 14
16 11
9 14
14 -13
5 -15
7 -4
7 -16
13 -4
14 0
-1 -16
5 16
-1 -9
1 10
2 -11
1 14
5 18
0 -8
2 16
8 18
6 -12
9 -18
-7 -11
-9 15
0 14
10 5
-7 -9
11 -17
4 -12
8 3
-4...

output:

406.4305453792
260.0954696777
325.5631851828
383.5773809285
862.3657383762
15208.7035309304
480.0624998828
4246.2283749603
270.1920057507
769.6421052618
1143.9886132100
426.5440597512
5564.0767902892
4027.2396196471
1360.0389719157
673.4205422503
1934.2943244425
859.4898030789
364.2782467285
337.371...

result:

ok 100000 numbers

Test #14:

score: 0
Accepted
time: 697ms
memory: 4116kb

input:

100000
-11 1
-17 6
-20 -2
-16 0
-4 14
-16 1
-16 -5
-14 1
-7 8
-17 -7
-5 20
-8 11
-3 -2
-6 18
-12 16
-8 5
-11 19
-17 -19
7 20
-3 2
3 -17
4 -7
-1 -8
9 -20
5 3
-9 18
5 12
-7 4
-5 18
-8 4
6 10
9 -19
13 0
1 0
19 -13
1 -10
11 2
19 8
15 6
4 -4
17 -3
13 20
-14 -10
6 0
0 -5
3 -5
5 20
-4 -15
18 20
-1 -11
7 12...

output:

321.6577681528
894.1304345208
303.1650792882
267.5430242043
2785.5091729563
541.2142855325
73.3566433186
53.2039613477
4078.1718119573
877.3412697718
602.6957338975
88.5690339833
90.1666666580
347.1146970999
125.1868780820
354.1925616673
902.9285709832
775.8478899172
94.0854137651
2661.3957566560
11...

result:

ok 100000 numbers

Test #15:

score: 0
Accepted
time: 654ms
memory: 4136kb

input:

100000
18 15
10 18
7 -1
11 10
9 -9
3 12
5 20
-8 8
4 18
-2 -1
-9 -11
-7 -12
7 -7
9 -8
-7 -11
7 7
6 17
6 -1
-19 14
-9 -2
-2 -7
-10 2
-18 9
-5 7
-5 -20
4 12
-13 -2
4 -17
1 0
-3 20
-1 -9
8 -14
10 17
3 -1
-5 9
0 0
-19 -8
-15 -2
-14 9
-2 -15
-17 -6
-9 5
1 7
-14 8
-2 18
-16 -8
0 -19
-6 16
0 -14
-5 9
2 -15
...

output:

334.8723350076
241.4903398509
45.6182737293
4869.4892464125
1566.8297258203
5312.1310513801
514.5799281949
437.0018904002
99685.8926060124
312.2233031780
1481.1249998643
786.5856547050
1153.8515263724
472.1497726802
19337.4677768538
148.1220237516
362.6083332181
1230.9666666549
144.9758109927
43.777...

result:

ok 100000 numbers

Test #16:

score: 0
Accepted
time: 692ms
memory: 4128kb

input:

100000
-19 4
-4 -16
-7 -8
-12 13
-17 6
-4 -17
-2 17
-5 -1
-1 13
7 -1
0 7
0 15
-3 7
1 -2
-9 7
5 -13
-6 7
-5 -8
15 11
16 -4
1 -2
14 14
8 0
9 15
-6 -17
3 7
0 5
8 -2
6 -11
9 20
8 -2
17 18
11 0
19 -10
13 13
12 10
14 -18
17 -4
16 -17
2 8
12 -10
9 -13
11 7
5 -9
-7 -10
3 -15
4 6
4 -12
-4 11
-2 6
-5 6
-9 -19...

output:

202.2320381259
987.6249997699
157.9336743148
524.6762485244
1026.2486163658
334.5726042748
42.3009791234
587.5779365964
83.8619935076
1122.8013576436
977.7985703342
3253.2518778237
141.2979797679
609.7477063754
9682.6571428378
306.2201702554
1137.7088888889
196.6758465766
101.6046741092
1977.0571425...

result:

ok 100000 numbers

Test #17:

score: 0
Accepted
time: 679ms
memory: 4220kb

input:

100000
-2 -10
-1 -14
14 -18
5 -9
-2 -16
-1 -8
13 1
-3 3
14 -11
10 -6
2 -13
14 -4
-2 1
8 15
-2 -1
6 0
14 16
2 -2
-16 13
-13 3
-14 -2
-14 -1
-18 17
-16 5
1 -14
17 -7
13 -13
12 -6
2 -5
17 -2
-14 -4
-5 -2
-12 -11
-13 -4
-11 0
-5 -16
8 2
2 -3
5 11
0 7
6 4
6 1
-2 8
4 -3
10 5
-9 -4
-3 -5
-10 0
20 3
15 -8
7...

output:

143.7706447355
983.2389556232
123.9571428515
742.4761902204
193.8347128556
234.6499999827
246.5322228442
1621.2301390944
32.0416666552
165.6549819423
345.4239392259
3029.0630953440
56.7878033507
153.2067251606
73.9648829196
330.1827484540
1222.9272736292
9.6666666651
224.8852477892
956.3130204777
71...

result:

ok 100000 numbers

Test #18:

score: 0
Accepted
time: 672ms
memory: 4124kb

input:

100000
-2 -7
-20 -9
-9 -5
-14 -16
-4 4
-3 -16
-6 7
3 19
-13 19
-4 9
-13 8
5 13
-9 2
5 -10
-12 4
-12 3
3 -1
-4 9
-7 0
-2 10
-5 -7
-14 9
-15 3
-7 -4
-4 1
0 -16
-11 -3
0 0
-7 -5
-5 -6
0 11
1 -4
9 -4
7 5
-3 1
5 -8
2 7
7 -7
8 -13
-7 -12
-6 -8
-5 0
0 13
6 16
-5 16
0 16
11 12
10 2
-4 2
4 -10
-1 -12
6 -1
2 ...

output:

4281.8284207529
847.9030608255
185.1317602692
413.6522315347
362.1734234234
731.1429679178
140.8571428177
823.4166664082
310.6777777471
266.8378395963
1148.7445649843
57.9926221103
189.3809523780
3.1900599401
779.7468322537
616.4055554246
305.9775207040
47.3497529681
82.3015872901
121.2073528192
126...

result:

ok 100000 numbers

Test #19:

score: 0
Accepted
time: 681ms
memory: 4156kb

input:

100000
-14 -6
-6 0
-12 0
-3 -6
0 -1
-5 -2
7 -4
-3 -10
13 -5
16 1
0 -4
8 -3
0 -4
5 -5
-5 -4
4 -7
-6 0
-9 -11
-1 14
-2 1
3 14
6 15
7 14
6 -2
3 14
0 16
-4 8
8 4
2 1
7 6
9 -4
10 16
19 4
1 5
9 6
13 -3
6 -1
3 14
-2 6
2 14
7 6
9 14
1 -5
6 6
3 0
-2 -10
3 5
-6 3
6 3
-10 4
1 1
-1 10
4 17
-4 0
4 1
-4 2
-13 3
-...

output:

424.3999997761
56.7344215862
70.2480670097
123.0682046021
69.8648362462
142.8692735956
483.6660017885
114.9444444415
147.6917211325
409.2498470260
131.3611111002
122.0238095038
331.4166666537
436.2895294622
176.5263962854
449.9681816602
80.0656051298
114.7252747011
414.4166665029
396.5137572565
28.5...

result:

ok 100000 numbers

Test #20:

score: 0
Accepted
time: 705ms
memory: 4216kb

input:

100000
2 -1
1 2
-2 -7
5 -15
-8 -6
-12 -12
0 -6
0 -12
11 -2
-5 -8
2 -6
13 -2
8 3
-5 6
-2 16
-4 5
-9 0
-1 8
19 -18
6 -11
1 -12
11 2
3 -15
6 1
3 3
0 9
14 13
8 11
14 8
3 7
6 -2
-9 -16
9 -11
-5 -1
8 -8
-5 -6
-10 17
-7 13
-10 10
-5 18
-1 19
-3 4
-13 -5
3 6
-10 -14
-13 -4
-16 -2
-7 -12
6 12
12 9
8 1
2 11
4...

output:

181.2665130540
83.6474358871
282.2190929451
125.6119262069
445.4465237281
180.9787892723
58.2603950092
1611.0958646341
189.1553030038
54.9318181789
146.1349757450
110.9954976652
5438.7769230588
109.6010100932
118.4614205403
3673.5476177376
200.9756335254
445.0487859678
78.1673026288
901.3333330045
7...

result:

ok 100000 numbers

Test #21:

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

input:

100000
5 5
-3 -4
1 -11
10 -4
0 -12
1 -4
15 6
-3 -4
0 15
7 3
-2 -1
15 -1
2 11
15 2
8 -6
8 -8
17 -4
3 -3
-11 -5
-16 6
-2 -11
3 -9
-6 -2
-13 -9
-11 12
-8 16
-2 14
-9 8
-11 0
5 1
0 -16
-15 -11
-11 -14
-14 -17
-3 -4
-9 -6
-14 -16
-13 1
-11 -2
-4 -1
-11 -3
-4 -9
2 7
8 5
2 -2
-6 -8
4 -2
-1 2
-9 16
-1 12
-7...

output:

419.0589743458
647.3773150790
7924.3127703549
248.3631535470
1364.2090607179
221.1010416104
118.8571428523
631.5566864873
19.9956552346
520.3093835240
426.9444444397
235.0389610316
293.2402119061
26.9649561289
236.2869674174
699.0436602485
66.0833333320
450.1041664968
230.0004918740
238.8797653538
2...

result:

ok 100000 numbers

Test #22:

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

input:

100000
-14 -16
14 -7
8 -13
9 -16
12 -15
18 -8
-17 -12
20 4
9 -13
-6 -12
-20 -15
-7 -10
-20 -5
13 8
16 -5
-1 2
14 7
3 -6
17 -5
4 -5
17 9
-12 -2
-12 7
7 3
-18 -2
-14 -17
2 3
7 -11
9 -16
-2 -7
-6 9
-12 6
-16 -1
-12 2
10 3
-6 2
-13 2
18 9
-19 4
-9 -2
19 0
12 2
11 -4
1 0
12 2
7 -6
1 1
1 -3
14 3
3 5
9 13
...

output:

301.7321427547
3686.9846487218
2539.9780216950
15.1481481463
114.5837765312
182.6811735103
634.7125915680
564.0909090812
234.1633180131
122.8154304771
1879.7199088387
57095.9999673055
83905.1734880020
535.2078971454
48.3109744483
494.5128009599
1115.3364918336
10630.2083324499
5929.2331876902
143.70...

result:

ok 100000 numbers

Test #23:

score: 0
Accepted
time: 677ms
memory: 4148kb

input:

100000
9 -3
19 -7
16 3
10 -14
10 -13
4 -2
14 -9
3 -3
16 -11
12 -14
12 1
-13 -2
11 11
-1 5
-2 9
17 10
6 5
19 1
-13 0
16 -6
19 -6
12 -4
-8 -4
-10 3
-8 -9
19 -9
5 -6
-3 1
1 -12
5 4
19 15
10 19
-17 6
-12 10
6 16
-6 0
12 -8
-11 0
11 4
-8 3
2 6
11 -4
9 5
-8 1
19 -12
-20 -9
-18 1
-1 -1
-9 -4
-1 -6
12 -7
13...

output:

384.7018535869
223.3609788493
1000.9837958196
9457.7658732667
507.0075754719
551.0215506270
641.9706419707
1322.9309507916
1068.3747001641
585.3723304261
159.2976190223
1549.2053510008
170.7215606209
4.0275615238
178.8379565073
2031.6430226701
364.8999999324
1050.4248117373
140.7891862361
6809.65624...

result:

ok 100000 numbers

Test #24:

score: 0
Accepted
time: 684ms
memory: 4180kb

input:

100000
5 4
-1 5
-15 17
15 19
3 17
8 16
15 1
20 1
1 -10
-8 -2
-13 -6
11 -12
16 0
-15 7
15 -9
-8 6
8 5
-1 3
-13 3
-13 15
-6 1
-1 7
16 6
-8 13
-13 0
-16 6
4 -10
-7 -9
6 0
-6 4
7 18
3 10
-8 17
6 7
17 15
-3 7
-16 -1
-5 -3
-19 -3
-5 6
18 10
-8 15
-6 -18
-1 -19
1 -19
1 -13
2 -6
5 -7
-3 14
-15 1
-1 16
10 4
...

output:

249.5647216625
119.4453710072
2047.4515026928
82.0911369262
6333.7311826773
95.3649817525
1003.6023383094
42.6644736713
163.8225689663
876.7439024331
203.6333333169
390.3124998408
2080.9122910007
4.7690233005
129.6666666647
919.9471286691
217.2845711483
20011.8530699608
131304.5100822126
1250.166665...

result:

ok 100000 numbers

Test #25:

score: 0
Accepted
time: 680ms
memory: 4148kb

input:

100000
-3 -1
15 -3
17 6
6 -10
-9 9
1 10
6 10
-17 11
6 -1
10 -3
-8 3
-2 8
-18 -4
-13 -2
-7 11
3 2
-20 -3
-17 -4
8 -2
4 8
-8 -2
18 -4
9 13
10 -2
16 -12
-13 -15
-1 -13
0 -12
-15 -18
-3 -9
9 10
19 -6
-11 -5
12 4
-19 -6
-2 8
-13 -4
19 10
7 8
-14 5
7 5
6 -9
-19 7
-1 3
16 12
7 -4
-8 5
6 -8
-6 -9
12 -9
-14 ...

output:

143.0833332900
2799.4485286124
270.4617425817
883.3333329009
420.1190476073
1042.2555831191
1344.0826049238
1152.2049599052
1062.0129132474
597.8036647054
952.9106060562
3539.5594172137
536.5287838095
45.0801002257
703.8911673012
1531.4448051943
219.3908728942
3578.8465934113
365.5617580324
318.3923...

result:

ok 100000 numbers

Test #26:

score: 0
Accepted
time: 656ms
memory: 4140kb

input:

100000
-8 9
-16 -6
-3 6
-1 -1
20 -10
-19 10
-20 -5
9 -2
-9 -7
13 -6
-8 1
-7 5
-20 9
1 8
-13 5
-10 -6
17 -5
-10 -4
-3 5
17 -10
6 4
4 -11
-14 -5
-15 3
-9 7
-18 12
-13 6
-18 6
-17 14
-19 14
1 1
19 -1
13 6
-7 -11
-10 -6
7 0
2 7
5 -1
-20 6
16 -5
-8 12
-1 -1
-15 -12
-4 -1
6 -1
-20 -2
-3 -4
1 -10
-9 -12
-1...

output:

1149.5853961053
2842.3125357592
748.3225108162
823.5447412237
25.5569381582
213.2278137724
218.2179487130
590.5701751103
50.3511111053
4083.2079639789
2346.2423512397
129.2214137550
2245.0836748426
166.3016588658
192.9843947908
1745.6714282288
1213.2133148061
581.0640349402
3116.9232639634
851.15919...

result:

ok 100000 numbers

Test #27:

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

input:

100000
-18 11
-2 10
-12 -3
0 -5
-5 6
-9 7
1 8
7 -2
-6 -4
-2 1
-4 -1
-6 -6
-1 5
-19 0
5 -2
8 2
-8 -4
-16 13
12 -5
-1 5
8 -5
3 -3
-3 6
-3 4
-6 13
-3 -10
-3 -6
-9 11
3 12
-2 2
13 -14
12 -15
11 3
10 7
15 10
14 -2
-16 -4
-15 -13
-12 -16
-16 -18
-13 -3
-11 -4
-10 -13
1 -17
-4 -8
-18 -16
-19 -8
0 0
-3 -7
-...

output:

627.3603800758
113.1303029917
7516.2268509704
962.9213070805
193.0791245214
123.2321859700
809.4285710142
178.7018279194
470.7298762736
31.4125818758
134.9694397221
253.8862352282
944.7727270022
12491.6152842805
1906.5439589624
29.1878178376
350.2426356027
539.4674796181
484.0830822388
70.1666666662...

result:

ok 100000 numbers

Test #28:

score: 0
Accepted
time: 661ms
memory: 4212kb

input:

100000
-10 9
-1 5
-14 -8
-7 -10
0 7
-5 -3
-18 4
-8 6
-15 10
-18 1
1 -9
-14 -2
-11 9
-12 5
-8 9
-10 7
-13 14
-5 12
13 -9
-3 -18
0 -3
1 2
12 -9
0 -6
6 4
4 2
14 -6
7 -1
6 -11
8 -9
-4 0
5 -1
0 -2
4 1
1 -2
-2 0
13 8
12 -9
20 -3
11 1
-10 7
-3 7
14 3
-4 0
-6 -2
11 0
5 1
6 -1
6 7
1 -13
15 10
18 10
6 -16
16 ...

output:

90.1473118001
303.3817204248
46.3714285708
427.1528386512
129.3268398265
352.2277777220
136.7400344052
132.3219696964
621.9745392393
264.8751076648
2030.2550800302
81.4794070687
16.9999999924
1447.0819671795
34.0833333332
1496.6038619149
148.2886716660
986.4999999988
73.8092540483
21.8142094016
262....

result:

ok 100000 numbers

Test #29:

score: 0
Accepted
time: 666ms
memory: 4280kb

input:

100000
8 -5
4 0
-1 0
0 -3
0 0
2 -4
10 13
-4 17
0 -5
-4 13
16 18
-12 -12
-3 -9
-3 9
-6 15
1 4
-10 -17
3 5
13 11
0 -10
-7 14
8 -10
13 -4
11 10
10 2
-10 12
-12 5
-2 -17
16 -9
16 3
7 -15
3 -17
2 -15
5 -18
-2 -10
0 -17
-17 8
-16 10
-17 11
-5 -8
7 -6
-3 -2
-1 -7
-5 2
-2 12
-6 8
-13 -3
-1 10
9 1
-4 19
-2 1...

output:

112.8557691720
1946.9933026867
4346.3762804919
187.8058457126
39.3414323019
75.8764367805
27.3922014243
1206.5164203194
446.7692767814
1610.8333332359
100.1077075098
42.7452380888
16.3531746001
35.5416666467
310.7219250385
16.2499999975
409.7733333041
2262.3076923057
310.4675324551
3422.6904759997
3...

result:

ok 100000 numbers

Test #30:

score: 0
Accepted
time: 651ms
memory: 4276kb

input:

100000
17 15
11 6
8 5
13 6
-11 7
-3 14
-3 -1
-1 -6
-4 -6
-1 -8
1 -9
-4 -5
10 -3
20 6
11 1
8 3
6 -1
6 7
-10 9
4 8
0 -18
12 -6
5 -7
-10 -15
-2 18
-1 10
5 6
-4 -6
-5 8
4 -4
-8 -9
-2 9
-6 -17
-7 2
-9 -15
-2 -9
9 9
3 -7
6 16
11 4
9 13
8 7
-3 -9
-14 14
-9 -8
-10 -13
-15 -11
3 -3
-3 -5
-10 -5
-12 -16
-6 9
...

output:

33.3936465152
99.0624999603
78.1213818481
887.4295350618
5790.8884437792
2652.4884681374
564.8481002869
106.1710476223
169.8627764993
1427.6417475546
26091.6901621601
636.1813061971
371.2958261592
509.6469410682
698.0952378658
96.9255050504
180.1947636714
1457.1668060838
17952.3517850940
615.0110697...

result:

ok 100000 numbers

Test #31:

score: 0
Accepted
time: 662ms
memory: 4116kb

input:

100000
4 -2
-2 5
0 10
10 6
-1 12
3 9
1 -16
10 3
10 -1
6 13
12 15
10 10
-6 6
-10 -19
-15 -7
-9 6
-12 10
-19 -15
-11 14
-8 12
7 16
-4 17
12 13
-16 13
18 -11
7 12
-14 0
-13 8
-1 15
8 -2
8 14
9 13
18 11
17 7
12 7
8 16
-6 5
1 9
5 5
-10 -4
-10 8
-10 -5
20 11
20 -7
8 -7
16 16
1 -9
11 11
-10 -5
-3 10
-1 -12...

output:

150.8030302934
38755.5999879334
54.9973876642
2029.1739751724
971.9195772020
224.9242423646
150.8684210360
549.5275001179
612.5079601132
180187.0215070228
87.2353895916
625.6255657901
109.4699494818
335.4176544829
2766.9339508229
1715.8022531524
273.2513368973
1420.7860641863
8.4722222220
3144.27083...

result:

ok 100000 numbers

Test #32:

score: 0
Accepted
time: 647ms
memory: 4180kb

input:

100000
-13 -11
4 -2
5 -10
17 5
-15 12
14 -10
-2 -5
14 -4
-20 -3
-9 -13
14 -7
-3 -14
16 8
7 13
15 -2
5 12
2 12
-5 2
6 -3
-7 7
1 7
-8 -6
-8 10
-2 -1
0 -10
-14 -10
-10 -6
1 -11
-17 -5
-15 -8
7 4
-5 1
-12 4
-5 5
-11 6
-1 3
4 -1
16 -9
10 -8
9 -4
15 8
6 -5
19 -9
15 -13
0 3
-2 -3
13 2
10 3
-13 12
-9 -2
-9 ...

output:

405.3830406216
495.0492167634
685.6620071660
14.5223998984
358.2764975548
23996.4370742945
391.4627892023
734.6536300452
228.4701783151
1.7478991595
420.4202651799
54.4999999997
393.3045849868
83.0017482495
1474.6957579221
294.3582433508
2089.9602044805
15.7812499970
7595.1298698356
152.4999999641
7...

result:

ok 100000 numbers

Test #33:

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

input:

100000
-6 -8
12 -12
-11 -10
-9 -9
-11 -11
8 -12
5 6
5 13
0 -2
7 3
2 -2
4 9
7 15
9 -11
7 -13
6 7
3 12
2 0
14 -1
14 9
1 3
13 5
12 -4
12 7
-16 -14
5 -12
-4 -3
12 -15
9 -14
-15 -2
-13 6
8 -2
5 5
8 3
7 1
-4 -4
-15 7
-13 5
-16 6
-13 12
-15 8
-13 6
17 -4
-6 2
-4 11
9 15
-17 13
-18 6
12 -8
14 -4
14 3
4 5
12...

output:

4689.8079765400
846.2238557849
211.7355186242
321.0066137247
1920.5938907951
385.6249999230
10.4833333304
914.0406695204
45.3965079264
310.4892366601
4425.0880189995
176.4999999268
152.2383270058
775.5714285412
5.3811858076
118.3961038867
320.8601537879
92.2141858539
619.9759286066
149.5037593544
24...

result:

ok 100000 numbers

Test #34:

score: 0
Accepted
time: 656ms
memory: 4140kb

input:

100000
-5 0
-15 4
-17 4
-19 -5
14 1
-12 10
-11 -15
6 14
-10 -5
11 -2
4 -5
2 -1
-5 -6
-2 -11
10 8
9 -1
0 -8
-9 -7
0 -6
-17 -15
-6 -18
15 -5
-4 -14
13 -11
-6 -19
11 -17
-7 15
-8 -1
-8 15
-17 2
9 3
10 -6
8 2
8 10
9 -7
12 -11
-2 8
-1 -9
-1 3
-3 6
-1 -12
-3 -4
1 8
-7 -2
5 -9
12 -4
-6 -7
5 1
-12 4
-4 0
-1...

output:

263.5220322024
372.8752182491
1494.5382138652
17903.7241601784
75.8817376365
9.0833333311
43.3333333331
627.5317124699
1139.0598006388
793.3611524316
889.7619047617
22.3505747041
1308.8927889344
1018.2925101048
720.3333333298
299.5662391891
90.0631585556
1111.9186041558
582.9142857143
138.9200949913...

result:

ok 100000 numbers

Test #35:

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

input:

100000
11 6
3 -17
3 -7
9 -1
11 -8
2 0
12 -8
13 1
13 0
14 -4
12 5
11 7
-2 -5
-17 -3
4 9
12 -1
-8 1
-1 -11
16 4
16 -2
-7 6
18 8
-1 5
-12 -2
-5 7
-5 -6
12 2
6 2
13 -19
-5 19
-14 0
1 -2
-9 0
2 4
-9 3
-13 -3
4 0
-1 -17
11 -6
1 -11
1 -18
2 -6
0 11
2 20
-5 20
-6 14
-3 2
-1 -12
7 -15
-6 -2
-7 3
-9 -13
-11 -...

output:

754.8382973784
28.3787878783
1196.5425474314
2985.2165510722
1315.9446534760
147.2708333326
158.9909090312
22.7561676476
1082.7703278544
1043.2083333196
1779.1214285700
11.6066666638
15.9355742268
1150.2866071420
14.4333333313
71.4168833073
1652.0927100807
138.4925458529
12.0666666665
236.0833332074...

result:

ok 100000 numbers

Test #36:

score: 0
Accepted
time: 639ms
memory: 4120kb

input:

100000
-13 13
-5 9
-6 6
-9 13
-14 11
0 9
-17 -5
-16 -12
-14 0
-17 -14
-15 -4
-15 -9
3 4
0 3
1 -10
-1 0
-1 -7
-1 -2
1 -9
1 -13
-1 9
-2 2
7 19
-12 18
-13 -20
-8 -8
3 -6
-15 -16
9 -10
7 -17
-2 -5
-5 -3
-10 7
1 15
4 -9
-3 -2
4 -7
5 -4
-3 -10
15 -4
10 -2
0 -2
14 14
6 13
17 12
10 14
12 15
9 15
-13 -2
13 -...

output:

243.8461537082
5328.9999983303
142.8968253353
105.3729802360
2104.6952100654
263.4649337668
50.2356132317
20.4803921543
1829.9820527587
62.1602103263
1190.1524207865
75.7504489425
6.6232492992
149.3454545235
878.4668261690
12.0222222220
37.0833333245
323.9581842589
2562.3571420668
227.0482793102
102...

result:

ok 100000 numbers

Test #37:

score: 0
Accepted
time: 684ms
memory: 4132kb

input:

100000
7 3
-13 7
-6 -11
6 9
-16 3
-16 -12
3 14
-6 18
7 -3
-8 5
-9 11
7 -15
-9 5
-6 0
-16 6
-15 -12
-17 -12
-2 3
-11 4
-13 6
11 1
5 4
-12 3
-1 3
-5 11
1 11
-5 13
7 18
17 17
17 16
4 5
-15 5
-11 1
7 7
-2 4
-12 5
-14 6
-8 11
-10 10
8 8
-1 10
-5 8
17 -12
15 -7
14 -11
13 -9
18 -9
12 -8
14 8
12 6
12 -2
15 ...

output:

713.8910460151
543.0139391660
44.6107852378
1674.7549017409
200.5647295684
354.6621509017
111.6481481450
241.7666665371
217.4560732608
182.8333332996
335.0999168893
606.6158354556
29.2980884099
7712.9696966672
167.9673005142
12.0075757508
26.7083333296
116.4898848052
175.5608408725
439.3567707655
17...

result:

ok 100000 numbers

Test #38:

score: 0
Accepted
time: 674ms
memory: 4148kb

input:

100000
10 -12
9 13
8 -9
-1 -19
3 14
8 -1
14 10
-20 13
10 -4
12 -19
-2 10
15 12
-19 -9
-6 -16
12 -12
3 16
5 7
0 7
6 -9
-7 -11
-3 -8
-13 -10
-6 -9
4 -12
14 14
15 0
9 -14
10 15
12 -14
15 1
-2 1
-4 9
-4 -4
-2 10
0 1
-2 -2
16 -2
18 9
11 -3
10 -9
11 0
10 -2
3 -3
-7 10
0 -14
-13 0
-10 4
-8 -15
0 18
0 17
1 ...

output:

439.9869925564
95.3073132811
171.8901838497
144.5119305621
638.6519201138
28.3333333229
1270.5624992967
522.0297618883
22.6249999986
822.1941617770
434.2903562804
173.2105696630
637.0105261846
80.0723577229
194.9285714070
13.8102015481
72.1091355889
243.1721928665
1334.2880837558
1535.0552431333
143...

result:

ok 100000 numbers

Test #39:

score: 0
Accepted
time: 671ms
memory: 4136kb

input:

100000
11 3
-7 -3
8 -3
-7 6
-7 8
3 -8
18 6
14 6
6 13
20 -13
11 -1
-2 -9
5 12
5 -3
-5 -5
9 -11
13 11
-15 11
-7 -12
4 8
-3 4
-1 10
5 14
-6 -9
0 3
-3 8
-16 4
10 4
-8 3
2 7
-4 11
-4 -2
-6 9
-6 -10
-10 9
-8 -1
11 -2
2 11
-1 10
9 11
10 -3
-1 13
13 -9
5 -2
-2 1
-20 -12
1 -4
1 -14
-4 10
-2 19
7 10
5 -5
-2 2...

output:

248.5714284850
1217.3136100088
436.0453942537
1500.0476188553
2145.3472220328
115.2511311060
1204.9078945347
144.7086940600
69.9179486935
4.9669660671
76.2777777460
150.6008771908
10416.3727249314
227.0832609831
774.2309521935
241.4770464569
46.4555555539
1391.3233332686
76.2571428508
726.1249999977...

result:

ok 100000 numbers

Test #40:

score: 0
Accepted
time: 695ms
memory: 4148kb

input:

100000
-8 -4
-6 -9
-10 4
-9 16
-8 -7
-6 2
8 -1
6 4
11 1
-1 -1
7 -11
5 2
8 -17
8 -7
10 -16
9 -12
17 -19
13 5
3 -11
9 -1
1 7
10 -16
2 -13
-1 -7
12 -12
6 -13
-8 -3
-15 9
17 -1
-11 5
19 -12
-3 -2
12 3
20 9
1 -9
15 -15
-4 -8
15 -8
16 -6
-1 -7
-9 -7
-15 -8
16 -8
17 -6
14 -13
18 -5
17 -1
16 -14
14 10
-6 10...

output:

268.3468285995
61.0445692786
22.7631578912
108.1567281564
542.0955088940
253.6374105164
278.4328644007
21.0624999969
301.3452379776
162.8832547131
208.7311536363
86.0868757770
4.9666666665
20.4304968269
70.8142857135
247.2142856369
354.8055555296
8233.8282785797
325.0038460881
1254.8913037592
81.999...

result:

ok 100000 numbers

Test #41:

score: 0
Accepted
time: 686ms
memory: 4088kb

input:

100000
12 -13
5 -2
5 -1
-2 -3
-2 -18
15 -4
15 2
0 7
16 10
12 9
13 3
8 9
-11 11
-6 9
-10 11
-15 5
-18 8
6 8
5 15
16 -13
-8 -7
-7 -14
4 15
16 13
11 2
0 -5
-8 -3
3 -4
4 -11
8 -2
-9 13
12 2
-9 12
-4 4
13 3
-11 6
-2 -9
-6 -6
-1 -13
1 -7
-2 -7
-4 -6
6 3
-5 14
0 0
7 11
-9 3
6 10
13 11
-3 4
0 -15
6 -3
10 -1...

output:

293.8307711238
516.0926956537
49.6478967653
1578.1476606330
396.3285858585
482.1726190466
54.0577104370
1147.6741848825
641.8469380039
653.7406014780
5729.2780512024
1448.3877001423
90.9005611411
56.0285714061
3.2714285712
269.9213610216
330.0785513209
5941.5132531529
2866.0416660464
692.5513234739
...

result:

ok 100000 numbers