QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#261581#4587. Stable Planetary SystemNYCU_gAwr_gurAAC ✓193ms33824kbC++202.7kb2023-11-23 00:29:362023-11-23 00:29:36

Judging History

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

  • [2023-11-23 00:29:36]
  • 评测
  • 测评结果:AC
  • 用时:193ms
  • 内存:33824kb
  • [2023-11-23 00:29:36]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#define iter(v) v.begin(), v.end()
#define SZ(v) (int) v.size()
#define pb emplace_back
#define ff first
#define ss second

using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

#ifdef zisk
void debug(){cout << "\n";}
template<class T, class ... U>
void debug(T a, U ... b){
	cout << a << "  ", debug(b...);
}
template<class T> void pary(T l, T r){
	while(l != r) cout << *l << " ", l++;
	cout << "\n";
}
#else
#define debug(...) void()
#define pary(...) void()
#endif

template<class A, class B>
ostream& operator<<(ostream& o, pair<A, B> p){
	return o << '(' << p.ff << ',' << p.ss << ')';
}

using ld = long double;
using pdd = pair<ld, ld>;
const ld PI = acos(-1);
#define X ff
#define Y ss

ld sqr(ld v){
	return v * v;
}
ld dis2(pdd a, pdd b){
	ld dx = a.X - b.X, dy = a.Y - b.Y;
	return dx * dx + dy * dy;
}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	int n;
	cin >> n;

	vector<pll> radi;
	vector<pair<ll, pdd>> peri;

	for(int i = 0; i < n; i++){
		int r, t, p;
		cin >> r >> t >> p;

		radi.pb(pll(r, p));
		ld theta = (ld)t * PI / 1000 / 180;
		ld x = r * cos(theta);
		ld y = r * sin(theta);
		peri.pb(make_pair(p, pdd(x, y)));
	}

	sort(iter(radi));
	sort(iter(peri));

	ld ans = 1e87;
	for(int i = 0; i + 1 < SZ(radi); i++){
		if(radi[i].ss != radi[i + 1].ss) ans = min(ans, sqr(radi[i + 1].ff - radi[i].ff));
	}
	//debug("test", ans);

	auto dfs1 = [&](auto dfs, vector<pdd>& pts, int l, int r) -> void{
		if(l >= r) return;
		int mid = (l + r) / 2;
		ld mx = pts[mid].X;
		dfs(dfs, pts, l, mid);
		dfs(dfs, pts, mid + 1, r);

		//debug("test", l, r);
		//pary(pts.begin() + l, pts.begin() + r + 1);
		vector<pdd> tmp(r - l + 1);
		merge(pts.begin() + l, pts.begin() + mid + 1, pts.begin() + mid + 1, pts.begin() + r + 1, tmp.begin(), 
			[&](pdd a, pdd b){return a.Y < b.Y;});	
		for(int i = l; i <= r; i++) pts[i] = tmp[i - l];
		tmp.clear();
		for(int i = l; i <= r; i++){
			if(sqr(abs(pts[i].X - mx)) <= ans) tmp.pb(pts[i]);
		}
		//pary(iter(tmp));
		for(int i = 0; i < SZ(tmp); i++){
			for(int j = i + 1; j < SZ(tmp) && sqr(abs(tmp[i].Y - tmp[j].Y)) <= ans; j++){
			//for(int j = i + 1; j < SZ(tmp); j++){
				//debug("updans", pts[i], pts[j],i, j, dis2(pts[i], pts[j]));
				ans = min(ans, dis2(tmp[i], tmp[j]));
			}
		}
		//debug("ok", sqrt(ans));
	};

	for(int i = 0; i < SZ(peri); ){
		ll p = peri[i].ff;
		vector<pdd> pts;
		for(; i < SZ(peri) && peri[i].ff == p; i++) pts.pb(peri[i].ss);
		sort(iter(pts));
		//debug("owo");
		//pary(iter(pts));
		dfs1(dfs1, pts, 0, SZ(pts) - 1);
	}
	cout << fixed << setprecision(20) << sqrt(ans) << "\n";

}

详细

Test #1:

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

input:

3
1 55555 4
3 180000 4
4 0 2

output:

1.00000000000000000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #2:

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

input:

3
100 0 2
100 270000 1
9 2000 3

output:

0.00000000000000000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #3:

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

input:

2
10 0 2
1 90000 2

output:

10.04987562112089020949

result:

ok found '10.0498756', expected '10.0498756', error '0.0000000'

Test #4:

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

input:

2
100000000 359999 100000000
100000000 0 99999999

output:

0.00000000000000000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #5:

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

input:

24
100 269428 1
5000 359966 1
5500 180042 1
100 89427 1
3000 19 1
2500 179954 1
6000 180048 1
2000 179914 1
2500 45 1
5000 180035 1
3500 0 1
1500 179847 1
4500 359975 1
4000 180015 1
4000 359986 1
3000 179980 1
1000 286 1
3500 180000 1
1500 152 1
5500 359959 1
2000 85 1
4500 180026 1
1000 179713 1
6...

output:

199.99999999238456452333

result:

ok found '200.0000000', expected '200.0000000', error '0.0000000'

Test #6:

score: 0
Accepted
time: 170ms
memory: 32604kb

input:

200000
567223 269999 1
743763 270005 1
437966 270004 1
421636 270004 1
1146673 269999 1
2506713 269999 1
2953202 270002 1
1556760 270004 1
677796 90005 1
2405470 270002 1
1630385 269998 1
942108 89999 1
1743132 90001 1
1091225 270005 1
137100 269996 1
1346986 270004 1
1117456 269997 1
1238581 90002 ...

output:

19.99999999999982169471

result:

ok found '20.0000000', expected '20.0000000', error '0.0000000'

Test #7:

score: 0
Accepted
time: 149ms
memory: 31732kb

input:

200000
1975108 27004 1
1433085 26997 1
2066381 26999 1
976526 206998 1
2199595 207000 1
2616856 207002 1
2939724 26995 1
1240727 207001 1
3008689 207004 1
1165076 206998 1
2265606 27000 1
72354 26999 1
1272339 207001 1
2910709 207004 1
1527660 27004 1
2025914 206998 1
784740 206999 1
3028526 206995 ...

output:

19.99999999999984271436

result:

ok found '20.0000000', expected '20.0000000', error '0.0000000'

Test #8:

score: 0
Accepted
time: 175ms
memory: 31020kb

input:

200000
459272 270004 1
1426780 270002 1
64705 89998 1
2730681 269998 1
352323 89995 1
544326 270003 1
2901718 89996 1
1641340 270003 1
1138464 270004 1
260341 270000 1
1306735 90003 1
1702391 270002 1
603341 90005 1
2707795 270004 1
2610295 270003 1
141012 90003 1
131872 269997 1
432178 270004 1
235...

output:

19.99999999999982169471

result:

ok found '20.0000000', expected '20.0000000', error '0.0000000'

Test #9:

score: 0
Accepted
time: 149ms
memory: 33000kb

input:

200000
1308421 27005 1
1946853 207001 1
111537 26999 1
2152543 206996 1
826285 27002 1
2311933 27000 1
1599040 27002 1
2171702 207003 1
1771276 27004 1
1961379 26995 1
867007 206997 1
1312198 207002 1
721623 27002 1
344755 207003 1
2292019 206997 1
1146867 206996 1
2643427 206999 1
932372 207001 1
2...

output:

19.99999999999984725239

result:

ok found '20.0000000', expected '20.0000000', error '0.0000000'

Test #10:

score: 0
Accepted
time: 158ms
memory: 31984kb

input:

200000
73204600 24 121394
70840000 24 121394
47968760 240024 121394
64273440 120024 121394
79576560 120024 121394
33743920 24 121394
54694640 240024 121394
49162120 24 121394
47922840 120024 121394
52479280 24 121394
44214240 120024 121394
50275960 24 121394
31178000 240024 121394
41601280 24 121394...

output:

839.99999999999659489047

result:

ok found '840.0000000', expected '840.0000000', error '0.0000000'

Test #11:

score: 0
Accepted
time: 154ms
memory: 32288kb

input:

200000
35653342 165323 94437
26771542 285323 94437
4756942 45323 94437
13627642 165323 94437
7167142 45323 94437
19329442 285323 94437
33239242 45323 94437
54683542 45323 94437
18524242 45323 94437
48264142 165323 94437
34339042 45323 94437
19541842 285323 94437
51369442 285323 94437
15747742 45323 ...

output:

899.99999999999777444692

result:

ok found '900.0000000', expected '900.0000000', error '0.0000000'

Test #12:

score: 0
Accepted
time: 152ms
memory: 30904kb

input:

200000
77963423 2 189363
80763602 90002 189363
62147316 270002 189363
76831446 90002 189363
49096202 90002 189363
47596218 90002 189363
59421365 180002 189363
43992063 2 189363
55785880 270002 189363
55261464 270002 189363
71506069 180002 189363
61324060 270002 189363
58567502 90002 189363
65030640 ...

output:

963.99999999999436262055

result:

ok found '964.0000000', expected '964.0000000', error '0.0000000'

Test #13:

score: 0
Accepted
time: 156ms
memory: 32992kb

input:

200000
19168665 49576 125869
1371081 139576 125869
34983833 49576 125869
5706121 139576 125869
14518985 139576 125869
60486601 139576 125869
39038825 319576 125869
13753913 229576 125869
15427209 139576 125869
68259865 49576 125869
59214057 319576 125869
71529177 49576 125869
50189961 139576 125869
...

output:

1471.99999999999696997932

result:

ok found '1472.0000000', expected '1472.0000000', error '0.0000000'

Test #14:

score: 0
Accepted
time: 171ms
memory: 31660kb

input:

200000
13446550 179999 43441
13807750 180005 43441
11164750 269995 43441
12608150 89995 43441
18435150 359996 43441
2654150 90000 43441
9774950 90001 43441
11040150 180004 43441
19532350 270002 43441
1535750 180003 43441
18015750 90001 43441
1495550 3 43441
1745750 89997 43441
9090150 89995 43441
12...

output:

106.23410880102558834920

result:

ok found '106.2341088', expected '106.2341088', error '0.0000000'

Test #15:

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

input:

8
145000 180000 100000000
165000 0 100000000
45000 0 1
170000 180000 100000000
75000 180000 99999999
105000 0 99999999
125000 359999 100000000
85000 90000 99999999

output:

20000.00000000000000000000

result:

ok found '20000.0000000', expected '20000.0000000', error '0.0000000'

Test #16:

score: 0
Accepted
time: 171ms
memory: 33816kb

input:

200000
3774800 89997 198673
2989100 270003 198673
7065000 89996 198673
4391800 179996 198673
6511200 180001 198673
5892700 4 198673
9807100 270000 198673
8111400 179997 198673
5298400 180002 198673
9650100 4 198673
3414300 270004 198673
8479500 270005 198673
6392900 269997 198673
9545800 180005 1986...

output:

147.36425078866926242915

result:

ok found '147.3642508', expected '147.3642508', error '0.0000000'

Test #17:

score: 0
Accepted
time: 171ms
memory: 31052kb

input:

200000
13760407 180007 88037
2213963 359999 88037
33273719 90004 88037
2395235 0 88037
6914295 180004 88037
23765311 179999 88037
14999099 2 88037
7290307 0 88037
9920935 90007 88037
24388843 5 88037
26692963 270005 88037
20387391 180008 88037
36396475 270007 88037
7343087 90002 88037
12413607 90008...

output:

200.00000000000000000000

result:

ok found '200.0000000', expected '200.0000000', error '0.0000000'

Test #18:

score: 0
Accepted
time: 175ms
memory: 31680kb

input:

200000
70225044 359997 196397
71892656 89996 196397
78572594 179996 196397
66259830 179996 196397
75200286 180000 196397
68257110 270000 196397
67495428 90004 196397
66818572 89999 196397
70716918 269994 196397
70003270 180004 196397
76307112 4 196397
69117926 269997 196397
71313036 359996 196397
72...

output:

200.00000000000000000000

result:

ok found '200.0000000', expected '200.0000000', error '0.0000000'

Test #19:

score: 0
Accepted
time: 156ms
memory: 31992kb

input:

200000
498463 1 106963
32927002 180001 106963
17520208 90001 106963
3675715 270001 106963
23088823 270001 106963
19089178 180001 106963
31716052 180001 106963
14775037 270001 106963
16201501 1 106963
14040043 1 106963
27507211 1 106963
22990894 90001 106963
11900347 1 106963
11643064 180001 106963
1...

output:

200.00000000000000000000

result:

ok found '200.0000000', expected '200.0000000', error '0.0000000'

Test #20:

score: 0
Accepted
time: 165ms
memory: 31804kb

input:

200000
71237693 89998 101936
73796162 179998 101936
72731339 89998 101936
62778257 359998 101936
72142880 269998 101936
65606231 89998 101936
62492057 89998 101936
75409217 89998 101936
62265164 269998 101936
75304595 359998 101936
69281993 359998 101936
59860130 179998 101936
62794157 359998 101936...

output:

200.00000000000000000000

result:

ok found '200.0000000', expected '200.0000000', error '0.0000000'

Test #21:

score: 0
Accepted
time: 180ms
memory: 31988kb

input:

200000
19630934 0 14726
7596230 359999 14726
16403919 89997 14726
4325193 179994 14726
24732932 269994 14726
6396504 359994 14726
22550554 1 14726
12025754 359997 14726
5568182 269997 14726
4936694 270001 14726
1460221 180000 14726
24582650 270000 14726
24027062 2 14726
5927442 359998 14726
11354292...

output:

199.99999999999999998612

result:

ok found '200.0000000', expected '200.0000000', error '0.0000000'

Test #22:

score: 0
Accepted
time: 165ms
memory: 31840kb

input:

200000
80302566 179993 97175
82479986 179992 97175
81372736 359993 97175
75735340 89997 97175
89023370 269994 97175
93610784 359991 97175
85555566 269997 97175
79492986 269992 97175
89273042 269999 97175
92728692 89991 97175
88953124 359992 97175
88309374 179996 97175
80352624 89999 97175
93528178 1...

output:

200.00000000000000000000

result:

ok found '200.0000000', expected '200.0000000', error '0.0000000'

Test #23:

score: 0
Accepted
time: 163ms
memory: 31344kb

input:

200000
8994697 89996 82567
5457625 179996 82567
1558477 269996 82567
117961 179996 82567
5030341 269996 82567
7342321 179996 82567
4590385 89996 82567
397273 89996 82567
2579761 179996 82567
5192305 179996 82567
7248469 359996 82567
1757665 89996 82567
3396313 179996 82567
2444197 359996 82567
44139...

output:

200.00000000000000000000

result:

ok found '200.0000000', expected '200.0000000', error '0.0000000'

Test #24:

score: 0
Accepted
time: 167ms
memory: 32624kb

input:

200000
75661093 89996 54962
70452603 359996 54962
68189128 179996 54962
67015118 179996 54962
62725893 89996 54962
62909783 89996 54962
69657843 359996 54962
67068768 179996 54962
75839618 269996 54962
70602453 359996 54962
76140058 269996 54962
63733958 179996 54962
77476683 359996 54962
75243363 8...

output:

200.00000000000000000000

result:

ok found '200.0000000', expected '200.0000000', error '0.0000000'

Test #25:

score: 0
Accepted
time: 80ms
memory: 20364kb

input:

191740
87625714 246213 74765539
5496046 69482 71261322
93465538 311040 72807547
93102395 133594 85841042
82674744 351605 37756335
61019180 218102 28141651
26091438 223994 79634258
24299643 94949 92452457
5845117 267364 8086209
83476160 156074 53409275
85858553 3043 37383077
41152995 331230 77939771
...

output:

0.00000000000000000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #26:

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

input:

8
6984 0 1
2999 0 1
5124 0 1
146 0 1
100000000 0 100000000
123 0 1
124 0 1
100000000 359999 1

output:

0.00000000000000000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #27:

score: 0
Accepted
time: 162ms
memory: 30312kb

input:

184811
1137701 109750 2539
1312234 70471 2539
886743 130514 2539
1149377 2983 2539
955168 103057 2539
1047264 194868 2539
1002945 320277 2539
1248560 78191 2539
1081936 279728 2539
1253346 205199 2539
1123565 117465 2539
932246 130255 2539
1372036 60736 2539
1177086 217459 2539
1130303 53555 2539
13...

output:

8.99999999999998580302

result:

ok found '9.0000000', expected '9.0000000', error '0.0000000'

Test #28:

score: 0
Accepted
time: 146ms
memory: 32236kb

input:

181774
98662813 43963 165886
60274551 145323 165886
60015043 210095 165886
77569361 156767 165886
417753 181372 165886
5778312 200004 165886
22949653 56926 165886
56327171 73817 165886
31103592 164889 165886
29588033 98174 165886
8404706 156658 165886
89428199 63084 165886
54750095 343787 165886
160...

output:

375.81955284219361243525

result:

ok found '375.8195528', expected '375.8195528', error '0.0000000'

Test #29:

score: 0
Accepted
time: 115ms
memory: 18668kb

input:

199477
99818698 248768 29697896
99891826 342455 2556929
99829915 197073 26501349
99953843 118234 89241847
99934560 182250 97405571
99961138 33890 23474748
99832507 197965 61131605
99920646 217472 69519534
99846232 263688 78115649
99917734 299606 74268956
99949038 47184 60883993
99889607 228234 66934...

output:

1.00000000000000000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #30:

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

input:

193367
196052 26895 83788
197105 178298 83788
196919 337675 83788
197350 131631 83788
197796 44801 83788
197201 281096 83788
196373 97271 83788
196315 116468 83788
197405 177962 83788
198670 80091 83788
196466 340512 83788
198145 59810 83788
198458 52787 83788
198722 331414 83788
197542 109187 83788...

output:

3.42171799849146100357

result:

ok found '3.4217180', expected '3.4217180', error '0.0000000'

Test #31:

score: 0
Accepted
time: 72ms
memory: 20796kb

input:

184496
1397616 7154 27886502
35945842 193604 23817420
68950930 257880 16869141
40998155 298114 36142113
96504700 106216 9120744
50449203 337034 52758519
635323 34223 94155940
78242648 319245 12766735
8208718 223493 90934461
81625371 45997 31141084
4233344 265800 12698917
21718865 226781 71848838
685...

output:

0.00000000000000000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #32:

score: 0
Accepted
time: 165ms
memory: 32956kb

input:

192268
991134 58430 37408
1170162 303150 37408
1040764 119135 37408
1311100 54008 37408
993224 266937 37408
1104353 101261 37408
1274263 74325 37408
1369701 313918 37408
1385866 234279 37408
817512 124114 37408
1106793 325107 37408
1197203 122462 37408
1215396 49894 37408
1070079 326905 37408
103758...

output:

15.00000000000004781679

result:

ok found '15.0000000', expected '15.0000000', error '0.0000000'

Test #33:

score: 0
Accepted
time: 155ms
memory: 30664kb

input:

187887
39394705 107953 78440
40698368 116306 78440
64283438 352631 78440
94330214 221289 78440
5233767 342284 78440
39368068 25810 78440
55087801 283134 78440
15731639 154120 78440
35987311 50368 78440
54342982 356486 78440
60239778 226517 78440
38672619 230012 78440
27653495 91124 78440
86430346 29...

output:

76.00000000000033053421

result:

ok found '76.0000000', expected '76.0000000', error '0.0000000'

Test #34:

score: 0
Accepted
time: 111ms
memory: 19772kb

input:

188703
99820058 292127 55008091
99938757 19744 41743676
99825358 246765 1595325
99869563 286581 29081115
99874496 294311 77894376
99918802 130108 83335137
99958178 80625 61269259
99974332 163342 23647781
99988760 236933 28943348
99923554 16858 42063206
99989222 197306 62478602
99882655 156024 555938...

output:

1.00000000000000000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #35:

score: 0
Accepted
time: 168ms
memory: 31728kb

input:

193793
197166 130026 95166
198613 212000 95166
197364 123134 95166
197581 218405 95166
196346 99855 95166
197372 33316 95166
197130 83752 95166
198373 133985 95166
196713 125300 95166
197944 132713 95166
197194 211984 95166
198038 56033 95166
197548 170538 95166
196110 356289 95166
198262 193830 951...

output:

3.42091514703554783671

result:

ok found '3.4209151', expected '3.4209151', error '0.0000000'

Test #36:

score: 0
Accepted
time: 91ms
memory: 18668kb

input:

200000
61201201 223996 72923604
31835712 131132 82871796
31825433 1538 47198162
47797733 63030 93305907
32029627 263807 52105202
34045020 352424 12794455
59093794 77383 14532472
16431196 93779 76385340
38661286 213929 33665739
43871694 225226 84247923
73038602 282547 34243405
2457179 40708 97881964
...

output:

0.00000000000000000000

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #37:

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

input:

2
13516 359999 1
76246435 0 100000000

output:

76232919.00000000000000000000

result:

ok found '76232919.0000000', expected '76232919.0000000', error '0.0000000'

Test #38:

score: 0
Accepted
time: 172ms
memory: 32700kb

input:

200000
64412961 14140 111576
69146907 342246 111576
82285026 120226 111576
82833275 128578 111576
26159892 167806 111576
33256021 263209 111576
38806206 245914 111576
95493024 224450 111576
4704222 307552 111576
34632518 178123 111576
52365226 215919 111576
53561775 114158 111576
33984108 139796 111...

output:

96.84826472058485306860

result:

ok found '96.8482647', expected '96.8482647', error '0.0000000'

Test #39:

score: 0
Accepted
time: 143ms
memory: 33824kb

input:

200000
1778 147152 99349
1778 206399 99349
1778 52065 99349
1778 9579 99349
1778 50674 99349
1778 335974 99349
1778 104618 99349
1778 303541 99349
1778 56829 99349
1778 291269 99349
1778 25870 99349
1778 104355 99349
1778 247002 99349
1778 72177 99349
1778 324803 99349
1778 327589 99349
1778 167061 ...

output:

0.03103195410006443819

result:

ok found '0.0310320', expected '0.0310320', error '0.0000000'

Test #40:

score: 0
Accepted
time: 124ms
memory: 21496kb

input:

200000
99872213 264681 59398502
99908419 5409 56472590
99857628 145476 49033107
99923558 80024 2192455
99933679 217563 16441423
99939873 178603 5804606
99947534 8255 87752832
99956608 202548 5409472
99887329 44051 93785288
99991616 47991 283028
99908804 52260 33288898
99883879 222282 27931528
998481...

output:

0.99999999999699811252

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #41:

score: 0
Accepted
time: 157ms
memory: 30156kb

input:

189568
194531 292969 58197
193785 347387 58197
196429 61049 58197
194349 248457 58197
192296 212175 58197
190048 155614 58197
191390 246268 58197
194955 22015 58197
195732 358584 58197
191227 286630 58197
194506 342745 58197
194693 263177 58197
190692 89675 58197
190317 291926 58197
193377 7681 5819...

output:

3.32403192025858833973

result:

ok found '3.3240319', expected '3.3240319', error '0.0000000'

Test #42:

score: 0
Accepted
time: 79ms
memory: 20940kb

input:

200000
99848551 285565 19895793
99932099 25317 45401691
99886884 22537 40299501
99854030 356329 67501547
99928089 196583 15125359
99825167 149368 81924365
99802146 182360 58980246
99905466 352801 89346336
99954638 117893 53276496
99927566 239670 22032774
99855363 256745 33147911
99915396 220022 5220...

output:

1.00000000000000000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #43:

score: 0
Accepted
time: 158ms
memory: 31720kb

input:

200000
99954525 231231 100000000
99977067 231231 100000000
99954547 231231 100000000
99810645 51231 100000000
99940823 51231 100000000
99883903 51231 100000000
99898389 51231 100000000
99998265 231231 100000000
99928593 51231 100000000
99967004 51231 100000000
99887868 51231 100000000
99802493 23123...

output:

0.99999999999381966858

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #44:

score: 0
Accepted
time: 149ms
memory: 31564kb

input:

200000
99910082 342413 100000000
99824430 342413 100000000
99816313 342413 100000000
99922969 162413 100000000
99975455 162413 100000000
99890789 342413 100000000
99810975 162413 100000000
99959593 342413 100000000
99856073 162413 100000000
99821513 162413 100000000
99955807 342413 100000000
9999720...

output:

0.99999999999407619884

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #45:

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

input:

2
100000000 180000 100000000
100000000 0 100000000

output:

200000000.00000000000000000000

result:

ok found '200000000.0000000', expected '200000000.0000000', error '0.0000000'

Test #46:

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

input:

3
100 180000 1
100 0 1
105 90000 1

output:

144.99999999999999555911

result:

ok found '145.0000000', expected '145.0000000', error '0.0000000'

Test #47:

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

input:

4
1020 180000 1
1090 0 1
1000 0 1
1040 100 1

output:

40.03958067165022758835

result:

ok found '40.0395807', expected '40.0395807', error '0.0000000'

Test #48:

score: 0
Accepted
time: 160ms
memory: 32144kb

input:

200000
99850987 180000 100000000
99851770 0 100000000
99951963 180000 100000000
99868056 180000 100000000
99958922 180000 100000000
99847612 180000 100000000
99996080 180000 100000000
99937148 180000 100000000
99896261 180000 100000000
99837414 0 100000000
99906531 180000 100000000
99834470 0 100000...

output:

1.00000000000000000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #49:

score: 0
Accepted
time: 193ms
memory: 32384kb

input:

200000
99860575 90000 100000000
99926410 90000 100000000
99952620 270000 100000000
99979559 90000 100000000
99970721 90000 100000000
99825469 90000 100000000
99983130 270000 100000000
99988708 90000 100000000
99908951 90000 100000000
99942835 270000 100000000
99815432 270000 100000000
99873830 27000...

output:

1.00000000000000000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'