QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#707087 | #4587. Stable Planetary System | arnold518# | AC ✓ | 282ms | 28436kb | C++17 | 2.5kb | 2024-11-03 14:38:32 | 2024-11-03 14:38:33 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long lint;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const double inf = 1e12, pi = 3.14159265358979;
using point = pair<double, double>;
#define x first
#define y second
int N;
vector<tuple<int, int, int>> a;
double dist(point a, point b) {
return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
double closest(vector<point>& v) {
if (v.size() <= 1) return inf;
int N = v.size();
int K = N / 2;
sort(v.begin(), v.end());
vector<point> v1, v2;
for (int i=0; i<K; i++) v1.push_back(v[i]);
for (int i=K; i<N; i++) v2.push_back(v[i]);
double ans = min(closest(v1), closest(v2));
double xmid = v2[0].x;
vector<point> v1p, v2p;
for (auto [x, y] : v1) if (abs(xmid - x) <= ans) v1p.emplace_back(x, y);
for (auto [x, y] : v2) if (abs(xmid - x) <= ans) v2p.emplace_back(x, y);
v1 = v1p;
v2 = v2p;
sort(v1.begin(), v1.end(), [](point a, point b) { return a.y < b.y; });
sort(v2.begin(), v2.end(), [](point a, point b) { return a.y < b.y; });
double ans2 = inf;
for (int i=0, l=0, r=0; i<v1.size(); i++) {
while (l < v2.size() and v2[l].y < v1[i].y - ans) l++;
while (r < v2.size() and v2[r].y <= v1[i].y + ans) r++;
for (int j=l; j<r; j++) ans2 = min(ans2, dist(v1[i], v2[j]));
}
return min(ans, ans2);
}
int main()
{
ios_base::sync_with_stdio(false); cin.tie(NULL);
cin >> N;
for (int i=0; i<N; i++) {
int r, theta, t;
cin >> r >> theta >> t;
a.emplace_back(t, r, theta);
}
sort(a.begin(), a.end());
multiset<int> rs;
for (int i=0; i<N; i++) rs.insert(get<1>(a[i]));
double ans = inf;
for (int i=0; i<N; ) {
int j = i;
while (j<N and get<0>(a[i]) == get<0>(a[j])) j++;
for (int k=i; k<j; k++) rs.erase(rs.lower_bound(get<1>(a[k])));
for (int k=i; k<j; k++) {
auto it = rs.lower_bound(get<1>(a[k]));
if (it != rs.end()) ans = min(ans, (double)(*it - get<1>(a[k])));
if (it != rs.begin()) ans = min(ans, (double)(get<1>(a[k]) - *prev(it)));
}
for (int k=i; k<j; k++) rs.insert(get<1>(a[k]));
vector<point> pts;
for (int k=i; k<j; k++) {
auto [t, r, theta] = a[k];
pts.emplace_back(r * cos(theta / 180000.0 * pi), r * sin(theta / 180000.0 * pi));
}
ans = min(ans, closest(pts));
i = j;
}
cout << setprecision(10) << fixed;
cout << ans << '\n';
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 4176kb
input:
3 1 55555 4 3 180000 4 4 0 2
output:
1.0000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #2:
score: 0
Accepted
time: 0ms
memory: 4040kb
input:
3 100 0 2 100 270000 1 9 2000 3
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3916kb
input:
2 10 0 2 1 90000 2
output:
10.0498756211
result:
ok found '10.0498756', expected '10.0498756', error '0.0000000'
Test #4:
score: 0
Accepted
time: 0ms
memory: 4104kb
input:
2 100000000 359999 100000000 100000000 0 99999999
output:
0.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #5:
score: 0
Accepted
time: 0ms
memory: 4180kb
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.9999999924
result:
ok found '200.0000000', expected '200.0000000', error '0.0000000'
Test #6:
score: 0
Accepted
time: 282ms
memory: 25224kb
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.9999999996
result:
ok found '20.0000000', expected '20.0000000', error '0.0000000'
Test #7:
score: 0
Accepted
time: 183ms
memory: 24992kb
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.9999999998
result:
ok found '20.0000000', expected '20.0000000', error '0.0000000'
Test #8:
score: 0
Accepted
time: 277ms
memory: 26260kb
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.9999999998
result:
ok found '20.0000000', expected '20.0000000', error '0.0000000'
Test #9:
score: 0
Accepted
time: 185ms
memory: 25384kb
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.9999999996
result:
ok found '20.0000000', expected '20.0000000', error '0.0000000'
Test #10:
score: 0
Accepted
time: 184ms
memory: 25196kb
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.9999999847
result:
ok found '840.0000000', expected '840.0000000', error '0.0000000'
Test #11:
score: 0
Accepted
time: 187ms
memory: 24904kb
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.9999999937
result:
ok found '900.0000000', expected '900.0000000', error '0.0000000'
Test #12:
score: 0
Accepted
time: 200ms
memory: 26296kb
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.9999999913
result:
ok found '964.0000000', expected '964.0000000', error '0.0000000'
Test #13:
score: 0
Accepted
time: 190ms
memory: 25292kb
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.9999999935
result:
ok found '1472.0000000', expected '1472.0000000', error '0.0000000'
Test #14:
score: 0
Accepted
time: 246ms
memory: 25904kb
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.2341088010
result:
ok found '106.2341088', expected '106.2341088', error '0.0000000'
Test #15:
score: 0
Accepted
time: 0ms
memory: 4068kb
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.0000000000
result:
ok found '20000.0000000', expected '20000.0000000', error '0.0000000'
Test #16:
score: 0
Accepted
time: 253ms
memory: 25400kb
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.3642507887
result:
ok found '147.3642508', expected '147.3642508', error '0.0000000'
Test #17:
score: 0
Accepted
time: 240ms
memory: 25528kb
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.0000000000
result:
ok found '200.0000000', expected '200.0000000', error '0.0000000'
Test #18:
score: 0
Accepted
time: 224ms
memory: 25456kb
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.0000000000
result:
ok found '200.0000000', expected '200.0000000', error '0.0000000'
Test #19:
score: 0
Accepted
time: 200ms
memory: 25764kb
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.0000000000
result:
ok found '200.0000000', expected '200.0000000', error '0.0000000'
Test #20:
score: 0
Accepted
time: 199ms
memory: 26376kb
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.0000000000
result:
ok found '200.0000000', expected '200.0000000', error '0.0000000'
Test #21:
score: 0
Accepted
time: 248ms
memory: 26164kb
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:
200.0000000000
result:
ok found '200.0000000', expected '200.0000000', error '0.0000000'
Test #22:
score: 0
Accepted
time: 209ms
memory: 25052kb
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.0000000000
result:
ok found '200.0000000', expected '200.0000000', error '0.0000000'
Test #23:
score: 0
Accepted
time: 203ms
memory: 26024kb
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.0000000000
result:
ok found '200.0000000', expected '200.0000000', error '0.0000000'
Test #24:
score: 0
Accepted
time: 209ms
memory: 26144kb
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.0000000000
result:
ok found '200.0000000', expected '200.0000000', error '0.0000000'
Test #25:
score: 0
Accepted
time: 181ms
memory: 14312kb
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.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #26:
score: 0
Accepted
time: 0ms
memory: 4008kb
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.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #27:
score: 0
Accepted
time: 205ms
memory: 23944kb
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:
9.0000000001
result:
ok found '9.0000000', expected '9.0000000', error '0.0000000'
Test #28:
score: 0
Accepted
time: 199ms
memory: 23676kb
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.8195528422
result:
ok found '375.8195528', expected '375.8195528', error '0.0000000'
Test #29:
score: 0
Accepted
time: 141ms
memory: 14960kb
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.0000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #30:
score: 0
Accepted
time: 211ms
memory: 24452kb
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.4217179985
result:
ok found '3.4217180', expected '3.4217180', error '0.0000000'
Test #31:
score: 0
Accepted
time: 187ms
memory: 13852kb
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.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #32:
score: 0
Accepted
time: 214ms
memory: 24876kb
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.0000000002
result:
ok found '15.0000000', expected '15.0000000', error '0.0000000'
Test #33:
score: 0
Accepted
time: 212ms
memory: 24644kb
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:
75.9999999998
result:
ok found '76.0000000', expected '76.0000000', error '0.0000000'
Test #34:
score: 0
Accepted
time: 133ms
memory: 14224kb
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.0000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #35:
score: 0
Accepted
time: 212ms
memory: 25488kb
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.4209151470
result:
ok found '3.4209151', expected '3.4209151', error '0.0000000'
Test #36:
score: 0
Accepted
time: 196ms
memory: 14876kb
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.0000000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #37:
score: 0
Accepted
time: 0ms
memory: 4188kb
input:
2 13516 359999 1 76246435 0 100000000
output:
76232919.0000000000
result:
ok found '76232919.0000000', expected '76232919.0000000', error '0.0000000'
Test #38:
score: 0
Accepted
time: 231ms
memory: 25672kb
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.8482647207
result:
ok found '96.8482647', expected '96.8482647', error '0.0000000'
Test #39:
score: 0
Accepted
time: 198ms
memory: 25176kb
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.0310319541
result:
ok found '0.0310320', expected '0.0310320', error '0.0000000'
Test #40:
score: 0
Accepted
time: 148ms
memory: 14812kb
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.9999999993
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #41:
score: 0
Accepted
time: 211ms
memory: 24900kb
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.3240319204
result:
ok found '3.3240319', expected '3.3240319', error '0.0000000'
Test #42:
score: 0
Accepted
time: 204ms
memory: 15032kb
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.0000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #43:
score: 0
Accepted
time: 195ms
memory: 24820kb
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.9999999947
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #44:
score: 0
Accepted
time: 196ms
memory: 25600kb
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.9999999956
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #45:
score: 0
Accepted
time: 0ms
memory: 4040kb
input:
2 100000000 180000 100000000 100000000 0 100000000
output:
200000000.0000000000
result:
ok found '200000000.0000000', expected '200000000.0000000', error '0.0000000'
Test #46:
score: 0
Accepted
time: 0ms
memory: 4020kb
input:
3 100 180000 1 100 0 1 105 90000 1
output:
145.0000000000
result:
ok found '145.0000000', expected '145.0000000', error '0.0000000'
Test #47:
score: 0
Accepted
time: 0ms
memory: 4084kb
input:
4 1020 180000 1 1090 0 1 1000 0 1 1040 100 1
output:
40.0395806717
result:
ok found '40.0395807', expected '40.0395807', error '0.0000000'
Test #48:
score: 0
Accepted
time: 201ms
memory: 25336kb
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.0000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #49:
score: 0
Accepted
time: 219ms
memory: 28436kb
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.0000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'