QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#8483#784. 旋转卡壳Qingyu97 235ms34648kbC++205.6kb2021-03-26 15:01:422021-12-19 10:13:01

Judging History

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

  • [2024-10-16 12:18:36]
  • hack成功,自动添加数据
  • (/hack/1005)
  • [2024-09-24 16:55:39]
  • hack成功,自动添加数据
  • (/hack/888)
  • [2024-07-31 21:52:32]
  • hack成功,自动添加数据
  • (/hack/764)
  • [2024-07-31 21:47:53]
  • hack成功,自动添加数据
  • (/hack/763)
  • [2024-05-30 09:00:15]
  • hack成功,自动添加数据
  • (/hack/642)
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2021-12-19 10:13:01]
  • 评测
  • 测评结果:97
  • 用时:235ms
  • 内存:34648kb
  • [2021-03-26 15:01:42]
  • 提交

answer

#include <bits/stdc++.h>

typedef long double T;
const T eps = 1e-10;

using std::cin;
using std::cout;
using std::endl;

struct pt
{
	T x, y;
	pt (T x = 0.0, T y = 0.0) : x(x), y(y) { }
	pt operator+(const pt &z) const { return pt(x + z.x, y + z.y); }
	pt operator-(const pt &z) const { return pt(x - z.x, y - z.y); }
	pt operator*(const T k) const { return pt(x * k, y * k); }
	pt operator/(const T k) const { return pt(x / k, y / k); }
	bool operator==(const pt &z) const
	{
		return x == z.x && y == z.y;
	}
	bool operator!=(const pt &z) const
	{
		return x != z.x || y != z.y;
	}
};
pt operator*(const T k, const pt &z) { return pt(z.x * k, z.y * k); }
pt operator/(const T k, const pt &z) { return pt(z.x / k, z.y / k); }

std::istream& operator>>(std::istream &inf, pt &p)
{
	return inf >> p.x >> p.y;
}

std::ostream& operator<<(std::ostream &ouf, const pt &p)
{
	return ouf << p.x << " " << p.y;
}

inline T dot(const pt &a, const pt &b) 
{
	return a.x * b.x + a.y * b.y;
}
inline T cross(const pt &a, const pt &b)
{
	return a.x * b.y - a.y * b.x;
}
inline T sq(const pt &a)
{
	return a.x * a.x + a.y * a.y;
}
inline T abs(const pt &a)
{
	return sqrtl(sq(a));
}
inline pt perp(const pt &p)
{
	return pt(-p.y, p.x);
}
inline int dcmp(const T x)
{
	if (x > eps) return 1;
	if (x < -eps) return -1;
	return 0;
}

struct ln
{
	pt v; T c;
	ln(pt v, T c) : v(v), c(c) { } // direction vector + offset
	ln(T a, T b, T c) : v({b, -a}), c(c) { } // ax + by = c
	ln(pt p, pt q) : v(q - p), c(cross(v, p)) { } // p, q
	T side(const pt &p) const
	{
		return cross(v, p) - c;
	}
	T dist(const pt &p) const
	{
		return abs(side(p)) / abs(v);
	}
	ln perpThough(const pt &p) const
	{
		return ln(p, p + perp(v));
	}
	pt proj(const pt &p) const
	{
		T k = -side(p) / sq(v);
		return p + k * perp(v);
	}
	pt refl(const pt &p) const
	{
		T k = -2 * side(p) / sq(v);
		return p + k * perp(v);
	}
	bool cmpProj(const pt &p, const pt &q) const
	{
		return dot(v, p) < dot(v, q);
	}
};
inline bool inter(const ln &l1, const ln &l2, pt &out)
{
	T d = cross(l1.v, l2.v);
	if (dcmp(d) == 0) return false;
	out = (l1.c * l2.v - l1.v * l2.c) / d;
	return true;
}

// a, b, c clockwise <=> < 0
// a, b, c counter-clockwise <=> > 0
inline T orient(const pt &a, const pt &b, const pt &c)
{
	return cross(b - a, c - a);
}

inline bool inDisk(const pt &a, const pt &b, const pt &p)
{
	return dot(a - p, b - p) <= 0;
}

inline bool onSegment(const pt &a, const pt &b, const pt &p)
{
	return dcmp(orient(a, b, p)) == 0 && inDisk(a, b, p);
}

inline bool properInter(const pt &a, const pt &b, const pt &c, const pt &d, pt &out)
{
	T oa = orient(c, d, a), ob = orient(c, d, b), oc = orient(a, b, c), od = orient(a, b, d);
	if (oa * ob < 0 && oc * od < 0)
	{
		out = (a * ob - b * oa) / (ob - oa);
		return true;
	}
	return false;
}

inline T segPoint(const pt &a, const pt &b, const pt &p)
{
	if (a != b)
	{
		ln l(a, b);
		if (l.cmpProj(a, p) && l.cmpProj(p, b))
			return l.dist(p);
	}
	return std::min(abs(p - a), abs(p - b));
}

inline T segSeg(const pt &a, const pt &b, const pt &c, const pt &d)
{
	pt dummy;
	if (properInter(a, b, c, d, dummy)) return 0;
	return std::min({ segPoint(a, b, c), segPoint(a, b, d), segPoint(c, d, a), segPoint(c, d, b) });
}

inline T areaPolygon(std::vector<pt> p)
{
	T area = 0.0;
	for (int i = 0, n = p.size(); i < n; ++i)
	{
		area += cross(p[i], p[(i + 1) % n]);
	}
	return abs(area) / 2.0;
}

inline bool above(const pt &a, const pt &b)
{
	return a.y >= b.y;
}

inline bool crossesRay(const pt &a, const pt &p, const pt &q)
{
	return (above(a, q) - above(a, p)) * orient(a, p, q) > 0;
}

inline bool inPolygon(std::vector<pt> p, const pt &a, bool strict = true)
{
	int c = 0;
	for (int i = 0, n = p.size(); i < n; ++i)
	{
		if (onSegment(p[i], p[(i + 1) % n], a))
			return !strict;
		c ^= crossesRay(a, p[i], p[(i + 1) % n]);
	}
	return c & 1;
}

inline std::vector<pt> convexHull(std::vector<pt> p)
{
	if (p.size() <= 2) return p;
	std::sort(p.begin(), p.end(), [&](const pt &x, const pt &y) { return x.x == y.x ? x.y < y.y : x.x < y.x; });
	std::vector<int> st, vis(p.size());
	st.push_back(0);	
	for (int i = 1; i < p.size(); ++i)
	{
		
		while (st.size() > 1 && orient(p[st[st.size() - 2]], p[st[st.size() - 1]], p[i]) < 0) vis[st.back()] = false, st.pop_back();
		st.push_back(i); vis[i] = true;
	}
	int cur = st.size();
	for (int i = p.size() - 2; i >= 0; --i)
	{
		if (!vis[i])
		{
			while (st.size() > cur && orient(p[st[st.size() - 2]], p[st[st.size() - 1]], p[i]) < 0) vis[st.back()] = false, st.pop_back();
			st.push_back(i); vis[i] = true;
		}
	}
	std::vector<pt> res;
	for (int i = 0; i < st.size() - 1; ++i) res.push_back(p[st[i]]);
	return res;
}

inline T convexDiameter(std::vector<pt> p)
{
	if (p.size() <= 1) return 0;
	int i0 = 0, j0 = 0, n = p.size();
	auto cmp = [&](const pt &a, const pt &b) 
	{
		return a.x == b.x ? a.y < b.y : a.x < b.x;
	};
	for (int i = 1; i < n; ++i)
	{
		if (cmp(p[i0], p[i])) i0 = i;
		if (cmp(p[i], p[j0])) j0 = i;
	}
	int i = i0, j = j0; T d = 0.0;
	do
	{
		d = std::max(d, abs(p[i] - p[j]));
		if (cross(p[(i + 1) % n] - p[i], p[(j + 1) % n] - p[j]) < 0) i = (i + 1) % n;
		else j = (j + 1) % n;
	} while (i != i0 || j != j0);
	return d;
}

int main()
{
	std::ios::sync_with_stdio(false);
	cin.tie(nullptr); cout.tie(nullptr);
	cout << std::fixed << std::setprecision(15);

	int n;
	cin >> n;
	assert(n>=300);
	std::vector<pt> v(n);
	for (int i = 0; i < n; ++i) cin >> v[i];
	cout << convexDiameter(v);
	return 0;
}


详细

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 1ms
memory: 3736kb

input:

1000
0 0
-997615 -8573
-1988394 -28911
-2726572 -44296
-3491635 -60392
-4419752 -82814
-5298550 -105946
-5723430 -118453
-6608257 -147267
-7034966 -161982
-7563964 -181682
-8507871 -222865
-9499799 -271846
-10090186 -303547
-10400262 -322989
-10614073 -339725
-11081438 -378596
-11791568 -439127
-12730957 -523086
-13207813 -575504
-14076311 -672686
-14878437 -763724
-14975991 -774969
-15803194 -874856
-16535376 -965898
-17322204 -1066358
-18040311 -1160873
-18964617 -1289900
-19670493 -1391044
-2...

output:

274339223.189561390143353

result:

ok found '274339223.1895614', expected '274339223.1895614', error '0.0000000'

Test #2:

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

input:

1000
0 0
-887614 -1937
-1459359 -3808
-2421409 -24096
-3273181 -48456
-3917594 -76664
-4402753 -100164
-5375022 -150897
-5993935 -192089
-6587159 -238825
-7549680 -333298
-8330993 -416479
-9244392 -515027
-10010900 -598589
-10374584 -640275
-10767641 -686907
-11173081 -741316
-11821952 -833327
-12609728 -950517
-13178968 -1038934
-14004722 -1175506
-14916550 -1326792
-15323699 -1395523
-15890652 -1501316
-16796068 -1671097
-17794723 -1859185
-18027169 -1903493
-18755489 -2051649
-19647284 -22408...

output:

262687047.927490633257548

result:

ok found '262687047.9274906', expected '262687047.9274906', error '0.0000000'

Test #3:

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

input:

1000
0 0
-631055 -2758
-1328409 -7463
-2248672 -20536
-2412978 -23564
-2659543 -28441
-3383179 -43406
-4183375 -64326
-4856658 -88337
-5799682 -134822
-6757348 -189404
-7132846 -212164
-7563226 -242116
-8368716 -300012
-9321463 -381770
-9831821 -432746
-10409503 -491057
-11360852 -607259
-11874199 -671196
-12796972 -790845
-13522238 -889999
-14037147 -962067
-14340118 -1006839
-14992788 -1107575
-15842674 -1240739
-16732949 -1381065
-17441851 -1494392
-17554737 -1513190
-18320876 -1642940
-19317...

output:

257868038.643589688668726

result:

ok found '257868038.6435897', expected '257868038.6435897', error '0.0000000'

Test #4:

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

input:

1000
0 0
-48652 -588
-951356 -20091
-1517426 -33325
-1965414 -51971
-2466111 -74904
-3046762 -103888
-3555833 -132002
-3976901 -156059
-4972848 -245498
-5921476 -332492
-6353035 -375491
-7327511 -496188
-7939064 -575429
-8842272 -694656
-9246222 -756797
-9771758 -860630
-10633761 -1031205
-10981774 -1100951
-11835723 -1272415
-12713586 -1465087
-13621531 -1675254
-13866732 -1735342
-14426175 -1882111
-14924843 -2015215
-15868106 -2270518
-16792801 -2533056
-17211057 -2652746
-18096669 -2907834
-...

output:

259539672.480453386655427

result:

ok found '259539672.4804534', expected '259539672.4804534', error '0.0000000'

Test #5:

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

input:

1000
0 0
-456569 -2668
-1141521 -7887
-1270801 -8967
-1971135 -21206
-2919889 -38188
-3903859 -71231
-4752603 -107450
-5508682 -143873
-6214620 -183392
-6718977 -212193
-7452291 -271600
-8408796 -354998
-9261882 -432674
-9528618 -457608
-10099091 -513153
-10320120 -535958
-11067358 -614356
-12050731 -718562
-12918003 -814203
-13596242 -904137
-14565933 -1041967
-15271592 -1147348
-16053529 -1279876
-16276840 -1318265
-17067855 -1463784
-17301355 -1509151
-18213016 -1687420
-18510012 -1746094
-18...

output:

250217366.482621851202566

result:

ok found '250217366.4826218', expected '250217366.4826218', error '0.0000000'

Test #6:

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

input:

1000
0 0
-794019 -17307
-1389128 -41522
-1928884 -68000
-2530256 -103641
-3335109 -158872
-4273633 -225636
-4655012 -253747
-5584931 -329387
-6190262 -382029
-6657521 -422826
-7445510 -497270
-8092482 -562235
-8879759 -646264
-9688106 -745847
-10545954 -857573
-11350736 -962711
-12106702 -1066386
-12924446 -1181275
-13585773 -1278785
-13987637 -1339820
-14969988 -1498305
-15965938 -1662015
-16620081 -1787188
-17506080 -1957135
-17799074 -2018177
-18694681 -2215374
-19424896 -2387492
-19979728 -2...

output:

256130723.005368008904043

result:

ok found '256130723.0053680', expected '256130723.0053680', error '0.0000000'

Test #7:

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

input:

1000
0 0
-785524 -1241
-1228373 -2123
-1584480 -5108
-2516949 -19826
-3109735 -51256
-3799285 -95138
-4215892 -125263
-5144743 -202941
-6071171 -287679
-6844072 -376760
-7786583 -487933
-8491316 -575443
-9458832 -700691
-9848966 -756816
-10135682 -798578
-11100151 -940696
-11527785 -1004652
-12219607 -1116080
-12715104 -1196952
-13179735 -1273020
-13578725 -1339329
-14207219 -1444688
-14681105 -1524307
-15446040 -1658482
-16354311 -1826466
-16527770 -1859703
-16779854 -1909090
-17422364 -2036704...

output:

268992022.057069239031989

result:

ok found '268992022.0570692', expected '268992022.0570692', error '0.0000000'

Test #8:

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

input:

1000
0 0
-787651 -697
-1319793 -8691
-1545057 -12462
-2239671 -24650
-2487763 -36810
-2983386 -61694
-3408212 -85910
-3650815 -105325
-4268088 -155258
-5088483 -225550
-5720403 -280762
-6036913 -309102
-6663280 -365291
-7656626 -456948
-8462737 -538137
-9318271 -628471
-9704990 -671367
-10363047 -749523
-11069465 -846101
-11718209 -949770
-12679789 -1110764
-12963232 -1163120
-13344843 -1239156
-13734819 -1317300
-14333446 -1442793
-14888969 -1561540
-15085244 -1608190
-15331194 -1666694
-154871...

output:

251395356.722987328132149

result:

ok found '251395356.7229873', expected '251395356.7229873', error '0.0000000'

Test #9:

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

input:

1000
0 0
-895815 -18037
-1536713 -40507
-2439825 -73040
-2896761 -94230
-3815334 -138606
-4520738 -176711
-4997585 -208924
-5399492 -237632
-5629592 -254751
-6518310 -320902
-7084766 -367663
-7724052 -423029
-8475256 -492590
-9071702 -551527
-9798581 -626155
-10535448 -702512
-11155572 -768931
-12087965 -889948
-12871072 -995709
-13175464 -1041228
-13661667 -1120899
-14036445 -1183971
-15015075 -1363542
-15605353 -1472837
-16208577 -1591695
-17136387 -1777967
-18029384 -1979814
-18952235 -218868...

output:

259639018.616695747594349

result:

ok found '259639018.6166958', expected '259639018.6166958', error '0.0000000'

Test #10:

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

input:

1000
0 0
-837332 -2192
-1593910 -10845
-2320576 -25425
-3294539 -45660
-4178010 -82673
-4936159 -128518
-5796274 -190640
-6313517 -228540
-7131129 -291797
-7751205 -354513
-8357330 -419926
-9355375 -542247
-9783911 -596434
-10313681 -667126
-10377189 -675659
-10824619 -750345
-11653618 -894218
-12345453 -1015261
-12835249 -1109510
-13529565 -1243583
-13725581 -1283656
-14249664 -1391278
-14853976 -1516352
-15753153 -1703992
-15975894 -1753195
-16558837 -1882296
-17426219 -2086476
-17709418 -2153...

output:

267554454.176245135444333

result:

ok found '267554454.1762451', expected '267554454.1762451', error '0.0000000'

Test #11:

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

input:

1000
0 0
-758133 -3909
-1146524 -7212
-1823781 -16200
-2561994 -26923
-3448934 -43815
-4337557 -80953
-4912706 -106752
-5770093 -182352
-6645519 -261073
-7156648 -309532
-7882740 -380211
-8731241 -470527
-9265139 -532092
-10083113 -633235
-10767248 -721935
-11729364 -862416
-12112647 -921658
-12831083 -1034523
-13255452 -1104920
-13951611 -1221392
-14520888 -1323011
-15357789 -1473018
-15973264 -1588680
-16637669 -1720079
-16936044 -1779529
-17528190 -1898853
-18243328 -2047916
-19211003 -225539...

output:

259903024.733591026742943

result:

ok found '259903024.7335910', expected '259903024.7335910', error '0.0000000'

Test #12:

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

input:

1000
0 0
-220082 -1509
-1148190 -9207
-2108923 -22196
-2713299 -30623
-3364648 -43866
-3891571 -54675
-4300261 -63335
-4622311 -72814
-5235380 -91992
-5680720 -106355
-6138401 -121807
-7013302 -160828
-7784753 -195568
-8750494 -245022
-9681201 -295430
-10320328 -334255
-11256371 -407963
-12199734 -486025
-13142926 -564369
-13803667 -631793
-14650748 -759966
-15516452 -892005
-16510022 -1054914
-17043782 -1145159
-17653543 -1272279
-18488523 -1446926
-18984281 -1554145
-19709995 -1712289
-2012897...

output:

261658565.582694961005473

result:

ok found '261658565.5826949', expected '261658565.5826949', error '0.0000000'

Test #13:

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

input:

1000
0 0
-425515 -4558
-1293469 -14675
-1990220 -30271
-2703160 -49015
-3455818 -76450
-4210140 -107243
-4530367 -120805
-5136478 -158180
-5732363 -196472
-6247394 -230823
-7100635 -290064
-7703961 -335663
-8091361 -368200
-8752153 -427341
-9433796 -491521
-10139006 -563945
-10984402 -653149
-11338657 -692087
-12291405 -809701
-13258057 -930888
-14108924 -1046735
-14893853 -1157928
-15510430 -1245510
-16499347 -1388346
-17481677 -1552150
-18245533 -1688843
-19171613 -1858133
-19527567 -1926011
-...

output:

256353710.973016331714462

result:

ok found '256353710.9730163', expected '256353710.9730163', error '0.0000000'

Test #14:

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

input:

1000
0 0
-572806 -2255
-1477072 -15611
-1643871 -18681
-2578790 -51107
-3303402 -86192
-4032032 -123256
-4540711 -150307
-5462171 -206756
-6377222 -264514
-6921545 -316752
-7623842 -390821
-8329739 -466169
-9034451 -568935
-9600887 -653814
-9729771 -674650
-10461476 -795876
-11348904 -952387
-11712289 -1019358
-12660540 -1195099
-13534274 -1376380
-14316363 -1541510
-14981566 -1686718
-15605660 -1829148
-16498701 -2033571
-16791820 -2110205
-17625796 -2328353
-18432272 -2541644
-18921601 -268915...

output:

255498134.515780723348144

result:

ok found '255498134.5157807', expected '255498134.5157807', error '0.0000000'

Test #15:

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

input:

1000
0 0
-723350 -3997
-1405147 -10223
-2296494 -21394
-2876280 -32357
-3572827 -51397
-4452032 -87137
-4953249 -111910
-5388609 -141252
-5731586 -165403
-6101332 -197003
-6884756 -282055
-7719066 -372715
-8101214 -415308
-8855617 -516206
-9316024 -579909
-10091662 -705732
-10621099 -799022
-11373696 -943668
-12117674 -1091599
-12904024 -1252706
-13303721 -1336232
-14185658 -1532652
-14694093 -1649465
-15574405 -1854974
-16315901 -2029950
-17029329 -2200144
-17893084 -2409469
-18741630 -2620708
...

output:

258992362.530011423121323

result:

ok found '258992362.5300114', expected '258992362.5300114', error '0.0000000'

Test #16:

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

input:

1000
0 0
-638945 -769
-1345094 -2633
-2049372 -9786
-3043001 -20660
-3832821 -40968
-4616354 -61996
-5489016 -89554
-6075577 -112116
-7059918 -153506
-7917375 -193461
-8704241 -235730
-9411173 -289585
-9928254 -332456
-10816688 -407937
-11522358 -469782
-12333778 -541183
-12532282 -560003
-13293480 -634683
-13671807 -673160
-14354465 -748651
-15022315 -830629
-15880396 -937010
-16749798 -1048448
-17129945 -1104583
-17338594 -1135531
-18292362 -1282102
-19249921 -1438249
-20167904 -1599512
-20402...

output:

260884926.049846065070597

result:

ok found '260884926.0498461', expected '260884926.0498461', error '0.0000000'

Test #17:

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

input:

1000
0 0
-929784 -9273
-1222089 -14360
-1633168 -22589
-2271669 -42262
-2863939 -61639
-3538074 -85549
-4537727 -127500
-5529674 -172462
-6106076 -217405
-6615381 -262810
-7383575 -342936
-8289266 -445052
-8474592 -467243
-9285779 -564519
-10059545 -662251
-10774681 -753541
-11666601 -869701
-12058733 -922158
-12833453 -1026139
-13702754 -1178940
-14428330 -1307495
-15003536 -1417721
-15667671 -1549928
-16299954 -1677285
-17246274 -1879046
-17735140 -1985100
-18641033 -2185299
-18866287 -2235195...

output:

259788149.399604525140603

result:

ok found '259788149.3996045', expected '259788149.3996045', error '0.0000000'

Test #18:

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

input:

1000
0 0
-436597 -2249
-897574 -4839
-1763026 -9858
-2199595 -14239
-2837069 -24431
-3656371 -67025
-4153771 -93216
-5062244 -151716
-5634320 -190859
-6503474 -278174
-7250273 -366225
-7276046 -369834
-7806600 -448708
-8317734 -530915
-8905662 -634997
-9766507 -790590
-9973653 -831916
-10555366 -955960
-11329701 -1124018
-12256993 -1326676
-12926426 -1487094
-13207003 -1557117
-14127348 -1795934
-14805446 -1972021
-15278508 -2098419
-15641769 -2207641
-16372365 -2429073
-16907724 -2593642
-17442...

output:

277834510.778030039160512

result:

ok found '277834510.7780300', expected '277834510.7780300', error '0.0000000'

Test #19:

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

input:

1000
0 0
-499456 -5028
-1395210 -19193
-2095999 -36599
-2278240 -43145
-2754419 -63055
-3701264 -104359
-4078225 -133214
-4292562 -151446
-5087031 -220375
-5649235 -277762
-6403916 -358749
-7403700 -470022
-7940233 -537110
-8433330 -607694
-9376563 -746831
-9903004 -831307
-10718505 -965214
-11713691 -1141479
-12123491 -1215125
-13040208 -1380517
-13821343 -1521921
-14387707 -1624738
-15128120 -1764849
-15518765 -1840784
-16048468 -1944645
-16819064 -2096551
-17015654 -2135967
-17264121 -2186808...

output:

261984352.627110776084010

result:

ok found '261984352.6271108', expected '261984352.6271108', error '0.0000000'

Test #20:

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

input:

1000
0 0
-347123 -2330
-1296972 -12856
-2114794 -28811
-3005647 -54768
-3802579 -79440
-4777546 -118441
-5386348 -146049
-6230831 -184743
-7083665 -250364
-7963538 -324047
-8621014 -381656
-9065618 -421654
-9883960 -496406
-10349110 -541972
-11146897 -621572
-12108943 -718091
-12921588 -803916
-13480980 -874354
-14264095 -973203
-15150885 -1107229
-15880047 -1220221
-16635952 -1339769
-17284790 -1443842
-17887843 -1545806
-18543857 -1656856
-19241737 -1779813
-20006372 -1931974
-20462512 -202522...

output:

265979549.580991179260309

result:

ok found '265979549.5809912', expected '265979549.5809912', error '0.0000000'

Subtask #2:

score: 30
Accepted

Test #21:

score: 30
Accepted
time: 12ms
memory: 5180kb

input:

30000
0 0
-27842 -9
-56782 -24
-64412 -29
-91618 -47
-121087 -68
-152541 -123
-182316 -183
-212916 -274
-234159 -341
-266126 -446
-289328 -523
-317883 -637
-340594 -728
-350940 -781
-374263 -905
-400736 -1046
-427862 -1199
-450458 -1327
-465289 -1413
-485809 -1534
-517032 -1724
-548368 -1921
-576015 -2095
-603053 -2276
-634401 -2495
-638656 -2525
-667275 -2730
-691250 -2903
-711421 -3050
-742195 -3275
-764962 -3443
-795760 -3673
-811449 -3797
-819057 -3858
-836116 -3998
-859728 -4205
-888987 -44...

output:

254843548.698640258517116

result:

ok found '254843548.6986403', expected '254843548.6986403', error '0.0000000'

Test #22:

score: 0
Accepted
time: 12ms
memory: 5144kb

input:

30000
0 0
-31209 -21
-39334 -27
-64601 -46
-86568 -64
-115119 -89
-143398 -117
-161108 -154
-179520 -196
-203131 -254
-234209 -335
-252923 -396
-275417 -473
-289767 -533
-311588 -627
-343100 -821
-369994 -998
-385492 -1101
-412257 -1281
-427669 -1387
-453860 -1575
-485750 -1817
-510891 -2019
-531160 -2185
-555008 -2385
-568486 -2500
-596280 -2745
-605983 -2831
-616887 -2929
-649849 -3237
-662275 -3361
-669875 -3439
-694806 -3707
-723496 -4020
-754252 -4358
-786196 -4718
-805801 -4941
-825195 -51...

output:

250853956.023968910420081

result:

ok found '250853956.0239689', expected '250853956.0239689', error '0.0000000'

Test #23:

score: 0
Accepted
time: 16ms
memory: 4960kb

input:

30000
0 0
-20075 -15
-53286 -46
-77410 -74
-104765 -117
-128452 -158
-138117 -176
-145933 -192
-169668 -264
-195119 -349
-220533 -437
-227177 -463
-259461 -594
-288461 -712
-304625 -788
-337671 -947
-358291 -1056
-388248 -1227
-411605 -1362
-422810 -1433
-444967 -1583
-464234 -1714
-471059 -1763
-481736 -1843
-506229 -2035
-538966 -2304
-564364 -2520
-584299 -2690
-612051 -2928
-633467 -3114
-656622 -3333
-682236 -3577
-702900 -3776
-717379 -3923
-735325 -4106
-756031 -4335
-776171 -4558
-795403...

output:

250990461.758505815130775

result:

ok found '250990461.7585058', expected '250990461.7585058', error '0.0000000'

Test #24:

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

input:

30000
0 0
-25406 -9
-53669 -24
-62096 -33
-84905 -59
-97980 -83
-118490 -127
-139980 -180
-168464 -256
-187325 -315
-208655 -393
-215588 -421
-244663 -541
-261958 -614
-288250 -735
-294235 -765
-308563 -838
-338619 -993
-350477 -1059
-363699 -1134
-379676 -1232
-398726 -1354
-430095 -1576
-459666 -1789
-485762 -1990
-501705 -2117
-534024 -2381
-562321 -2627
-586446 -2842
-612227 -3072
-633530 -3263
-659720 -3499
-682679 -3709
-714927 -4009
-743495 -4314
-775113 -4657
-783971 -4759
-795322 -4891
...

output:

253698546.200174044279265

result:

ok found '253698546.2001740', expected '253698546.2001740', error '0.0000000'

Test #25:

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

input:

30000
0 0
-21134 -9
-45635 -23
-62583 -36
-90936 -72
-123048 -113
-148384 -151
-173729 -190
-194644 -225
-207752 -258
-236495 -342
-241543 -359
-272810 -476
-303141 -602
-324057 -690
-344614 -778
-364773 -871
-380490 -948
-407975 -1083
-433651 -1212
-464879 -1383
-485067 -1502
-513615 -1674
-537857 -1821
-560385 -1968
-589041 -2172
-606289 -2295
-634328 -2511
-667043 -2768
-687290 -2932
-702530 -3057
-717530 -3181
-743166 -3402
-762706 -3572
-789185 -3803
-794003 -3847
-825178 -4142
-849582 -437...

output:

249331713.281047914511873

result:

ok found '249331713.2810479', expected '249331713.2810479', error '0.0000000'

Test #26:

score: 0
Accepted
time: 16ms
memory: 5180kb

input:

30000
0 0
-21448 -2
-26656 -6
-55814 -36
-82967 -67
-107428 -97
-134427 -133
-152614 -158
-171092 -185
-199260 -236
-221094 -282
-254022 -354
-285389 -431
-318637 -513
-346959 -588
-371288 -663
-398215 -753
-430925 -909
-460659 -1052
-492385 -1212
-522834 -1369
-544343 -1480
-574493 -1645
-591923 -1742
-623750 -1921
-632506 -1971
-651856 -2093
-684098 -2308
-715734 -2531
-735342 -2674
-750380 -2786
-780074 -3026
-805605 -3241
-826496 -3417
-856932 -3675
-870303 -3789
-894681 -4007
-917995 -4229
...

output:

252099986.101602413400542

result:

ok found '252099986.1016024', expected '252099986.1016024', error '0.0000000'

Test #27:

score: 0
Accepted
time: 14ms
memory: 4968kb

input:

30000
0 0
-14622 -3
-21004 -5
-52082 -23
-74883 -43
-96336 -71
-128458 -113
-156799 -154
-183046 -195
-192091 -210
-222978 -268
-242938 -309
-262594 -352
-278459 -388
-305011 -451
-334920 -535
-359764 -614
-386317 -705
-387178 -708
-403823 -768
-433061 -876
-462803 -990
-476883 -1056
-501388 -1177
-532215 -1337
-546513 -1415
-574657 -1581
-592378 -1690
-614166 -1831
-646415 -2044
-659929 -2135
-676591 -2248
-708985 -2468
-730581 -2615
-753159 -2769
-762368 -2834
-787189 -3012
-802236 -3123
-8164...

output:

252058372.187279169142130

result:

ok found '252058372.1872792', expected '252058372.1872792', error '0.0000000'

Test #28:

score: 0
Accepted
time: 16ms
memory: 4972kb

input:

30000
0 0
-25620 -6
-58948 -27
-81188 -42
-108084 -65
-116725 -73
-125232 -81
-135235 -91
-151536 -109
-184450 -152
-207622 -186
-226702 -226
-253157 -296
-272563 -363
-285333 -416
-314647 -544
-343300 -671
-374313 -814
-396287 -921
-420576 -1040
-429098 -1083
-461737 -1259
-484471 -1384
-514561 -1553
-543670 -1721
-565501 -1851
-583139 -1959
-614354 -2170
-642335 -2361
-653265 -2436
-674823 -2584
-707762 -2812
-740907 -3056
-750399 -3126
-778032 -3330
-799252 -3492
-824623 -3689
-856228 -3941
-...

output:

250472754.019010460906429

result:

ok found '250472754.0190105', expected '250472754.0190105', error '0.0000000'

Test #29:

score: 0
Accepted
time: 12ms
memory: 4976kb

input:

30000
0 0
-33296 -14
-53478 -25
-77571 -40
-102204 -60
-131127 -87
-154300 -115
-164094 -129
-170807 -139
-182721 -162
-204059 -213
-233651 -291
-248862 -344
-272501 -427
-292422 -497
-316393 -587
-332926 -655
-357527 -758
-377377 -846
-400755 -952
-421907 -1051
-432483 -1106
-463837 -1277
-484678 -1392
-498530 -1471
-524351 -1624
-528665 -1650
-550138 -1786
-559381 -1850
-586107 -2041
-615556 -2256
-630968 -2376
-662650 -2634
-690154 -2860
-702178 -2963
-725557 -3164
-752722 -3407
-771756 -3588...

output:

250911365.392825115442974

result:

ok found '250911365.3928251', expected '250911365.3928251', error '0.0000000'

Test #30:

score: 0
Accepted
time: 14ms
memory: 5140kb

input:

30000
0 0
-16184 -12
-47000 -41
-65809 -62
-97992 -98
-130432 -136
-141298 -155
-166593 -204
-199502 -297
-227146 -379
-253391 -469
-268774 -523
-296503 -636
-323982 -757
-356038 -900
-373220 -977
-398856 -1098
-425367 -1243
-452654 -1396
-476703 -1537
-489569 -1615
-493812 -1641
-521509 -1812
-541925 -1942
-564448 -2086
-592253 -2270
-613329 -2410
-636128 -2569
-655333 -2703
-676266 -2860
-691425 -2985
-712864 -3166
-721623 -3240
-745764 -3452
-758719 -3566
-770820 -3687
-793020 -3916
-826236 -...

output:

250844611.902709078305634

result:

ok found '250844611.9027091', expected '250844611.9027091', error '0.0000000'

Test #31:

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

input:

30000
0 0
-25799 -4
-55851 -26
-80970 -45
-101274 -62
-132285 -92
-156585 -119
-172335 -137
-194967 -166
-207127 -182
-210322 -187
-232931 -224
-254065 -285
-276296 -355
-296092 -422
-319568 -506
-341162 -585
-366961 -682
-378425 -726
-406880 -836
-433997 -944
-462505 -1063
-484234 -1155
-510379 -1267
-535503 -1380
-556644 -1476
-584623 -1614
-612857 -1754
-640997 -1904
-668065 -2054
-694606 -2206
-706799 -2276
-725061 -2383
-754094 -2563
-782329 -2740
-805549 -2892
-827081 -3034
-845981 -3165
-...

output:

252561817.964902624356910

result:

ok found '252561817.9649026', expected '252561817.9649026', error '0.0000000'

Test #32:

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

input:

30000
0 0
-26056 -4
-54769 -14
-60303 -16
-87623 -57
-116864 -112
-138854 -159
-157862 -208
-175152 -264
-200884 -367
-230497 -499
-252728 -608
-270362 -698
-296046 -842
-305774 -898
-310136 -925
-332152 -1067
-333986 -1079
-355425 -1222
-364727 -1286
-382658 -1414
-392920 -1492
-425026 -1737
-440417 -1859
-448931 -1929
-472338 -2123
-503478 -2388
-521423 -2544
-526251 -2586
-529159 -2612
-561589 -2912
-592030 -3198
-624869 -3507
-642155 -3671
-651403 -3759
-670557 -3950
-698115 -4230
-709657 -4...

output:

253995087.912409786425997

result:

ok found '253995087.9124098', expected '253995087.9124098', error '0.0000000'

Test #33:

score: 0
Accepted
time: 12ms
memory: 5176kb

input:

30000
0 0
-9535 -2
-40752 -11
-60579 -26
-93471 -57
-118567 -94
-144069 -132
-173022 -182
-195295 -224
-223889 -296
-247193 -355
-264085 -399
-290833 -470
-296735 -486
-316658 -542
-335761 -609
-366899 -722
-382069 -779
-411737 -894
-434702 -985
-457466 -1078
-487157 -1201
-497974 -1248
-524864 -1365
-527570 -1377
-548599 -1481
-572599 -1619
-594297 -1749
-621701 -1915
-623429 -1926
-648214 -2084
-664251 -2188
-679145 -2290
-706574 -2478
-739716 -2707
-762192 -2867
-777251 -2978
-800246 -3149
-8...

output:

252472448.527553312917007

result:

ok found '252472448.5275533', expected '252472448.5275533', error '0.0000000'

Test #34:

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

input:

30000
0 0
-24944 -5
-45218 -18
-63052 -30
-95222 -53
-122297 -76
-142451 -95
-166142 -128
-198625 -176
-224888 -226
-256971 -297
-268524 -323
-295294 -399
-316093 -462
-346071 -556
-357361 -596
-384063 -695
-413239 -808
-431516 -883
-455899 -988
-477258 -1083
-482936 -1109
-514885 -1259
-545203 -1403
-573965 -1552
-589120 -1632
-614149 -1768
-627093 -1840
-657450 -2013
-686306 -2183
-718715 -2381
-741846 -2533
-764934 -2688
-787182 -2841
-817090 -3047
-829379 -3137
-852363 -3311
-877741 -3514
-9...

output:

251091289.921181569050532

result:

ok found '251091289.9211816', expected '251091289.9211816', error '0.0000000'

Test #35:

score: 0
Accepted
time: 9ms
memory: 5064kb

input:

30000
0 0
-30995 -2
-54625 -11
-82116 -24
-107137 -37
-118814 -46
-145376 -68
-153252 -80
-185690 -144
-216437 -215
-233722 -272
-253995 -343
-271631 -413
-292398 -507
-321561 -641
-349834 -782
-373847 -909
-394268 -1020
-413992 -1130
-437644 -1265
-455088 -1371
-479307 -1520
-487919 -1573
-510069 -1711
-534107 -1861
-548426 -1953
-571975 -2108
-592313 -2247
-623190 -2466
-655069 -2709
-662792 -2769
-678292 -2896
-710870 -3175
-723092 -3286
-754711 -3574
-779031 -3796
-806163 -4051
-821197 -4196...

output:

252314719.973508087437949

result:

ok found '252314719.9735081', expected '252314719.9735081', error '0.0000000'

Test #36:

score: 0
Accepted
time: 16ms
memory: 5084kb

input:

30000
0 0
-27620 -15
-32869 -18
-63930 -40
-92226 -71
-117410 -103
-128286 -121
-160858 -177
-175636 -204
-202913 -255
-210245 -270
-231489 -321
-239502 -341
-270542 -438
-300109 -534
-328778 -641
-347216 -724
-378021 -873
-405203 -1017
-433216 -1174
-466343 -1375
-485498 -1495
-512206 -1683
-537113 -1866
-565133 -2079
-591474 -2281
-610099 -2424
-643241 -2683
-659419 -2821
-672884 -2936
-692961 -3116
-721550 -3376
-743857 -3582
-775062 -3887
-805316 -4183
-833379 -4481
-850101 -4660
-880036 -49...

output:

252132224.517777768720407

result:

ok found '252132224.5177778', expected '252132224.5177778', error '0.0000000'

Test #37:

score: 0
Accepted
time: 16ms
memory: 5176kb

input:

30000
0 0
-26512 -10
-51854 -27
-59926 -34
-72478 -45
-104402 -85
-134454 -126
-156279 -156
-187348 -202
-204100 -236
-236516 -302
-257885 -347
-283292 -401
-304536 -460
-329866 -533
-362401 -630
-368232 -649
-393217 -739
-412750 -810
-443034 -922
-470338 -1029
-481188 -1073
-497958 -1151
-530836 -1311
-540048 -1364
-571322 -1544
-581124 -1602
-590389 -1657
-601841 -1730
-630957 -1917
-648355 -2030
-664746 -2142
-687957 -2301
-715384 -2502
-725286 -2575
-743869 -2712
-768633 -2899
-799640 -3136
...

output:

251728991.755181492844713

result:

ok found '251728991.7551815', expected '251728991.7551815', error '0.0000000'

Test #38:

score: 0
Accepted
time: 9ms
memory: 4960kb

input:

30000
0 0
-29212 -4
-38598 -7
-71599 -25
-95384 -48
-122534 -75
-152884 -108
-185395 -148
-193339 -166
-211296 -218
-242492 -319
-262879 -390
-280381 -452
-297193 -522
-316047 -608
-344702 -748
-362716 -837
-371851 -884
-392232 -990
-415911 -1120
-428530 -1190
-455344 -1346
-476289 -1469
-502141 -1624
-520668 -1738
-550833 -1929
-575970 -2098
-582226 -2141
-598076 -2251
-622507 -2422
-644896 -2581
-656708 -2665
-676602 -2813
-697299 -2967
-729996 -3221
-760391 -3466
-789844 -3710
-817697 -3942
-...

output:

252836476.436363867076579

result:

ok found '252836476.4363639', expected '252836476.4363639', error '0.0000000'

Test #39:

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

input:

30000
0 0
-32998 -8
-60868 -23
-90627 -40
-119903 -65
-145529 -87
-161760 -103
-169947 -115
-194965 -153
-217424 -191
-240218 -232
-262746 -278
-274663 -306
-300259 -367
-311698 -396
-338898 -472
-371940 -583
-391272 -648
-422137 -773
-450678 -889
-472143 -979
-498399 -1098
-530708 -1249
-553762 -1357
-585274 -1518
-610699 -1656
-632387 -1794
-659403 -1967
-686816 -2150
-714186 -2342
-746352 -2572
-755321 -2638
-787078 -2883
-818777 -3146
-848948 -3401
-876818 -3639
-885861 -3719
-914418 -3974
-...

output:

254810274.423550044579315

result:

ok found '254810274.4235500', expected '254810274.4235500', error '0.0000000'

Test #40:

score: 0
Accepted
time: 16ms
memory: 5176kb

input:

30000
0 0
-8940 -5
-33085 -27
-59867 -53
-86492 -79
-109768 -109
-130705 -139
-137599 -149
-167036 -193
-175992 -209
-205088 -262
-231732 -316
-253027 -361
-277001 -412
-306909 -477
-319514 -507
-337756 -557
-357495 -615
-372846 -661
-389281 -720
-409556 -800
-431984 -897
-439453 -931
-470069 -1095
-485450 -1179
-518314 -1380
-545187 -1572
-558208 -1668
-559560 -1678
-591485 -1924
-609981 -2078
-621427 -2174
-643530 -2367
-669349 -2598
-671920 -2622
-704127 -2950
-732000 -3238
-755185 -3481
-788...

output:

252714495.277628855285002

result:

ok found '252714495.2776289', expected '252714495.2776289', error '0.0000000'

Subtask #3:

score: 60
Accepted

Test #41:

score: 60
Accepted
time: 235ms
memory: 34648kb

input:

500000
0 0
-1984 -1
-3948 -2
-5906 -3
-7858 -4
-9782 -5
-11687 -6
-13584 -7
-15396 -8
-17164 -9
-18920 -10
-20662 -11
-22403 -12
-24141 -13
-25841 -14
-27533 -15
-29130 -16
-30717 -17
-32294 -18
-33869 -19
-35416 -20
-36958 -21
-38470 -22
-39949 -23
-41422 -24
-42890 -25
-44343 -26
-45731 -27
-47089 -28
-48414 -29
-49736 -30
-51004 -31
-52195 -32
-53383 -33
-54562 -34
-55679 -35
-56749 -36
-57791 -37
-58828 -38
-59863 -39
-60870 -40
-62819 -42
-64764 -44
-65736 -45
-67673 -47
-68624 -48
-69572 -...

output:

250546651.901066658421769

result:

ok found '250546651.9010667', expected '250546651.9010667', error '0.0000000'

Test #42:

score: 0
Accepted
time: 226ms
memory: 34596kb

input:

500000
0 0
-1966 -1
-3887 -2
-5788 -3
-7676 -4
-9407 -5
-11076 -6
-12731 -7
-14285 -8
-15829 -9
-17361 -10
-18869 -11
-20358 -12
-21841 -13
-23323 -14
-24788 -15
-26134 -16
-27457 -17
-28627 -18
-29768 -19
-30831 -20
-31881 -21
-32923 -22
-33956 -23
-34977 -24
-36961 -26
-37931 -27
-39798 -29
-40731 -30
-42582 -32
-43504 -33
-45345 -35
-47161 -37
-48065 -38
-49868 -40
-51657 -42
-53340 -44
-55004 -46
-55832 -47
-57467 -49
-59099 -51
-59900 -52
-60698 -53
-61496 -54
-63090 -56
-64663 -58
-65445 -...

output:

250435395.883868428863934

result:

ok found '250435395.8838684', expected '250435395.8838684', error '0.0000000'

Test #43:

score: 0
Accepted
time: 222ms
memory: 34540kb

input:

500000
0 0
-1951 -1
-3898 -2
-5828 -3
-7755 -4
-9668 -5
-11540 -6
-13405 -7
-15238 -8
-17036 -9
-18696 -10
-20310 -11
-21918 -12
-23504 -13
-25087 -14
-26643 -15
-28191 -16
-29738 -17
-31216 -18
-32637 -19
-34040 -20
-35437 -21
-36800 -22
-38134 -23
-39411 -24
-40685 -25
-41952 -26
-43163 -27
-44372 -28
-45549 -29
-46725 -30
-47889 -31
-49007 -32
-50024 -33
-51031 -34
-52035 -35
-54030 -37
-56021 -39
-57012 -40
-57987 -41
-58946 -42
-60863 -44
-62776 -46
-64683 -48
-66528 -50
-68337 -52
-70142 -...

output:

250864379.799159404297825

result:

ok found '250864379.7991594', expected '250864379.7991594', error '0.0000000'

Test #44:

score: 0
Accepted
time: 233ms
memory: 34584kb

input:

500000
0 0
-1966 -1
-3814 -2
-5658 -3
-7499 -4
-9288 -5
-10993 -6
-12683 -7
-14368 -8
-16001 -9
-17554 -10
-19098 -11
-20624 -12
-22046 -13
-23375 -14
-24684 -15
-25923 -16
-27157 -17
-28373 -18
-29570 -19
-30755 -20
-31940 -21
-33061 -22
-34101 -23
-36091 -25
-37085 -26
-39050 -28
-41010 -30
-42924 -32
-43880 -33
-44832 -34
-46689 -36
-47606 -37
-49435 -39
-50344 -40
-52135 -42
-53873 -44
-55609 -46
-57320 -48
-58984 -50
-59811 -51
-61461 -53
-63074 -55
-63879 -56
-64673 -57
-65462 -58
-67034 -...

output:

250490528.301645419720444

result:

ok found '250490528.3016454', expected '250490528.3016454', error '0.0000000'

Test #45:

score: 0
Accepted
time: 232ms
memory: 34576kb

input:

500000
0 0
-2000 -1
-3991 -2
-5959 -3
-7812 -4
-9659 -5
-11486 -6
-13244 -7
-14965 -8
-16685 -9
-18403 -10
-20112 -11
-21769 -12
-23425 -13
-25049 -14
-26661 -15
-28245 -16
-29805 -17
-31321 -18
-32778 -19
-34227 -20
-35648 -21
-37063 -22
-38451 -23
-39834 -24
-41189 -25
-42537 -26
-43862 -27
-45146 -28
-46391 -29
-47636 -30
-48775 -31
-49900 -32
-50963 -33
-51997 -34
-53993 -36
-54991 -37
-56952 -39
-57922 -40
-59839 -42
-61752 -44
-62705 -45
-64578 -47
-66451 -49
-68282 -51
-69190 -52
-70091 -...

output:

250484765.816351893357933

result:

ok found '250484765.8163519', expected '250484765.8163519', error '0.0000000'

Test #46:

score: 0
Accepted
time: 232ms
memory: 34648kb

input:

500000
0 0
-1999 -1
-3969 -2
-5883 -3
-7768 -4
-9646 -5
-11522 -6
-13386 -7
-15249 -8
-17083 -9
-18886 -10
-20620 -11
-22334 -12
-24010 -13
-25682 -14
-27345 -15
-28999 -16
-30653 -17
-32305 -18
-33880 -19
-35447 -20
-36987 -21
-38504 -22
-39992 -23
-41471 -24
-42894 -25
-44296 -26
-45677 -27
-47055 -28
-48418 -29
-49671 -30
-50894 -31
-52098 -32
-53233 -33
-54330 -34
-55408 -35
-56451 -36
-57491 -37
-58459 -38
-60392 -40
-62310 -42
-64228 -44
-66145 -46
-67102 -47
-68038 -48
-68963 -49
-70793 -...

output:

250230916.190369804186048

result:

ok found '250230916.1903698', expected '250230916.1903698', error '0.0000000'

Test #47:

score: 0
Accepted
time: 212ms
memory: 34564kb

input:

500000
0 0
-1957 -1
-3908 -2
-5811 -3
-7704 -4
-9571 -5
-11424 -6
-13257 -7
-15084 -8
-16829 -9
-18554 -10
-20227 -11
-21839 -12
-23449 -13
-25057 -14
-26543 -15
-28022 -16
-29490 -17
-30930 -18
-32353 -19
-33776 -20
-35142 -21
-36453 -22
-37757 -23
-39042 -24
-40309 -25
-41564 -26
-42760 -27
-43906 -28
-45052 -29
-46195 -30
-47338 -31
-48401 -32
-49453 -33
-50475 -34
-52430 -36
-54369 -38
-56278 -40
-58174 -42
-59115 -43
-60031 -44
-61860 -46
-63678 -48
-65489 -50
-67230 -52
-68959 -54
-70678 -...

output:

251523690.462404055826482

result:

ok found '251523690.4624040', expected '251523690.4624040', error '0.0000000'

Test #48:

score: 0
Accepted
time: 228ms
memory: 34516kb

input:

500000
0 0
-1955 -1
-3908 -2
-5832 -3
-7723 -4
-9572 -5
-11411 -6
-13149 -7
-14815 -8
-16416 -9
-18007 -10
-19594 -11
-21168 -12
-22677 -13
-24178 -14
-25679 -15
-27176 -16
-28658 -17
-30129 -18
-31590 -19
-33032 -20
-34442 -21
-35816 -22
-37044 -23
-38207 -24
-39344 -25
-40420 -26
-41421 -27
-43334 -29
-45217 -31
-47074 -33
-48902 -35
-49799 -36
-50686 -37
-52434 -39
-53302 -40
-55004 -42
-56691 -44
-58331 -46
-59900 -48
-61458 -50
-62970 -52
-63723 -53
-65167 -55
-66597 -57
-67996 -59
-69358 -...

output:

251183725.504666030305088

result:

ok found '251183725.5046660', expected '251183725.5046660', error '0.0000000'

Test #49:

score: 0
Accepted
time: 227ms
memory: 34392kb

input:

500000
0 0
-1997 -1
-3931 -2
-5858 -3
-7761 -4
-9578 -5
-11389 -6
-13134 -7
-14876 -8
-16612 -9
-18328 -10
-19994 -11
-21530 -12
-23041 -13
-24493 -14
-25929 -15
-27352 -16
-28721 -17
-30062 -18
-31354 -19
-32639 -20
-33919 -21
-35198 -22
-36458 -23
-37669 -24
-38874 -25
-40072 -26
-41248 -27
-42388 -28
-43505 -29
-44600 -30
-45650 -31
-46697 -32
-47738 -33
-49726 -35
-51714 -37
-53632 -39
-55516 -41
-57341 -43
-59145 -45
-60026 -46
-61778 -48
-63527 -50
-65247 -52
-66960 -54
-67814 -55
-68660 -...

output:

250578576.631359754799632

result:

ok found '250578576.6313598', expected '250578576.6313598', error '0.0000000'

Test #50:

score: 0
Accepted
time: 220ms
memory: 34496kb

input:

500000
0 0
-1945 -1
-3846 -2
-5639 -3
-7414 -4
-9185 -5
-10917 -6
-12609 -7
-14296 -8
-15973 -9
-17613 -10
-19227 -11
-20729 -12
-22204 -13
-23675 -14
-25145 -15
-26563 -16
-27980 -17
-29273 -18
-30544 -19
-31789 -20
-33034 -21
-34257 -22
-35442 -23
-36592 -24
-37740 -25
-38877 -26
-39955 -27
-41029 -28
-42051 -29
-43070 -30
-45035 -32
-46984 -34
-48904 -36
-49841 -37
-51702 -39
-53551 -41
-54444 -42
-55322 -43
-56194 -44
-57935 -46
-59648 -48
-60504 -49
-61349 -50
-63036 -52
-63853 -53
-65465 -...

output:

250877196.039270498295082

result:

ok found '250877196.0392705', expected '250877196.0392705', error '0.0000000'

Extra Test:

score: -3
Extra Test Failed : Dangerous Syscalls on 1

input:

3
1 1
2 2
3 3

output:


result: