QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#706399#3285. Making Perimeter of the Convex Hull Shortestcrimson231AC ✓53ms8120kbC++2312.3kb2024-11-03 11:05:512024-11-03 11:05:51

Judging History

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

  • [2024-11-03 11:05:51]
  • 评测
  • 测评结果:AC
  • 用时:53ms
  • 内存:8120kb
  • [2024-11-03 11:05:51]
  • 提交

answer

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cassert>
#include <vector>
#include <random>
#include <array>
#include <tuple>
typedef long long ll;
//typedef long double ld;
typedef double ld;
typedef std::pair<int, int> pi;
typedef std::vector<int> Vint;
typedef std::vector<ld> Vld;
const ll INF = 1e17;
const int LEN = 1 << 17;
const ld TOL = 1e-7;
const ll MOD = 1'000'000'007;
int sign(const ld& x) { return x < -TOL ? -1 : x > TOL; }
bool zero(const ld& x) { return !sign(x); }

#define FULL 0
#define HALF 1
#define OUTER 0
#define INNER 1
#define LIMIT (1 << 6 | 1 << 5 | 1 << 2)//WHAT THE FUCKING IMBEDDED

int N, M, K;
bool V[LEN];
struct Pos {
	int x, y, i;
	Pos(int X = 0, int Y = 0) : x(X), y(Y) { i = 0; }
	bool operator == (const Pos& p) const { return x == p.x && y == p.y; }
	bool operator != (const Pos& p) const { return x != p.x || y != p.y; }
	bool operator < (const Pos& p) const { return x == p.x ? y < p.y : x < p.x; }
	bool operator <= (const Pos& p) const { return x == p.x ? y <= p.y : x <= p.x; }
	Pos operator + (const Pos& p) const { return { x + p.x, y + p.y }; }
	Pos operator - (const Pos& p) const { return { x - p.x, y - p.y }; }
	Pos operator * (const int& n) const { return { x * n, y * n }; }
	Pos operator / (const int& n) const { return { x / n, y / n }; }
	ll operator * (const Pos& p) const { return (ll)x * p.x + (ll)y * p.y; }
	ll operator / (const Pos& p) const { return (ll)x * p.y - (ll)y * p.x; }
	Pos operator ^ (const Pos& p) const { return { x * p.x, y * p.y }; }
	Pos& operator += (const Pos& p) { x += p.x; y += p.y; return *this; }
	Pos& operator -= (const Pos& p) { x -= p.x; y -= p.y; return *this; }
	Pos& operator *= (const int& scale) { x *= scale; y *= scale; return *this; }
	Pos& operator /= (const int& scale) { x /= scale; y /= scale; return *this; }
	Pos operator - () const { return { -x, -y }; }
	Pos operator ~ () const { return { -y, x }; }
	Pos operator ! () const { return { y, x }; }
	ll xy() const { return (ll)x * y; }
	ll Euc() const { return (ll)x * x + (ll)y * y; }
	int Man() const { return std::abs(x) + std::abs(y); }
	ld mag() const { return hypot(x, y); }
	ld rad() const { return atan2(y, x); }
	friend ld rad(const Pos& p1, const Pos& p2) { return atan2l(p1 / p2, p1 * p2); }
	int quad() const { return y > 0 || y == 0 && x >= 0; }
	friend bool cmpq(const Pos& a, const Pos& b) { return (a.quad() != b.quad()) ? a.quad() < b.quad() : a / b > 0; }
	friend std::istream& operator >> (std::istream& is, Pos& p) { is >> p.x >> p.y; return is; }
	friend std::ostream& operator << (std::ostream& os, const Pos& p) { os << p.x << " " << p.y; return os; }
}; const Pos O = Pos(0, 0);
typedef std::vector<Pos> Polygon;
Polygon OUT[LEN], IN[LEN];
ll cross(const Pos& d1, const Pos& d2, const Pos& d3) { return (d2 - d1) / (d3 - d2); }
ll cross(const Pos& d1, const Pos& d2, const Pos& d3, const Pos& d4) { return (d2 - d1) / (d4 - d3); }
ll dot(const Pos& d1, const Pos& d2, const Pos& d3) { return (d2 - d1) * (d3 - d2); }
ll dot(const Pos& d1, const Pos& d2, const Pos& d3, const Pos& d4) { return (d2 - d1) * (d4 - d3); }
int ccw(const Pos& d1, const Pos& d2, const Pos& d3) { ll ret = cross(d1, d2, d3); return ret < 0 ? -1 : !!ret; }
int ccw(const Pos& d1, const Pos& d2, const Pos& d3, const Pos& d4) { ll ret = cross(d1, d2, d3, d4); return ret < 0 ? -1 : !!ret; }
bool on_seg_strong(const Pos& d1, const Pos& d2, const Pos& d3) { return !ccw(d1, d2, d3) && dot(d1, d3, d2) >= 0; }
bool on_seg_weak(const Pos& d1, const Pos& d2, const Pos& d3) { return !ccw(d1, d2, d3) && dot(d1, d3, d2) > 0; }
bool inner_check(const Pos& d0, const Pos& d1, const Pos& d2, const Pos& q) {
	return ccw(d0, d1, q) >= 0 && ccw(d1, d2, q) >= 0 && ccw(d2, d0, q) >= 0;
}
bool inner_check(const Pos& d0, const Pos& d1, const Pos& d2, const Pos& d3, const Pos& q) {
	return ccw(d0, d1, q) >= 0 && ccw(d1, d2, q) >= 0 && ccw(d2, d3, q) >= 0 && ccw(d3, d0, q) >= 0;
}
Polygon graham_scan(Polygon& C) {
	Polygon H;
	if (C.size() < 3) {
		std::sort(C.begin(), C.end());
		return C;
	}
	std::swap(C[0], *min_element(C.begin(), C.end()));
	std::sort(C.begin() + 1, C.end(), [&](const Pos& p, const Pos& q) -> bool {
		int ret = ccw(C[0], p, q);
		if (!ret) return (C[0] - p).Euc() < (C[0] - q).Euc();
		return ret > 0;
		}
	);
	C.erase(unique(C.begin(), C.end()), C.end());
	int sz = C.size();
	for (int i = 0; i < sz; i++) {
		while (H.size() >= 2 && ccw(H[H.size() - 2], H.back(), C[i]) <= 0)
			H.pop_back();
		H.push_back(C[i]);
	}
	return H;
}
ld round(const Polygon& H, const bool& half = FULL) {
	ld R = 0;
	int sz = H.size();
	for (int i = 0; i < sz - half; i++) R += (H[i] - H[(i + 1) % sz]).mag();
	return R;
}
ld brute(Polygon& P) {//only use when N <= 100
	int sz = P.size();
	Polygon H = graham_scan(P);
	ld R = round(H);
	ld ret = INF;
	for (int i = 0; i < sz; i++) {
		for (int j = i + 1; j < sz; j++) {
			Polygon C;
			for (int k = 0; k < sz; k++) {//O(100 * 100 * 100 * 8)
				if (k == i || k == j) continue;
				C.push_back(P[k]);
			}
			ret = std::min(ret, round(graham_scan(C)));
		}
	}
	return R - ret;
}
int inner_check_bi_search(const Polygon& H, const Pos& p, const int& n = 1, const bool& in = OUTER) {//convex
	int sz = H.size();
	assert(sz > 2);
	if (cross(H[0], H[1], p) < 0 || cross(H[0], H[sz - 1], p) > 0) return -1;
	if (on_seg_strong(H[0], H[1], p)) {
		if (in) { IN[0].push_back(p); IN[1].push_back(p); }
		else {
			OUT[0].push_back(p); OUT[1].push_back(p);
			if (n == 2) OUT[sz - 1].push_back(p);
		}
		return 0;
	}
	if (on_seg_strong(H[0], H[sz - 1], p)) {
		if (in) { IN[0].push_back(p); IN[sz - 1].push_back(p); }
		else {
			OUT[0].push_back(p); OUT[sz - 1].push_back(p);
			if (n == 2) OUT[sz - 2].push_back(p);
		}
		return 0;
	}
	if (n == 1) {
		if (inner_check(H[sz - 2], H[sz - 1], H[0], p)) {
			if (in) IN[sz - 1].push_back(p);
			else OUT[sz - 1].push_back(p);
		}
		if (inner_check(H[sz - 1], H[0], H[1], p)) {
			if (in) IN[0].push_back(p);
			else OUT[0].push_back(p);
		}
		if (inner_check(H[0], H[1], H[2], p)) {
			if (in) IN[1].push_back(p);
			else OUT[1].push_back(p);
		}
	}
	else if (n == 2) {
		if (inner_check(H[sz - 3], H[sz - 2], H[sz - 1], H[0], p)) OUT[sz - 2].push_back(p);
		if (inner_check(H[sz - 2], H[sz - 1], H[0], H[1], p)) OUT[sz - 1].push_back(p);
		if (inner_check(H[sz - 1], H[0], H[1], H[2], p)) OUT[0].push_back(p);
		if (inner_check(H[0], H[1], H[2], H[3], p)) OUT[1].push_back(p);
	}
	//bi-search
	int s = 0, e = sz - 1, m;
	while (s + 1 < e) {
		m = s + e >> 1;
		if (cross(H[0], H[m], p) > 0) s = m;
		else e = m;
	}
	//bi-search
	if (cross(H[s], H[e], p) < 0) return -1;
	if (in) {
		if (on_seg_strong(H[s], H[e], p)) { IN[s].push_back(p); IN[e].push_back(p); return 0; }
		if (s == 2 && on_seg_weak(H[2], H[0], p)) { IN[1].push_back(p); }
		if (inner_check(H[s], H[e], H[(s - 1 + sz) % sz], p)) { IN[s].push_back(p); }
		if (inner_check(H[e], H[(e + 1) % sz], H[s], p)) { IN[e].push_back(p); }
		if (e == sz - 2 && on_seg_weak(H[sz - 2], H[0], p)) { IN[sz - 1].push_back(p); }
		return 1;
	}
	else {
		if (n == 1) {
			if (on_seg_strong(H[s], H[e], p)) { OUT[s].push_back(p); OUT[e].push_back(p); return 0; }
			if (s == 2 && on_seg_weak(H[2], H[0], p)) { OUT[1].push_back(p); }
			if (inner_check(H[s], H[e], H[(s - 1 + sz) % sz], p)) { OUT[s].push_back(p); }
			if (inner_check(H[e], H[(e + 1) % sz], H[s], p)) { OUT[e].push_back(p); }
			if (e == sz - 2 && on_seg_weak(H[sz - 2], H[0], p)) { OUT[sz - 1].push_back(p); }
			return 1;
		}
		else if (n == 2) {
			if (on_seg_strong(H[s], H[e], p)) {
				OUT[(s - 1 + sz) % sz].push_back(p);
				OUT[s].push_back(p);
				OUT[e].push_back(p);
				return 0;
			}
			int i0 = (s - 2 + sz) % sz;
			int i1 = (s - 1 + sz) % sz;
			int i2 = s;
			int i3 = e;
			int i4 = (e + 1) % sz;
			int i5 = (e + 2) % sz;
			if (inner_check(H[i0], H[i1], H[i2], H[i3], p)) OUT[i1].push_back(p);
			if (inner_check(H[i1], H[i2], H[i3], H[i4], p)) OUT[i2].push_back(p);
			if (inner_check(H[i2], H[i3], H[i4], H[i5], p)) OUT[i3].push_back(p);
		}
	}
	return 1;
}
Polygon lower_monotone_chain(const Polygon& H, const int& x, const int& n = 1, const bool& in = OUTER) {
	Polygon& C = in ? IN[x] : OUT[x];
	int sz = H.size();
	const Pos& s = H[(x - 1 + sz) % sz], & e = H[(x + n) % sz];
	//C.push_back(s); C.push_back(e);
	//std::sort(C.begin(), C.end(), [&](const Pos& p, const Pos& q) -> bool {
	//	ll fp = dot(s, e, p), fq = dot(s, e, q);
	//	if (fp == fq) {
	//		ll tp = cross(s, e, p), tq = cross(s, e, q);
	//		return tp < tq;
	//	}
	//	return fp < fq;
	//	});
	std::sort(C.begin(), C.end(), [&](const Pos& p, const Pos& q) -> bool {
		int ret = ccw(s, p, q);
		if (!ret) return (s - p).Euc() < (s - q).Euc();
		return ret > 0;
		}
	);
	Polygon S;
	sz = C.size();
	if (sz == 2) return C;
	for (int i = 0; i < sz; i++) {
		while (S.size() > 1 && cross(S[S.size() - 2], S.back(), C[i]) <= 0)
			S.pop_back();
		S.push_back(C[i]);
	}
	return S;
}
struct E {
	ld r;
	int i;
	E(ld r_ = 0, int i_ = 0) : r(r_), i(i_) {}
	bool operator < (const E& e) const { return r > e.r; }
};
typedef std::vector<E> VE;
void solve() {
	std::cin.tie(0)->sync_with_stdio(0);
	std::cout.tie(0);
	std::cout << std::fixed;
	std::cout.precision(9);
	//freopen("../../../input_data/MakingPerimeter/002.in", "r", stdin);
	//freopen("../../../input_data/MakingPerimeter/out.txt", "w", stdout);
	std::cin >> N;
	assert(N >= 5); assert(N <= LEN);
	Polygon C(N);
	for (int i = 0; i < N; i++) std::cin >> C[i], C[i].i = i;
	//if (N <= LIMIT) { std::cout << brute(C) << "\n"; return; }
	Polygon P = graham_scan(C), I;
	assert(P.size() >= 3);
	ld R = round(P), ret = R;
	VE del;
	memset(V, 0, sizeof V);
	for (const Pos& p : P) V[p.i] = 1;
	for (const Pos& p : C) if (!V[p.i]) I.push_back(p);
	for (const Pos& p : I) inner_check_bi_search(P, p, 1, OUTER);
	int sz = P.size();
	for (int i = 0; i < sz; i++) {
		const Pos& p0 = P[(i - 1 + sz) % sz], & p1 = P[i], & p2 = P[(i + 1) % sz];
		ld o1 = (p0 - p1).mag() + (p1 - p2).mag();
		OUT[i].push_back(p0); OUT[i].push_back(p2);
		K = OUT[i].size();
		for (int k = 0; k < K; k++) OUT[i][k].i = k;
		Polygon Q = lower_monotone_chain(P, i, 1, OUTER), J;
		M = Q.size();
		ld r = round(Q, HALF);
		del.push_back(E(o1 - r, p1.i));
		if (M <= 2) continue;
		std::vector<bool> F(K, 0);
		for (int j = 0; j < M; j++) Polygon().swap(IN[j]);
		for (const Pos& q : Q) F[q.i] = 1;
		for (const Pos& q : OUT[i]) if (!F[q.i]) J.push_back(q);
		for (const Pos& q : J) inner_check_bi_search(Q, q, 1, INNER);
		for (int j = 1; j < M - 1; j++) {
			const Pos& q0 = Q[(j - 1 + M) % M], & q1 = Q[j], & q2 = Q[(j + 1) % M];
			ld o2 = (q0 - q1).mag() + (q1 - q2).mag();
			IN[j].push_back(q0); IN[j].push_back(q2);
			Polygon H = lower_monotone_chain(Q, j, 1, INNER);
			ld rr = round(H, HALF);
			ret = std::min(ret, R - o1 + r - o2 + rr);
		}
	}
	if (sz >= 4) {
		std::sort(del.begin(), del.end());
		int t0 = del[0].i, t1 = del[1].i, t2 = del[2].i, t3 = del[3].i;
		for (int i = 0; i < sz; i++) {
			if (P[i].i == t0) {
				int tnxt = P[(i + 1) % sz].i, tpre = P[(i - 1 + sz) % sz].i;
				if (t1 != tnxt && t1 != tpre) ret = std::min(ret, R - del[0].r - del[1].r);
				else if (t2 != tnxt && t2 != tpre) ret = std::min(ret, R - del[0].r - del[2].r);
				else {
					assert(t3 != tnxt && t3 != tpre);
					ret = std::min(ret, R - del[0].r - del[3].r);
					ret = std::min(ret, R - del[1].r - del[2].r);
				}
				break;
			}
		}
	}
	if (sz == 3) {
		for (int i = 0; i < sz; i++) {
			Polygon tmp = I;
			tmp.push_back(P[i]);
			ret = std::min(ret, round(graham_scan(tmp)));
		}
	}
	else {
		for (int i = 0; i < sz; i++) Polygon().swap(OUT[i]);
		for (const Pos& p : I) inner_check_bi_search(P, p, 2, OUTER);
		for (int i = 0; i < sz; i++) {
			const Pos& p0 = P[(i - 1 + sz) % sz], & p1 = P[i], & p2 = P[(i + 1) % sz], & p3 = P[(i + 2) % sz];
			ld o3 = (p0 - p1).mag() + (p1 - p2).mag() + (p2 - p3).mag();
			OUT[i].push_back(p0); OUT[i].push_back(p3);
			Polygon Q = lower_monotone_chain(P, i, 2, OUTER);
			ld rr = round(Q, HALF);
			ret = std::min(ret, R - o3 + rr);
		}
	}
	std::cout << R - ret << "\n";
	return; 
}
int main() { solve(); return 0; }//boj15332 Making Perimeter of the Convex Hull Shortest

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 53ms
memory: 8056kb

input:

99999
935832 -352444
-888472 -458930
-618551 785744
993122 117080
-728009 685566
925058 379824
-336870 941551
-69122 997608
863881 -503694
979087 -203440
163985 -986462
-357874 933769
167551 -985863
-917500 397733
-325007 -945711
731469 -681874
710309 -703889
811551 584280
374610 927182
-414664 -909...

output:

0.000872660

result:

ok found '0.00087', expected '0.00087', error '0.00000'

Test #2:

score: 0
Accepted
time: 48ms
memory: 8008kb

input:

99999
-206509 978444
469697 882827
988053 154112
-809693 -586853
917275 -398253
-950152 311786
997802 -66252
200188 979757
666960 745092
726992 686645
-999245 -38843
-602675 797986
-569604 -821918
975054 221966
-110350 993892
-590770 -806839
946042 324041
994129 -108195
418719 -908115
974557 224139
...

output:

0.001177605

result:

ok found '0.00118', expected '0.00118', error '0.00000'

Test #3:

score: 0
Accepted
time: 49ms
memory: 8120kb

input:

99999
83108 -996540
986675 162698
689993 723815
686616 727019
534980 -844864
454552 890719
-477971 -878375
-971329 -237738
736858 676046
-802267 596964
-994840 101450
998016 62957
-290692 956816
375653 -926760
-999965 -8326
-913615 -406578
949266 314471
886806 -462141
15839 -999874
275818 961209
617...

output:

0.000995200

result:

ok found '0.00100', expected '0.00100', error '0.00000'

Test #4:

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

input:

99999
-258783 965935
-356262 934386
200676 979657
-898460 -439054
166888 985975
-196896 -980424
422993 -906132
180067 983654
-387583 921834
-992469 -122488
482322 -875993
372475 -928042
695881 718156
-379158 925331
-917372 398029
-221948 975058
358818 933407
615181 -788385
-229513 -973305
-395418 -9...

output:

0.001015546

result:

ok found '0.00102', expected '0.00102', error '0.00000'

Test #5:

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

input:

99999
945508 -325597
684874 -728661
999073 -43046
-866731 498775
-683605 729852
983143 -182835
-70493 997512
-969735 244158
861019 508572
-879897 475163
996599 82401
-350100 936711
-379560 -925166
-516460 -856311
-500690 865626
-807884 589340
-421959 906614
65167 997874
-212443 -977173
-949093 -3149...

output:

0.001048963

result:

ok found '0.00105', expected '0.00105', error '0.00000'

Test #6:

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

input:

1000
-67 760
-37 -621
427 -497
497 683
-899 -134
-244 399
-206 -967
126 -881
-609 -746
-176 841
269 -31
549 480
481 12
363 360
-5 -915
778 43
-229 757
283 395
-218 671
673 -559
-889 280
503 706
476 -673
699 326
-637 474
-225 -300
218 632
568 12
-723 -355
110 80
348 521
119 -84
-318 519
169 863
-591 ...

output:

12.595858978

result:

ok found '12.59586', expected '12.59586', error '0.00000'

Test #7:

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

input:

1000
-676 -401
-356 253
341 67
-762 -290
98 697
-43 -707
354 26
678 578
-577 -530
739 -473
498 383
-302 -645
-239 425
-946 310
109 584
495 307
164 543
740 -19
241 -223
376 456
133 -747
544 -719
-123 768
120 -204
-230 456
-538 -517
78 732
596 -49
856 -494
730 290
-255 705
717 50
64 774
128 -228
-163 ...

output:

12.632718323

result:

ok found '12.63272', expected '12.63272', error '0.00000'

Test #8:

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

input:

1000
-668 -657
-313 -147
322 549
-753 -406
87 -550
-41 403
329 670
685 -667
-554 -357
750 565
486 -190
-276 -645
-199 -494
-972 -67
97 927
483 -251
162 78
755 -631
224 -135
351 260
136 0
544 104
-117 -612
114 875
-194 616
-508 626
75 -312
593 -160
878 -388
749 24
-227 657
727 661
55 195
129 505
-157...

output:

12.756994865

result:

ok found '12.75699', expected '12.75699', error '0.00000'

Test #9:

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

input:

1000
-637 -40
-352 -697
350 -814
-727 -106
79 -19
-54 974
359 -618
685 641
-547 -683
757 558
484 557
-285 667
-235 615
-972 14
85 523
479 17
156 -216
763 -450
243 398
376 69
131 -383
539 -291
-129 59
110 -368
-231 643
-501 -834
56 926
590 766
862 503
752 94
-251 -385
726 462
37 588
128 -966
-170 846...

output:

12.750019402

result:

ok found '12.75002', expected '12.75002', error '0.00000'

Test #10:

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

input:

1000
-677 257
-353 486
345 -94
-769 219
112 -976
-55 396
354 -121
666 575
-559 -307
729 -281
493 525
-301 484
-243 487
-986 142
121 -475
488 195
168 -25
744 -510
230 -950
372 186
158 219
550 462
-131 -461
135 -465
-240 -635
-511 -666
96 104
590 398
869 -103
724 -205
-251 249
707 -308
82 -29
148 -231...

output:

12.632672247

result:

ok found '12.63267', expected '12.63267', error '0.00000'

Test #11:

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

input:

1000
-876 368
263 -687
-509 -659
759 -568
248 249
302 721
-250 493
346 204
723 676
674 -348
-171 -746
-982 -4
-513 703
-463 -727
303 166
392 -690
785 223
-377 -555
-2 -751
-279 664
-636 -135
-912 320
21 -277
-554 -1
459 -642
-787 473
481 -373
329 323
20 -958
972 -152
565 -341
289 -630
-969 -168
12 5...

output:

12.844301461

result:

ok found '12.84430', expected '12.84430', error '0.00000'

Test #12:

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

input:

1000
-682 402
-333 -815
314 -625
-765 -629
110 587
-27 960
318 338
674 412
-586 -768
734 338
479 -93
-281 241
-206 820
-972 -223
119 390
473 548
167 -435
737 -499
230 -129
349 -651
153 764
518 319
-106 -168
136 446
-201 -623
-528 -417
95 -900
564 633
865 93
728 316
-226 686
702 -288
77 357
149 -888
...

output:

12.950079938

result:

ok found '12.95008', expected '12.95008', error '0.00000'

Test #13:

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

input:

1000
-672 220
-323 235
327 79
-761 -403
131 89
-45 -42
334 -234
665 -593
-549 794
738 -545
483 -169
-261 680
-214 44
-966 202
144 617
477 -710
200 -372
743 -262
264 601
356 439
183 -360
539 -118
-122 -583
169 -584
-209 437
-492 812
112 319
590 571
855 340
723 3
-224 186
697 148
96 -578
178 -822
-160...

output:

12.958505978

result:

ok found '12.95851', expected '12.95851', error '0.00000'

Test #14:

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

input:

1000
-670 165
-338 220
350 -54
-757 -159
96 64
-63 -279
355 383
685 -562
-570 218
756 271
479 737
-291 -325
-228 -500
-957 281
113 690
474 667
177 11
760 287
242 503
378 140
156 856
520 561
-138 433
135 -824
-222 758
-516 456
80 723
581 -394
873 -52
749 -309
-238 -230
724 -480
68 917
154 -932
-177 -...

output:

12.519704610

result:

ok found '12.51970', expected '12.51970', error '0.00000'

Test #15:

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

input:

1000
-661 541
-335 662
299 38
-752 -565
82 -846
-65 788
307 -932
669 -669
-562 216
738 596
486 -481
-291 421
-229 -427
-979 -133
89 -437
480 -876
159 -524
756 19
216 208
334 -325
140 92
536 -337
-146 869
112 972
-228 -971
-510 -705
67 272
571 -53
863 -325
736 -470
-246 147
705 -249
57 467
124 896
-1...

output:

12.577309476

result:

ok found '12.57731', expected '12.57731', error '0.00000'

Test #16:

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

input:

1000
-761 -1000
760 1000
1000 -621
1000 -497
683 1000
-134 1000
399 -1000
-1000 -624
868 -1000
-1000 -967
-1000 -881
1000 -746
841 -1000
-31 1000
480 1000
12 1000
1000 360
1000 -915
-1000 999
1000 -712
-1000 43
489 -1000
1000 757
1000 395
-1000 671
969 -1000
-559 1000
1000 280
1000 706
-673 -1000
10...

output:

4.601761091

result:

ok found '4.60176', expected '4.60176', error '0.00000'

Test #17:

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

input:

992
-1068 -704
-732 981
728 -992
-1138 -268
288 -1145
-125 -1010
736 -968
1098 144
-967 -737
1153 313
898 -469
-674 1159
-594 -858
-1259 -640
320 -1155
894 -484
459 902
1160 334
594 858
763 -886
414 -1186
971 735
-332 -943
366 -1170
-589 1243
-916 416
245 -1131
1017 720
1222 526
1146 293
-614 1251
1...

output:

4.995461902

result:

ok found '4.99546', expected '4.99546', error '0.00000'

Test #18:

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

input:

985
-1075 221
-546 949
609 793
-1203 -361
196 -1378
-40 -1206
619 -848
1168 386
-937 -555
1237 1
872 -500
-451 -907
-350 1218
-1390 -213
227 -1387
857 -520
325 -1253
1253 24
441 -1094
660 756
289 1025
948 546
-191 -1097
265 1042
-342 1229
-857 521
169 1112
1036 -274
1375 191
1231 -6
-366 1196
1204 3...

output:

5.312460522

result:

ok found '5.31246', expected '5.31246', error '0.00000'

Test #19:

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

input:

990
-1110 -172
-617 -851
614 -789
-1218 -23
226 -1071
-88 1171
633 829
1161 102
-973 528
1232 4
886 481
-503 -1008
-389 -1165
-1392 215
241 1369
880 489
320 -1002
1239 -4
439 -916
669 780
292 1298
969 366
-225 1072
265 1336
-386 -1168
-910 574
201 -1089
1044 -477
1344 -259
1224 -346
-410 937
1199 49...

output:

3.858002209

result:

ok found '3.85800', expected '3.85800', error '0.00000'

Test #20:

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

input:

995
-1068 53
-731 -986
705 1065
-1154 316
246 1131
-130 1009
717 1027
1091 -122
-973 735
1132 -249
893 485
-677 831
-539 876
-1256 631
272 1139
892 -761
410 -917
1140 -273
567 1235
739 -811
368 1171
954 298
-315 -1154
311 -950
-527 879
-910 -433
202 -985
1007 135
1211 -657
1130 -242
-583 861
1117 -6...

output:

4.813933448

result:

ok found '4.81393', expected '4.81393', error '0.00000'

Test #21:

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

input:

1000
-861 1000
368 -1000
1000 -687
1000 -659
1000 -568
249 -1000
943 -1000
340 1000
-1000 721
-1000 716
-1000 493
-1000 204
1000 676
-1000 -348
-746 1000
-1000 -4
1000 703
-727 1000
1000 166
-690 -1000
929 1000
223 1000
1000 -555
-1000 -751
664 1000
-135 -1000
320 -1000
-277 1000
1000 594
-992 1000
...

output:

17.545183145

result:

ok found '17.54518', expected '17.54518', error '0.00000'

Test #22:

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

input:

994
-1061 -32
-706 1063
716 -1031
-1126 -230
256 -1134
-102 -1018
729 -990
1103 160
-946 -744
1170 671
903 -454
-635 -845
-446 -906
-1257 -634
282 959
894 -484
434 -1192
1175 381
592 -1244
757 805
388 925
956 -293
-293 -956
316 948
-443 -907
-894 484
232 -1126
1005 -141
1234 564
1163 345
-497 -889
1...

output:

19.021580880

result:

ok found '19.02158', expected '19.02158', error '0.00000'

Test #23:

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

input:

992
-1090 -444
-591 -806
600 -874
-1203 -361
198 -1380
-103 1310
608 794
1126 417
-938 -554
1206 -40
852 -527
-519 986
-409 1137
-1388 -227
213 -1390
849 -531
274 -1323
1218 -23
406 -1141
649 764
250 -1356
935 556
-256 -1050
232 -1381
-407 -940
-868 -605
163 -1355
1016 497
1333 267
1195 -56
-437 109...

output:

17.488651610

result:

ok found '17.48865', expected '17.48865', error '0.00000'

Test #24:

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

input:

990
-1095 440
-603 -870
615 853
-1216 -27
197 -1092
-88 -1300
629 834
1149 119
-943 -402
1238 -3
851 529
-516 -990
-411 -1134
-1395 222
210 -1082
845 537
324 -1000
1256 -322
450 -908
674 773
279 -1032
927 -562
-273 1037
246 1362
-404 941
-868 -506
168 -1113
1015 303
1348 -154
1229 8
-428 -1111
1196 ...

output:

17.217534031

result:

ok found '17.21753', expected '17.21753', error '0.00000'

Test #25:

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

input:

998
-1042 712
-703 822
699 1083
-1121 216
275 -961
-106 1016
708 -821
1067 -49
-951 742
1134 -256
882 521
-634 845
-473 -1205
-1250 613
310 1152
874 545
448 1197
1139 -271
584 -861
726 1000
391 -924
940 342
-285 958
348 -938
-467 899
-894 -484
249 1132
990 187
1210 -658
1127 -684
-521 -1220
1094 -13...

output:

18.652698888

result:

ok found '18.65270', expected '18.65270', error '0.00000'

Test #26:

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

input:

1000
935 -352
-888 -458
-618 785
993 117
-728 685
925 379
-336 941
-69 997
863 -503
979 -203
163 -986
-357 933
167 -985
-917 397
-325 -945
731 -681
710 -703
811 584
374 927
-414 -909
-555 -831
-428 903
236 -971
-929 367
82 -996
-731 682
-510 -860
993 113
953 300
287 957
780 -625
-875 483
-913 -405
9...

output:

0.046214125

result:

ok found '0.04621', expected '0.04621', error '0.00000'

Test #27:

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

input:

993
-934 -353
-593 803
586 809
-967 247
131 -991
-129 990
598 800
955 -292
-850 523
975 218
794 606
-512 -857
-426 -903
-999 8
155 -987
787 614
252 967
978 203
381 923
623 781
214 -976
852 -522
-257 -965
187 -982
-424 -905
-803 593
88 995
897 -439
997 55
973 224
-442 -896
967 -251
72 -997
206 978
-3...

output:

0.071116825

result:

ok found '0.07112', expected '0.07112', error '0.00000'

Test #28:

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

input:

990
-930 -364
-638 -768
571 819
-975 221
138 -989
-161 -986
576 -816
962 268
-867 496
981 -188
820 570
-556 829
-454 890
-999 -15
161 -986
812 581
275 960
982 -182
423 -905
614 788
243 969
888 458
-281 -958
198 979
-449 891
-822 -566
102 -993
925 -378
997 51
978 -200
-477 877
971 231
71 996
227 973
...

output:

0.088124657

result:

ok found '0.08812', expected '0.08812', error '0.00000'

Test #29:

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

input:

991
-934 -356
-555 -831
660 749
-971 231
278 959
-42 -998
666 744
964 -262
-854 517
983 177
854 518
-476 -878
-382 923
-999 -9
301 -952
848 -528
382 923
985 164
523 -851
701 711
357 933
895 -444
-193 -980
330 -942
-375 925
-801 596
249 967
923 -381
997 -54
982 -183
-395 918
977 208
213 -975
350 935
...

output:

0.074712097

result:

ok found '0.07471', expected '0.07471', error '0.00000'

Test #30:

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

input:

996
-928 -368
-591 805
593 -803
-963 -263
183 982
-54 -997
607 792
950 308
-837 -546
974 -220
781 623
-520 853
-410 911
-999 7
208 -977
780 623
319 947
976 211
435 899
646 761
276 -960
829 557
-200 -978
246 968
-407 912
-779 624
172 -984
887 459
995 92
973 -226
-422 -905
965 -257
156 986
268 -963
-2...

output:

0.069799717

result:

ok found '0.06980', expected '0.06980', error '0.00000'

Test #31:

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

input:

1000
-206 978
469 882
988 154
-809 -586
917 -398
-950 311
997 -66
200 979
666 745
726 686
-999 -38
-602 797
-569 -821
975 221
-110 993
-590 -806
946 324
994 -108
418 -908
974 224
923 -383
71 997
381 -924
-783 620
882 -469
-986 -160
410 -911
-390 -920
-859 -511
29 -999
-904 -426
-253 -967
-926 -376
-...

output:

0.045689094

result:

ok found '0.04569', expected '0.04569', error '0.00000'

Test #32:

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

input:

990
-930 366
-632 -774
592 805
-971 232
145 -988
-133 990
599 -800
954 -295
-869 -492
977 206
794 606
-547 -835
-428 902
-999 -24
162 -986
791 610
289 956
979 -200
410 -911
631 774
220 -974
865 501
-261 964
184 982
-418 907
-834 549
102 994
896 441
996 76
974 219
-455 -889
967 -247
82 -996
210 976
-...

output:

0.087971881

result:

ok found '0.08797', expected '0.08797', error '0.00000'

Test #33:

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

input:

991
-921 -387
-558 -828
656 752
-964 261
289 956
-65 -996
669 -742
965 -257
-843 537
983 -179
833 552
-481 875
-367 -929
-999 -4
312 -949
828 -558
422 905
984 -171
522 851
696 -717
393 -918
885 463
-196 -979
350 936
-364 -930
-793 607
273 -961
918 394
997 56
981 184
-394 918
976 211
207 -977
372 927...

output:

0.092573389

result:

ok found '0.09257', expected '0.09257', error '0.00000'

Test #34:

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

input:

988
-927 -371
-592 804
608 792
-971 233
203 978
-111 992
620 783
966 254
-864 501
983 -175
809 585
-503 862
-411 911
-999 15
237 -971
805 591
353 -935
984 174
463 885
653 756
304 951
880 -473
-262 -963
271 961
-409 911
-823 -566
176 983
911 411
997 -41
982 180
-429 902
978 -201
156 986
288 956
-331 ...

output:

0.064487342

result:

ok found '0.06449', expected '0.06449', error '0.00000'

Test #35:

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

input:

997
-951 -303
-652 757
545 837
-978 -206
119 -992
-165 -985
555 831
948 -312
-881 -471
976 -210
768 638
-568 822
-466 -883
-999 -6
151 988
764 643
260 -964
977 -208
401 914
605 -794
213 -976
840 -540
-296 -954
169 984
-457 889
-839 -542
88 995
893 447
996 72
973 -224
-487 -872
964 -262
56 -997
200 9...

output:

0.078523969

result:

ok found '0.07852', expected '0.07852', error '0.00000'

Test #36:

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

input:

1000
83 -996
986 162
689 723
686 727
534 -844
454 890
-477 -878
-971 -237
736 676
-802 596
-994 101
998 62
-290 956
375 -926
-999 -8
-913 -406
949 314
886 -462
15 -999
275 961
617 -786
32 -999
372 -928
-989 -144
-661 749
926 -376
-631 -775
-701 -712
-463 -885
232 972
-976 -216
-292 956
933 358
265 -...

output:

0.046495351

result:

ok found '0.04650', expected '0.04650', error '0.00000'

Test #37:

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

input:

999
-948 313
-593 -803
596 -801
-979 194
212 976
-52 997
611 789
945 -322
-864 -501
971 230
785 -617
-487 872
-374 -926
-999 12
240 -969
778 -627
355 -933
973 -226
466 884
643 -765
303 -951
839 542
-224 -974
271 -961
-364 931
-822 -568
194 -980
892 -451
994 104
967 247
-399 916
958 -283
175 -983
295...

output:

0.078903498

result:

ok found '0.07890', expected '0.07890', error '0.00000'

Test #38:

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

input:

989
-946 -319
-660 750
585 -810
-978 -202
191 980
-105 -993
595 -802
945 -323
-874 -482
975 -215
805 591
-581 812
-476 878
-999 35
210 -977
801 -596
325 -944
979 -198
453 890
627 777
271 -961
864 -501
-274 -961
243 969
-474 879
-846 -532
171 984
893 448
997 51
970 238
-502 863
958 -283
143 989
268 -...

output:

0.077735234

result:

ok found '0.07774', expected '0.07774', error '0.00000'

Test #39:

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

input:

990
-937 346
-582 811
606 794
-966 254
212 976
-76 996
630 775
939 341
-860 -507
974 220
803 593
-500 865
-375 -925
-999 27
228 973
798 600
341 938
976 211
435 898
659 -750
282 958
851 -523
-210 976
254 966
-370 -927
-801 597
161 -986
888 -457
997 -72
972 229
-412 910
959 -280
148 988
274 960
-284 9...

output:

0.069050322

result:

ok found '0.06905', expected '0.06905', error '0.00000'

Test #40:

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

input:

998
-931 361
-600 798
643 -765
-977 209
237 -971
-55 997
654 755
963 264
-861 -506
980 196
834 549
-505 -862
-404 913
-999 -5
254 -966
828 -558
348 936
983 -175
462 -886
686 -726
316 -947
892 448
-196 -979
275 -960
-399 -915
-813 581
206 -978
918 -393
996 72
979 197
-428 902
973 222
185 982
298 -953...

output:

0.088510070

result:

ok found '0.08851', expected '0.08851', error '0.00000'

Test #41:

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

input:

1000
-258 965
-356 934
200 979
-898 -439
166 985
-196 -980
422 -906
180 983
-387 921
-992 -122
482 -875
372 -928
695 718
-379 925
-917 398
-221 975
358 933
615 -788
-229 -973
-395 -918
-998 50
747 -664
-113 -993
438 -898
-993 -115
749 -662
997 69
-392 -919
-889 457
470 882
-199 979
54 998
-837 -546
...

output:

0.040063766

result:

ok found '0.04006', expected '0.04006', error '0.00000'

Test #42:

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

input:

998
-940 -337
-616 -787
547 -835
-980 -197
167 985
-104 994
576 816
942 -331
-862 -503
967 -248
789 613
-528 -848
-438 -898
-999 -26
181 -982
780 -623
271 -961
968 248
401 -914
625 -779
239 -970
844 -534
-274 960
204 -978
-434 900
-814 -579
152 -987
884 465
996 -72
964 262
-453 -890
956 -289
114 -99...

output:

0.078711463

result:

ok found '0.07871', expected '0.07871', error '0.00000'

Test #43:

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

input:

996
-939 340
-596 -801
631 774
-974 220
247 968
-33 998
640 -766
947 -316
-869 493
975 216
822 566
-510 859
-373 926
-999 6
260 964
817 -575
353 934
976 -214
456 -889
673 738
313 -948
867 -497
-201 -978
280 -959
-371 927
-815 -578
233 -970
890 -453
996 -79
971 232
-407 912
966 254
213 975
298 -953
-...

output:

0.076432224

result:

ok found '0.07643', expected '0.07643', error '0.00000'

Test #44:

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

input:

990
-941 333
-608 792
609 792
-979 198
211 976
-73 -996
619 -784
945 324
-870 491
972 228
817 575
-531 845
-414 -909
-999 -16
230 -972
808 -586
348 936
974 220
465 884
646 762
314 -948
850 -524
-213 975
260 964
-411 911
-828 -559
191 -980
881 -471
997 -57
970 -236
-441 896
960 277
169 984
285 -957
-...

output:

0.068412048

result:

ok found '0.06841', expected '0.06841', error '0.00000'

Test #45:

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

input:

998
-944 -326
-640 767
560 -827
-983 178
202 -978
-113 992
567 821
942 333
-886 460
968 244
765 -641
-545 -837
-425 904
-999 -2
209 977
756 -653
293 955
970 239
416 -908
601 798
260 -964
827 561
-272 961
237 970
-423 905
-838 543
181 -982
874 483
995 -88
967 -250
-440 -896
956 287
158 -986
252 966
-...

output:

0.110270629

result:

ok found '0.11027', expected '0.11027', error '0.00000'

Test #46:

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

input:

1000
945 -325
684 -728
999 -43
-866 498
-683 729
983 -182
-70 997
-969 244
861 508
-879 475
996 82
-350 936
-379 -925
-516 -856
-500 865
-807 589
-421 906
65 997
-212 -977
-949 -314
-942 -332
-261 -965
-973 -226
939 342
-517 -855
68 997
-285 958
993 115
-924 -380
-496 868
293 956
-837 -546
515 857
9...

output:

0.038384081

result:

ok found '0.03838', expected '0.03838', error '0.00000'

Test #47:

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

input:

993
-928 -369
-580 -813
633 -772
-967 -251
238 970
-42 998
644 764
948 -312
-848 528
976 -211
829 -556
-506 860
-407 -912
-999 11
251 967
826 -562
356 933
977 -207
480 876
666 -744
320 946
883 -467
-227 972
294 954
-400 915
-800 -597
195 -979
906 421
996 -68
973 224
-435 899
965 -257
170 -984
309 94...

output:

0.079488700

result:

ok found '0.07949', expected '0.07949', error '0.00000'

Test #48:

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

input:

994
-931 -360
-610 -791
634 772
-968 -247
179 983
-72 997
639 767
957 -286
-852 -520
976 212
830 -556
-521 -852
-415 908
-999 -4
195 980
822 567
315 947
979 199
438 -898
685 -727
250 967
884 466
-218 975
234 971
-413 909
-809 -586
141 988
910 -412
996 65
976 -214
-433 -899
969 240
122 -992
247 -968
...

output:

0.087171432

result:

ok found '0.08717', expected '0.08717', error '0.00000'

Test #49:

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

input:

991
-939 339
-625 -779
564 -824
-972 230
119 -992
-115 992
567 822
952 -303
-867 496
977 -208
806 -590
-531 846
-414 -909
-999 9
141 989
796 -604
251 966
978 202
400 -915
608 792
205 978
863 502
-263 964
161 -986
-402 915
-828 -558
94 994
903 427
997 47
975 219
-440 897
966 -256
79 996
195 -980
-318...

output:

0.072670051

result:

ok found '0.07267', expected '0.07267', error '0.00000'

Test #50:

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

input:

997
-942 334
-606 794
608 792
-972 -228
209 977
-113 992
615 787
963 264
-877 479
979 197
823 567
-520 853
-423 905
-999 -14
230 971
819 572
366 -930
982 -182
481 875
636 770
303 -951
877 477
-255 -966
274 960
-416 908
-821 -568
185 982
915 -400
998 -40
977 -206
-459 887
973 222
149 -988
296 -954
-3...

output:

0.073256014

result:

ok found '0.07326', expected '0.07326', error '0.00000'

Test #51:

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

input:

1000
-677 735
-941 337
991 -132
975 220
-997 69
698 715
998 -60
-256 -966
-431 -901
917 -398
-430 902
-21 -999
-987 158
329 -944
968 250
-973 228
-193 -981
-911 -412
-469 -882
-306 -951
-491 -870
605 -795
931 -362
-536 -843
75 997
-337 941
265 964
-929 -369
959 282
644 764
913 407
601 -798
992 -122
...

output:

0.049048317

result:

ok found '0.04905', expected '0.04905', error '0.00000'

Test #52:

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

input:

997
-935 351
-589 807
576 -815
-974 224
217 975
-20 999
590 805
943 -328
-861 -505
971 -233
793 607
-482 -875
-387 921
-999 -20
233 -971
789 613
316 947
972 231
446 -894
628 776
284 -957
839 -541
-186 -981
260 964
-375 926
-814 -579
203 -978
875 481
995 92
968 -250
-416 908
957 -286
182 -982
273 -96...

output:

0.083063626

result:

ok found '0.08306', expected '0.08306', error '0.00000'

Test #53:

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

input:

993
-945 323
-609 -791
627 -778
-977 -207
235 970
-59 997
636 -770
942 -334
-882 467
974 -220
808 -586
-522 -851
-420 907
-999 2
257 965
803 -593
372 926
981 187
507 -860
660 749
332 -942
859 509
-242 969
301 -953
-414 -908
-819 -572
220 974
892 -450
996 83
973 -227
-449 892
962 267
202 979
319 -947...

output:

0.077305092

result:

ok found '0.07731', expected '0.07731', error '0.00000'

Test #54:

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

input:

988
-937 -348
-637 768
590 806
-972 -226
211 -976
-124 -991
599 -799
955 294
-869 492
981 188
804 -593
-564 824
-422 -905
-999 -15
225 973
796 -604
344 938
983 -179
443 895
628 -776
311 949
860 -507
-256 -966
269 961
-420 907
-817 -575
169 -984
892 449
997 51
979 -195
-447 893
968 247
141 -989
283 9...

output:

0.086111603

result:

ok found '0.08611', expected '0.08611', error '0.00000'

Test #55:

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

input:

995
-935 -350
-566 823
603 -796
-974 221
167 985
-100 994
614 -788
952 302
-865 499
980 196
803 -593
-494 868
-388 920
-999 26
188 981
798 -600
306 -950
982 -183
441 -896
638 -769
267 -963
856 -515
-227 973
242 -969
-384 922
-811 582
148 -988
903 427
997 -54
979 -198
-404 -913
967 248
120 -992
261 9...

output:

0.082927955

result:

ok found '0.08293', expected '0.08293', error '0.00000'

Test #56:

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

input:

1000
102 994
701 712
-998 -46
973 227
880 474
-591 806
963 -267
-191 -981
-738 -674
-182 983
-164 -986
515 857
558 -829
-782 -622
-836 -548
-999 6
573 -818
788 -615
899 -437
-198 -980
-983 181
309 -950
789 613
-994 102
-862 506
-938 346
850 525
-196 -980
-809 -587
-609 793
821 -570
570 -821
-252 967...

output:

0.041058830

result:

ok found '0.04106', expected '0.04106', error '0.00000'

Test #57:

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

input:

996
-934 355
-631 -774
582 -810
-972 -229
188 -981
-78 995
592 804
955 -292
-869 -493
975 217
807 589
-563 -825
-452 891
-998 -53
206 -977
801 -596
331 -942
977 203
434 -900
630 -775
302 -953
853 519
-255 -966
275 -960
-444 -895
-828 -558
162 -986
895 -445
997 -59
974 -219
-468 -882
968 -246
131 -99...

output:

0.096039030

result:

ok found '0.09604', expected '0.09604', error '0.00000'

Test #58:

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

input:

995
-949 -308
-581 812
605 -794
-975 -214
211 976
-96 994
618 -785
947 316
-862 505
971 -233
794 -606
-509 -859
-389 919
-999 -7
230 -972
789 -612
345 938
972 -226
459 -887
640 767
302 -952
842 537
-234 -971
264 963
-382 -923
-807 -588
185 981
898 437
996 -74
969 241
-427 903
961 -274
155 986
295 -9...

output:

0.079156821

result:

ok found '0.07916', expected '0.07916', error '0.00000'

Test #59:

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

input:

993
-938 342
-608 -792
587 -808
-976 209
220 -974
-49 -998
592 804
962 -268
-874 483
982 -183
811 583
-528 848
-409 -911
-999 -17
245 969
804 -593
335 941
983 181
457 -888
628 -776
306 951
874 484
-228 972
270 -961
-407 -911
-829 -558
199 979
914 -403
997 -62
979 198
-429 902
975 -219
166 985
291 -9...

output:

0.061330142

result:

ok found '0.06133', expected '0.06133', error '0.00000'

Test #60:

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

input:

996
-945 -323
-589 -807
614 -788
-977 -207
170 -984
-99 -994
625 -779
944 324
-882 -468
970 240
800 -597
-518 -854
-411 910
-999 -10
187 982
796 603
304 951
973 -226
413 -909
646 761
270 -962
844 534
-242 -969
216 -975
-409 -911
-831 553
146 988
887 459
996 -79
967 251
-433 900
957 286
137 990
233 9...

output:

0.066346625

result:

ok found '0.06635', expected '0.06635', error '0.00000'

Test #61:

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

input:

1000
863 504
-862 506
-999 4
-422 -906
-806 -590
-938 -345
999 -36
969 -243
501 865
956 -291
925 -378
850 -525
-480 -876
661 749
885 -465
349 -936
-976 213
999 14
631 -775
833 -552
-367 -929
-566 -823
960 -278
466 -884
-910 -412
999 -20
-967 251
-879 -475
-242 -970
-992 123
897 -440
-993 115
472 881...

output:

0.050847426

result:

ok found '0.05085', expected '0.05085', error '0.00000'

Test #62:

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

input:

999
-942 330
-579 -813
590 -806
-977 -206
169 984
-79 -996
603 796
938 341
-857 512
971 235
796 603
-508 860
-403 -914
-999 -23
188 -981
789 -612
299 953
973 225
445 895
637 -769
255 -966
852 -521
-242 969
218 -975
-397 916
-802 596
140 -989
878 -476
997 -58
968 244
-422 905
957 -285
123 991
248 -96...

output:

0.081952254

result:

ok found '0.08195', expected '0.08195', error '0.00000'

Test #63:

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

input:

992
-946 -321
-658 752
597 -801
-973 223
215 -976
-86 995
605 -794
960 -275
-889 -456
977 -209
816 -575
-553 832
-407 912
-999 2
228 -973
814 -579
321 -946
978 -205
443 -895
635 772
290 -956
878 476
-249 -968
267 962
-401 915
-842 538
196 -979
907 -420
996 -70
974 221
-458 -888
968 247
175 -983
285 ...

output:

0.082581153

result:

ok found '0.08258', expected '0.08258', error '0.00000'

Test #64:

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

input:

984
-942 -330
-564 824
610 791
-975 -217
199 -978
-69 996
622 781
947 317
-864 -501
980 -193
814 -578
-481 876
-378 925
-999 -16
215 -975
810 583
358 932
983 173
486 872
655 -755
316 947
858 -511
-188 -981
282 959
-375 -926
-819 -571
181 -983
892 -450
998 -43
977 -205
-399 -916
968 245
151 -987
311 ...

output:

0.079623975

result:

ok found '0.07962', expected '0.07962', error '0.00000'

Test #65:

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

input:

998
-933 355
-627 777
591 -805
-968 -250
236 -971
-65 -996
601 798
951 303
-872 487
980 191
787 616
-514 856
-414 909
-999 -8
257 -965
782 621
341 -939
981 189
461 -886
631 775
308 -950
841 539
-220 -974
289 -956
-404 -913
-833 -551
211 -976
893 -446
994 100
977 207
-440 -896
970 -237
181 983
296 95...

output:

0.071155921

result:

ok found '0.07116', expected '0.07116', error '0.00000'

Test #66:

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

input:

1000
518 -854
871 -490
-892 -450
-411 -911
-211 977
291 -956
281 959
714 -699
128 -991
982 -188
208 978
757 -652
556 -830
-695 718
970 -241
627 778
844 -535
-207 -978
884 -466
-63 997
48 -998
-841 -540
-635 -771
-449 -893
846 532
981 192
-41 -999
-820 -571
-640 -767
591 -806
-983 -182
858 512
49 -99...

output:

0.044238928

result:

ok found '0.04424', expected '0.04424', error '0.00000'

Test #67:

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

input:

998
-926 -373
-590 -805
648 759
-967 248
246 968
-28 998
659 -751
959 -281
-863 -502
979 -197
828 -559
-522 852
-420 -906
-999 -11
275 960
817 -574
398 916
980 -195
506 861
706 707
347 937
885 463
-202 978
302 -952
-411 910
-821 -570
225 973
916 -397
997 -48
976 212
-445 894
967 -253
198 979
328 943...

output:

0.097322170

result:

ok found '0.09732', expected '0.09732', error '0.00000'

Test #68:

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

input:

992
-941 336
-604 796
622 782
-973 -223
196 -979
-100 994
630 775
947 319
-872 -487
974 -222
798 601
-542 -839
-407 912
-999 6
235 -970
792 608
346 -937
975 -213
439 897
653 756
312 -949
863 -502
-245 968
289 956
-398 -917
-824 -565
173 -984
901 -431
996 79
971 233
-441 -896
962 268
152 -988
302 952...

output:

0.080201565

result:

ok found '0.08020', expected '0.08020', error '0.00000'

Test #69:

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

input:

992
-936 349
-625 -779
548 835
-979 198
149 -987
-127 991
562 -825
952 -301
-877 478
972 231
769 -637
-560 827
-427 903
-999 -10
164 986
767 -639
299 953
974 220
405 913
595 -802
230 -972
824 -563
-246 968
205 977
-416 -908
-829 -558
129 991
892 449
996 -65
971 233
-471 880
962 -269
98 994
225 973
-...

output:

0.082256353

result:

ok found '0.08226', expected '0.08226', error '0.00000'

Test #70:

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

input:

993
-950 307
-577 815
640 767
-980 194
264 -963
-31 -998
654 -755
958 283
-886 -461
978 201
829 -556
-502 863
-400 -914
-999 -16
283 957
823 567
392 919
981 190
496 867
688 -723
332 -942
885 -463
-197 -980
309 950
-390 -919
-845 -532
233 -971
918 -393
996 81
976 -210
-421 906
969 242
212 -976
321 -9...

output:

0.118409692

result:

ok found '0.11841', expected '0.11841', error '0.00000'

Test #71:

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

input:

1000
-176 984
188 -982
730 682
966 -255
262 964
-65 997
-982 -187
925 -379
529 -848
981 193
-674 738
-981 190
-527 849
-54 998
997 -65
970 240
-867 497
257 -966
708 -705
-95 995
-215 976
638 -769
-998 -48
993 -114
475 -879
922 -386
829 557
991 128
829 -558
678 -734
-23 999
-12 -999
999 17
-101 994
-...

output:

0.050410786

result:

ok found '0.05041', expected '0.05041', error '0.00000'

Test #72:

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

input:

997
-941 335
-618 -785
570 820
-974 -219
65 997
-183 -982
582 -811
952 301
-860 -508
974 -219
811 -583
-527 848
-434 -899
-999 -2
86 -995
806 590
234 -971
978 200
369 928
617 785
184 982
866 496
-287 957
135 -990
-431 -901
-812 -581
45 -998
896 -442
995 95
971 233
-460 -887
964 260
22 -998
162 -986
...

output:

0.087756994

result:

ok found '0.08776', expected '0.08776', error '0.00000'

Test #73:

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

input:

995
-922 383
-588 808
613 -789
-964 -258
214 -976
-52 998
629 776
966 254
-842 -535
984 170
839 -542
-479 -876
-395 918
-999 -10
227 973
835 548
356 934
987 -153
482 875
684 729
314 948
882 469
-210 -976
265 -963
-387 -921
-798 600
195 -979
925 -375
997 61
983 -175
-413 -909
979 196
170 -984
291 -95...

output:

0.087595317

result:

ok found '0.08760', expected '0.08760', error '0.00000'

Test #74:

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

input:

994
-940 -339
-570 -820
636 771
-971 -237
245 -968
-86 995
648 760
951 -304
-858 511
975 219
810 583
-485 -873
-403 -914
-999 17
263 -963
806 589
354 -933
977 -207
478 -877
678 732
324 945
869 -492
-243 969
298 953
-403 914
-811 583
218 975
898 436
996 -68
974 -220
-420 -907
965 256
195 -980
312 949...

output:

0.079090254

result:

ok found '0.07909', expected '0.07909', error '0.00000'

Test #75:

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

input:

997
-942 -330
-660 749
540 840
-982 -183
151 -987
-155 -987
554 831
937 346
-879 -474
968 249
760 648
-585 809
-498 -865
-999 -20
177 -983
759 -650
291 -955
971 232
399 916
592 -804
234 970
815 -576
-288 -956
206 -978
-493 -869
-833 550
122 991
870 -489
994 101
967 251
-518 -854
955 -293
103 993
226...

output:

0.114779848

result:

ok found '0.11478', expected '0.11478', error '0.00000'

Test #76:

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

input:

1000
-929 -707
-996 -36
-478 963
-822 914
-969 386
-909 -858
-884 -914
-580 953
-926 779
958 526
996 11
-999 -4
904 -905
-936 728
-961 470
984 278
631 -940
944 635
275 983
460 -967
320 981
-221 -985
599 -947
-936 -677
79 -995
988 117
960 -489
860 911
923 796
992 217
82 996
-714 -934
-162 -987
-959 -...

output:

12.033472731

result:

ok found '12.03347', expected '12.03347', error '0.00000'

Test #77:

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

input:

1000
-1016 54
-688 916
630 -1043
-1069 -178
190 -1075
-106 -1002
635 -1023
1005 -108
-910 406
1047 633
811 -649
-611 1075
-497 1126
-1138 -557
217 971
806 -672
359 925
1049 82
491 879
658 -974
324 938
884 -472
-312 1094
259 958
-483 1119
-866 519
169 982
931 -355
1115 453
1044 87
-533 -864
1032 634
...

output:

10.996804117

result:

ok found '10.99680', expected '10.99680', error '0.00000'

Test #78:

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

input:

996
-1068 -384
-625 -776
633 -796
-1152 -314
209 1043
-106 1213
645 762
1072 -150
-947 -506
1133 -52
869 569
-520 -851
-418 1039
-1256 -174
252 -1208
860 -498
319 975
1138 327
472 -986
674 -752
291 -1163
919 -419
-254 1214
277 -1183
-413 -923
-887 -561
193 -1261
961 484
1228 140
1130 -47
-443 1009
1...

output:

12.229810726

result:

ok found '12.22981', expected '12.22981', error '0.00000'

Test #79:

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

input:

997
-1039 418
-581 -862
545 902
-1141 -33
198 -1055
-45 1132
558 886
1070 -386
-920 528
1145 21
841 527
-483 871
-370 -1083
-1263 200
216 1242
839 534
292 -994
1147 -313
388 1066
594 852
265 1196
904 -542
-199 1051
234 1232
-368 953
-847 591
170 1245
980 311
1214 -254
1134 -321
-394 -1060
1113 -338
...

output:

11.250810240

result:

ok found '11.25081', expected '11.25081', error '0.00000'

Test #80:

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

input:

1000
-1023 -28
-655 815
635 -823
-1069 160
188 -985
-118 1000
642 -820
1042 -30
-954 -274
1075 -217
873 511
-585 -1123
-482 -1122
-1142 570
212 -976
862 530
324 1091
1078 -255
476 1127
686 919
270 1080
925 364
-291 -1091
248 -963
-475 882
-893 698
160 -991
974 215
1117 -423
1070 -188
-507 872
1058 -...

output:

12.443437289

result:

ok found '12.44344', expected '12.44344', error '0.00000'

Test #81:

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

input:

1000
926 -797
-987 259
-621 942
-988 245
-918 865
-979 295
670 -936
981 339
636 941
-993 -169
-3 -995
-448 969
164 992
676 -933
986 220
997 -1
946 628
918 -837
988 -273
331 -984
0 -995
-732 -931
975 -363
-981 322
-906 -868
-954 539
953 -600
-994 11
89 989
-617 943
-915 -807
142 993
639 943
-526 962
...

output:

14.544770924

result:

ok found '14.54477', expected '14.54477', error '0.00000'

Test #82:

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

input:

1000
-1017 52
-662 969
691 -927
-1067 -612
260 960
-121 1055
701 -903
1026 633
-930 345
1054 112
883 -477
-598 1107
-479 -880
-1139 -556
275 -1086
877 -511
399 -1106
1061 147
543 -1139
752 -789
355 927
931 680
-285 1086
315 946
-478 1129
-888 471
203 -1077
973 -233
1117 479
1050 620
-507 -876
1044 6...

output:

14.316697985

result:

ok found '14.31670', expected '14.31670', error '0.00000'

Test #83:

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

input:

998
-1044 202
-644 -759
563 815
-1133 35
118 1099
-167 -1069
575 807
1079 -137
-924 -518
1134 -47
833 -546
-549 -834
-471 985
-1254 -187
136 -1234
819 610
265 -1190
1146 -25
359 -1096
606 789
197 1050
905 540
-297 1162
164 -1249
-469 -884
-853 507
87 1115
958 494
1218 250
1132 -46
-486 966
1105 357
...

output:

14.647750166

result:

ok found '14.64775', expected '14.64775', error '0.00000'

Test #84:

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

input:

996
-1030 -242
-564 824
573 874
-1135 319
184 1256
-133 -1226
581 -805
1069 -390
-894 547
1143 23
819 563
-473 -974
-398 930
-1266 205
209 1251
815 573
307 -989
1146 30
420 1029
615 -781
272 -1002
923 406
-256 1011
245 1221
-396 -1064
-815 -577
158 -1070
982 316
1212 -110
1138 40
-409 929
1108 -357
...

output:

15.523723588

result:

ok found '15.52372', expected '15.52372', error '0.00000'

Test #85:

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

input:

1000
-1015 -48
-670 -945
697 907
-1068 615
299 -946
-71 1013
713 859
1020 57
-940 -331
1054 -129
904 413
-601 832
-464 -1117
-1140 567
330 1102
899 439
453 1121
1057 -101
591 1114
750 -767
412 1115
945 293
-280 958
371 1101
-460 888
-874 715
271 -956
978 201
1111 -408
1052 -79
-492 879
1037 -50
251 ...

output:

14.903646000

result:

ok found '14.90365', expected '14.90365', error '0.00000'

Test #86:

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

input:

1000
-966 470
-942 -605
492 -957
246 985
-575 951
38 992
793 -922
-911 887
836 919
176 -986
-191 985
991 65
169 988
-974 417
165 -991
989 149
-950 -581
-922 -772
482 -958
956 -521
492 -961
909 860
967 -475
276 983
-989 -77
985 190
162 -992
547 -958
-709 934
463 -965
377 -977
-646 -945
155 -989
-715 ...

output:

5.554667471

result:

ok found '5.55467', expected '5.55467', error '0.00000'

Test #87:

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

input:

999
-1026 32
-637 1021
684 799
-1072 -174
277 -1087
-2 1035
693 -901
1046 633
-919 372
1066 170
889 -469
-553 1136
-391 -915
-1142 -573
301 -1088
883 712
442 -1114
1067 206
564 849
713 785
396 919
946 -321
-185 1065
356 932
-381 -919
-850 -726
253 961
989 654
1113 450
1065 143
-443 1116
1059 135
232...

output:

5.399646016

result:

ok found '5.39965', expected '5.39965', error '0.00000'

Test #88:

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

input:

998
-1067 166
-609 -788
478 878
-1136 -325
159 1075
-123 -1096
520 851
1042 412
-954 360
1115 344
781 651
-536 907
-444 1009
-1260 -203
175 1059
776 -627
269 -1195
1123 -68
348 963
570 -873
233 1027
887 -460
-232 1239
212 -1257
-437 -901
-905 440
135 1085
944 -373
1209 252
1111 352
-455 -891
1093 36...

output:

5.499429167

result:

ok found '5.49943', expected '5.49943', error '0.00000'

Test #89:

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

input:

998
-1080 -146
-654 -775
566 872
-1150 -11
152 -1073
-100 1106
576 -805
1043 -407
-954 -351
1102 -349
827 558
-576 815
-425 -1025
-1266 192
176 -1061
824 -610
287 1167
1109 -343
427 1028
634 795
250 1208
904 -539
-269 -1192
213 1259
-420 917
-911 -419
139 1230
969 -489
1214 -113
1097 110
-465 891
10...

output:

4.929696474

result:

ok found '4.92970', expected '4.92970', error '0.00000'

Test #90:

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

input:

999
-993 -142
-621 -1058
687 922
-1059 112
322 1091
-15 -1030
695 915
1035 -36
-882 704
1070 -173
853 558
-551 855
-378 926
-1140 575
344 1098
846 -723
449 -897
1079 -263
555 1138
723 -786
416 1110
918 377
-174 988
379 1105
-371 -1102
-833 -615
293 -954
959 270
1114 -422
1068 -157
-446 895
1057 -144...

output:

5.206670209

result:

ok found '5.20667', expected '5.20667', error '0.00000'

Test #91:

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

input:

1000
47 -992
-607 949
-955 501
496 965
943 649
908 885
-994 -115
937 704
-928 -726
-301 -985
803 -922
909 -892
933 746
991 -26
-954 567
756 927
969 437
-979 341
411 -967
164 989
-932 -687
-994 -55
107 -997
997 47
-809 916
-165 -993
905 -900
17 992
-941 659
-819 922
-929 780
89 -991
453 961
979 -300
...

output:

5.719972808

result:

ok found '5.71997', expected '5.71997', error '0.00000'

Test #92:

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

input:

1000
-1024 13
-640 -815
669 -950
-1072 -621
283 -1086
-34 -1017
691 798
1019 -63
-919 -686
1056 127
872 -505
-584 1142
-414 1107
-1140 -571
307 947
865 -525
404 -1105
1057 111
520 868
724 -838
369 928
916 -378
-207 1070
335 -1101
-407 1115
-857 546
263 962
961 666
1108 594
1053 94
-445 1113
1043 74
...

output:

5.499408677

result:

ok found '5.49941', expected '5.49941', error '0.00000'

Test #93:

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

input:

999
-1085 140
-661 -745
542 831
-1161 -10
107 -1217
-178 1249
572 817
1062 399
-976 325
1129 -46
816 -560
-576 871
-464 986
-1264 -191
128 -1228
805 -585
273 -1183
1131 -49
362 955
599 -842
230 1026
887 -469
-288 1179
188 -1254
-452 1001
-918 -524
73 -1198
959 -348
1215 246
1124 -72
-478 -879
1107 3...

output:

5.803043765

result:

ok found '5.80304', expected '5.80304', error '0.00000'

Test #94:

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

input:

1000
-1033 -215
-580 -860
540 -829
-1122 337
199 1267
-100 -1214
561 -820
1053 181
-898 -454
1133 -322
800 584
-504 859
-396 -1054
-1261 196
213 1260
796 -640
302 1160
1139 37
386 1069
586 -806
260 1210
864 -583
-214 -1249
232 1230
-393 -1059
-826 612
181 1255
936 -513
1214 -96
1128 57
-410 -1042
11...

output:

5.962617296

result:

ok found '5.96262', expected '5.96262', error '0.00000'

Test #95:

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

input:

999
-1013 -72
-639 818
740 -769
-1074 616
324 1098
-45 -1044
749 -763
1030 -2
-908 -422
1071 -207
897 -697
-581 -1145
-448 892
-1140 577
355 -931
894 441
463 -889
1075 -616
605 1100
783 726
422 1113
949 291
-227 970
395 -915
-446 893
-857 -546
303 -950
979 204
1120 -597
1069 -184
-478 884
1062 -134
...

output:

5.486867398

result:

ok found '5.48687', expected '5.48687', error '0.00000'

Test #96:

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

input:

1000
652 -940
959 469
888 909
974 329
581 948
-32 997
-931 756
-994 -81
-35 -992
-989 78
990 32
998 13
-293 -985
563 -951
346 -977
-932 -745
495 -959
-950 -602
-916 -811
6 994
785 925
737 -929
936 -703
542 955
41 998
735 -925
145 -991
-982 308
817 923
610 951
-508 958
-927 753
-481 962
-743 932
-982...

output:

12.465226189

result:

ok found '12.46523', expected '12.46523', error '0.00000'

Test #97:

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

input:

999
-1023 36
-655 -817
668 -976
-1065 -150
281 -1082
-90 -1008
680 -929
1038 18
-943 312
1068 168
872 717
-574 -851
-417 1114
-1139 -545
302 -1097
857 724
420 -1116
1069 204
526 870
715 -874
376 -1109
944 -297
-237 1084
345 -1096
-414 1114
-907 424
255 961
980 661
1108 362
1065 184
-459 1114
1052 12...

output:

11.822396763

result:

ok found '11.82240', expected '11.82240', error '0.00000'

Test #98:

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

input:

998
-1062 -388
-592 848
551 833
-1145 -314
182 -1253
-93 1203
560 825
1052 410
-958 348
1125 335
796 642
-523 -849
-387 1064
-1264 -186
198 1052
788 642
280 997
1128 333
368 951
606 786
251 1022
887 -464
-232 -1031
226 -1234
-382 1074
-896 -555
150 -1242
959 492
1205 79
1112 354
-428 -917
1085 -130
...

output:

12.403423772

result:

ok found '12.40342', expected '12.40342', error '0.00000'

Test #99:

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

input:

997
-1050 407
-604 785
559 878
-1127 -55
195 -1046
-112 -1220
573 870
1051 -410
-932 -397
1116 69
825 -609
-524 -917
-404 -1047
-1263 209
214 1254
814 579
316 1150
1130 -323
409 1041
613 -780
270 -1010
897 -551
-260 -1198
245 1220
-402 -1062
-885 -460
169 1253
950 -506
1199 -258
1108 -345
-445 -1016...

output:

12.479204661

result:

ok found '12.47920', expected '12.47920', error '0.00000'

Test #100:

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

input:

1000
-983 -190
-685 804
701 890
-1048 626
285 -955
-89 1009
711 873
1043 -44
-904 -431
1072 -618
874 -710
-620 -1068
-503 878
-1139 589
303 -943
872 520
437 -896
1077 -216
571 1143
728 827
388 1106
926 350
-256 -1078
343 1094
-483 -1127
-856 -554
246 1084
963 261
1114 -454
1071 -215
-537 -1138
1060 ...

output:

12.244511631

result:

ok found '12.24451', expected '12.24451', error '0.00000'

Test #101:

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

input:

1999
761 -289941
757 286903
27 -378
993 -493521
527 -139128
894 -400065
511 -130816
307 47278
838 351541
282 39903
608 -185136
921 -424581
933 -435711
102 5253
641 -205761
699 -244650
85 -3655
702 246753
817 334153
494 122265
818 -334971
755 285390
992 492528
510 -130305
442 -97903
201 -20301
79 316...

output:

3996.000002006

result:

ok found '3996.00000', expected '3996.00000', error '0.00000'

Test #102:

score: 0
Accepted
time: 4ms
memory: 4440kb

input:

1999
2591 -765
-14426 4870
-339679 111257
-406148 132937
106760 -34191
-29288 9777
-4867 1687
27350 -8635
-1197 441
275261 -88638
-50281 16679
-342095 112045
-99824 32916
-58310 19314
84212 -26920
-311358 102017
-432944 141675
411129 -132607
-404 162
27808 -8782
-325 133
-162835 53523
-299167 98039
...

output:

3995.343443022

result:

ok found '3995.34344', expected '3995.34344', error '0.00000'

Test #103:

score: 0
Accepted
time: 4ms
memory: 4436kb

input:

1999
1646 2142
-8808 -12419
-209411 -289667
-250442 -346276
66273 90413
-17947 -25124
-2945 -4226
17051 23062
-708 -1060
170590 233504
-30874 -43048
-210902 -291725
-61412 -85305
-35821 -49899
52305 71278
-191930 -265545
-266984 -369096
254665 348937
-232 -368
17335 23450
-185 -299
-100276 -139013
-...

output:

3994.864289884

result:

ok found '3994.86429', expected '3994.86429', error '0.00000'

Test #104:

score: 0
Accepted
time: 4ms
memory: 4444kb

input:

1999
2591 765
-14426 -4870
-339679 -111257
-406148 -132937
106760 34191
-29288 -9777
-4867 -1687
27350 8635
-1197 -441
275261 88638
-50281 -16679
-342095 -112045
-99824 -32916
-58310 -19314
84212 26920
-311358 -102017
-432944 -141675
411129 132607
-404 -162
27808 8782
-325 -133
-162835 -53523
-29916...

output:

3995.343443022

result:

ok found '3995.34344', expected '3995.34344', error '0.00000'

Test #105:

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

input:

1999
1528 -2228
-9089 12215
-210778 288674
-251937 345190
65508 -90969
-18349 24833
-3109 4107
16664 -23343
-789 1002
169360 -234398
-31400 42666
-212274 290728
-62153 84767
-36387 49488
51626 -71772
-193239 264594
-268528 367974
253162 -350029
-279 334
16945 -23733
-227 268
-101222 138325
-185688 2...

output:

3994.864289884

result:

ok found '3994.86429', expected '3994.86429', error '0.00000'

Test #106:

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

input:

5
0 100000
100 100000
50 0
200 0
200 20

output:

199928.735050485

result:

ok found '199928.73505', expected '199928.73505', error '0.00000'

Test #107:

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

input:

5
0 -100000
100 -100000
50 0
200 0
200 10

output:

199950.062499987

result:

ok found '199950.06250', expected '199950.06250', error '0.00000'

Test #108:

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

input:

5
0 10
100 100000
50 0
200 0
200 100000

output:

199889.800161043

result:

ok found '199889.80016', expected '199889.80016', error '0.00000'

Test #109:

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

input:

5
0 -10
100 -100000
50 0
101 0
200 -100000

output:

199988.605167798

result:

ok found '199988.60517', expected '199988.60517', error '0.00000'

Test #110:

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

input:

5
-100000 0
-99999 0
99999 5
99999 -5
100000 3

output:

399988.000125001

result:

ok found '399988.00013', expected '399988.00013', error '0.00000'

Test #111:

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

input:

5
100000 0
99999 0
-99999 3
-99999 -3
-100000 1

output:

399992.000045000

result:

ok found '399992.00004', expected '399992.00005', error '0.00000'

Test #112:

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

input:

11
-53 62
-19 58
-11 11
7 10
-9 -22
45 -7
37 -39
47 -58
-2 41
-37 10
13 42

output:

72.963169283

result:

ok found '72.96317', expected '72.96317', error '0.00000'

Test #113:

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

input:

11
-53 62
-19 58
-11 11
7 10
-9 -22
45 -7
43 -47
47 -58
-2 41
-37 10
13 42

output:

62.629479924

result:

ok found '62.62948', expected '62.62948', error '0.00000'

Test #114:

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

input:

11
-53 62
-35 47
-11 11
7 10
-9 -22
45 -7
43 -47
47 -58
-2 41
-37 10
13 42

output:

61.581665345

result:

ok found '61.58167', expected '61.58167', error '0.00000'