QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#374980 | #3055. Laser Cutter | SolitaryDream# | AC ✓ | 8ms | 4740kb | C++17 | 1.7kb | 2024-04-02 20:24:41 | 2024-04-02 20:24:42 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
const int N = 305;
int n;
const double NOT = -1e100;
const double INF = 1e100;
double w[N][N], lx[N], ly[N], slk[N];
int pre[N], vy[N], lk[N];
inline double Dis(pii a, pii b) {
return hypot(a.first - b.first, a.second - b.second);
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout << fixed << setprecision(15);
cin >> n;
int x0, y0;
cin >> x0 >> y0;
for (int i = 0; i <= n; ++i) lk[i] = pre[i] = lx[i] = ly[i] = slk[i] = 0;
vector<pii> a(n + 1), b(n + 1);
double slen = 0;
for (int i = 1; i <= n; ++i) {
cin >> a[i].first >> a[i].second;
cin >> b[i].first >> b[i].second;
slen += Dis(a[i], b[i]);
}
for (int i = 1; i <= n; ++i)
for (int j = 1; j <= n; ++j)
w[i][j] = -Dis(a[i], b[j]);
for (int i = 1; i <= n; ++i) for (int j = 1; j <= n; ++j) lx[i] = max(lx[i], w[i][j]);
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= n; ++j) slk[j] = INF, vy[j] = 0;
int py = 0, p;
for (lk[py] = i; lk[py]; py = p) {
vy[py] = 1;
double d = INF;
int x = lk[py];
for (int y = 1; y <= n; ++y) if (!vy[y]) {
if (lx[x] + ly[y] - w[x][y] < slk[y]) slk[y] = lx[x] + ly[y] - w[x][y], pre[y] = py;
if (slk[y] < d) d = slk[y], p = y;
}
for (int y = 0; y <= n; ++y) if (vy[y]) lx[lk[y]] -= d, ly[y] += d; else slk[y] -= d;
}
for (; py; py = pre[py]) lk[py] = lk[pre[py]];
}
for (int i = 1; i <= n; ++i) {
slen -= lx[i] + ly[i];
}
cout << slen << endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3916kb
input:
3 0 1 0 0 0 1 0 1 0 2 0 2 0 3
output:
6.000000000000000
result:
ok - 1 values
Test #2:
score: 0
Accepted
time: 1ms
memory: 3948kb
input:
2 0 1 0 0 0 2 -1 1 1 1
output:
6.828427124746190
result:
ok - 1 values
Test #3:
score: 0
Accepted
time: 1ms
memory: 4012kb
input:
5 0 0 0 0 1 0 1 1 -1 1 -1 1 -1 -1 -1 -1 1 -1 1 -1 1 1
output:
10.000000000000000
result:
ok - 1 values
Test #4:
score: 0
Accepted
time: 1ms
memory: 3952kb
input:
13 -50 -35 -47 13 -47 -7 -81 -25 78 62 54 -35 -4 83 -17 0 62 50 -65 -9 99 -43 -47 91 -50 -35 54 13 37 92 53 53 -12 89 -56 -74 60 53 -20 84 -19 -59 44 22 -70 -36 -69 -71 23 87 47 -55 -48 -8
output:
2154.840916479528460
result:
ok - 1 values
Test #5:
score: 0
Accepted
time: 0ms
memory: 4004kb
input:
44 43 14 43 14 35 -86 88 -51 -90 48 70 42 -9 -63 60 43 80 11 -57 -48 42 -45 -16 81 71 40 16 70 -55 92 -78 -34 43 -28 20 83 -68 5 -3 93 -99 12 76 -72 -21 -29 74 -51 81 13 -17 62 6 -28 -22 15 33 -61 12 -70 -59 -46 -93 5 96 10 33 -12 -96 -67 -88 -90 88 90 60 11 72 -47 75 -24 70 78 60 -43 2 -84 -17 21 8...
output:
6344.477755413188788
result:
ok - 1 values
Test #6:
score: 0
Accepted
time: 1ms
memory: 3972kb
input:
7 52 3 52 3 -42 70 59 87 37 -89 -2 -73 58 13 -88 21 17 -91 54 -36 -42 -85 -63 -49 -71 19 -53 -18 35 9
output:
1140.833600037073893
result:
ok - 1 values
Test #7:
score: 0
Accepted
time: 1ms
memory: 4004kb
input:
20 20 81 61 36 -63 4 -16 53 54 22 94 -67 -83 26 57 0 -27 -89 7 -10 72 -15 -1 -89 17 -38 39 50 -89 -37 -49 1 96 84 -39 67 37 -95 65 -83 81 97 -4 79 42 8 78 75 -69 -11 96 -17 56 15 58 99 -79 16 -91 31 51 95 17 79 37 -4 46 38 33 69 21 -28 -65 53 93 81 -44 81 13 39 43 96
output:
3065.371920828558359
result:
ok - 1 values
Test #8:
score: 0
Accepted
time: 0ms
memory: 4084kb
input:
33 30 30 70 25 61 -41 81 6 4 43 -46 -73 9 49 88 14 -65 -80 -69 14 6 -4 9 -71 -64 54 -97 -84 16 39 -96 -62 -8 -15 33 13 -24 81 -20 -12 -79 -73 4 -58 -40 -80 6 6 30 -92 50 47 -88 -57 -45 40 79 -77 -56 -7 -85 -94 30 30 93 100 -17 89 94 71 -17 42 -52 -83 -84 -100 -70 60 -73 55 46 -38 -42 -65 88 -55 9 -4...
output:
4485.571380213595148
result:
ok - 1 values
Test #9:
score: 0
Accepted
time: 1ms
memory: 3952kb
input:
46 67 -35 -1 50 -97 -65 67 -35 -70 75 -84 1 20 61 67 46 -99 18 45 35 17 74 -36 -19 39 19 47 -22 -49 72 -85 8 79 39 83 53 -57 42 16 -98 67 98 91 -18 -73 53 8 11 9 -25 15 86 -81 -100 -79 0 -28 22 84 9 37 6 69 83 -6 6 -57 51 -78 10 51 -85 15 17 72 4 38 -14 40 -81 40 -6 -29 -99 14 19 25 6 67 4 40 22 -98...
output:
6641.772650476135823
result:
ok - 1 values
Test #10:
score: 0
Accepted
time: 1ms
memory: 3988kb
input:
9 -87 -30 8 39 27 91 46 -74 4 66 13 56 -19 19 -2 -65 38 48 -20 -87 11 -37 100 -45 23 8 25 100 -53 -93 74 -68 -49 -21 -87 -30 -44 -97
output:
1375.809659653546532
result:
ok - 1 values
Test #11:
score: 0
Accepted
time: 1ms
memory: 3948kb
input:
22 72 31 17 72 6 25 -49 -1 47 48 64 -58 -54 45 -24 18 77 -35 20 48 -55 32 96 -82 -90 80 73 39 5 43 -88 42 -4 -4 -52 60 86 48 93 -21 15 81 29 47 -33 -24 52 -76 41 80 34 91 -39 8 17 99 46 75 23 -78 -84 60 94 74 85 -33 97 -85 52 31 -59 -38 65 68 79 27 -47 99 -22 -29 93 46 -16 47 -2 46 -7 -55 -91 46
output:
3560.008698663591076
result:
ok - 1 values
Test #12:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
35 -35 62 26 61 -71 -20 -31 -95 -26 92 6 -45 -82 77 42 -76 -43 -80 76 56 -49 48 36 -40 -60 -74 -35 -16 -7 45 32 23 -88 -38 78 -99 56 69 -5 89 62 -92 54 -95 -35 62 63 30 -93 -85 74 -84 17 61 -6 -75 -72 82 93 85 10 -70 -30 -9 75 -10 66 -32 -98 50 -88 45 -52 -71 -74 38 -23 -95 -7 -92 -44 51 -72 -87 78 ...
output:
6245.699544836762470
result:
ok - 1 values
Test #13:
score: 0
Accepted
time: 0ms
memory: 3972kb
input:
13 -52 -42 -86 -100 -49 3 -48 -48 -84 -85 -75 35 -55 -37 55 51 -98 -63 -97 -16 45 11 -14 29 1 -47 -22 -86 -100 -88 -73 -25 -74 -81 -18 -84 -61 -17 27 -70 -39 -61 -100 -36 20 -51 55 57 -14 -95 -23 -61 37 -17
output:
1769.011203655807549
result:
ok - 1 values
Test #14:
score: 0
Accepted
time: 1ms
memory: 4028kb
input:
28 -42 30 -77 92 -50 -42 -99 -13 -36 -28 53 79 -90 63 -6 69 -88 -62 77 93 -81 7 -40 33 71 -83 -80 -50 55 -2 40 98 43 33 84 -37 49 93 -37 90 67 8 58 -34 -28 81 80 -42 27 -97 -29 79 71 -21 91 -16 26 71 55 23 44 -46 -97 -58 -54 -14 -73 -15 23 -23 -35 -99 40 -25 15 -85 -39 18 34 -80 -54 13 -42 47 -42 12...
output:
4126.473197451005035
result:
ok - 1 values
Test #15:
score: 0
Accepted
time: 1ms
memory: 3968kb
input:
39 32 -9 -68 -78 54 93 15 -53 16 41 78 52 -73 48 73 13 -33 -89 -88 22 89 36 -1 -76 -77 75 -77 -24 -17 -61 93 82 -10 5 -1 -16 46 -81 -89 53 -20 -26 -17 -36 -10 -64 -9 2 -51 -92 10 -77 89 21 46 46 16 -97 -77 10 -76 -46 38 -6 58 41 -84 -84 -2 -1 100 -40 -59 -89 3 -87 -43 -71 22 -92 84 -9 -99 -63 10 -29...
output:
5992.309420289854643
result:
ok - 1 values
Test #16:
score: 0
Accepted
time: 0ms
memory: 3928kb
input:
4 99 -89 -59 -87 53 48 -88 68 31 -9 99 -89 39 48 -79 18 51 -44
output:
1059.563678864160693
result:
ok - 1 values
Test #17:
score: 0
Accepted
time: 0ms
memory: 3996kb
input:
15 33 49 71 -64 20 24 24 42 25 -36 75 38 38 -46 38 -19 -16 68 21 -99 66 49 57 -57 39 70 -66 -83 37 51 -50 -31 16 28 35 -21 -34 -94 -57 -48 70 -32 17 82 -90 -75 -62 -5 59 -33 68 67 -23 75 65 53 25 48 -25 -52 35 3
output:
2271.365215705829996
result:
ok - 1 values
Test #18:
score: 0
Accepted
time: 1ms
memory: 4004kb
input:
30 34 -33 80 -73 19 -21 97 -8 -88 -91 55 77 58 -42 83 -52 31 53 -48 57 -69 -87 -14 88 -74 -87 92 33 -36 -61 -21 -42 -41 66 42 -45 -76 -65 63 -8 -17 -65 31 -96 25 92 7 92 78 50 79 -94 12 -1 72 71 -86 -55 97 32 -75 82 81 35 83 -89 65 -40 100 -84 8 53 -1 97 50 -57 -69 -53 58 20 -68 0 -44 -26 -8 -49 82 ...
output:
5162.541908751877600
result:
ok - 1 values
Test #19:
score: 0
Accepted
time: 1ms
memory: 4028kb
input:
41 -22 -19 89 -42 -78 -87 90 37 -27 -75 37 63 87 5 81 -82 -90 67 86 17 -32 62 17 28 -48 95 96 -40 -58 -92 -20 16 23 -35 -14 14 95 -41 -70 10 -25 69 -23 15 -12 11 -82 -81 -48 -84 -75 -83 -61 8 -90 67 33 -77 95 54 -30 -100 91 68 17 -74 -52 37 23 76 -86 -35 7 43 75 68 -27 -78 68 37 -45 25 83 -72 29 -26...
output:
6376.644367175165826
result:
ok - 1 values
Test #20:
score: 0
Accepted
time: 0ms
memory: 3976kb
input:
6 25 63 98 -51 -79 69 -89 35 -68 80 90 28 -71 -32 62 -78 25 63 18 -44 -94 44 -70 -25 71 71
output:
1447.384112977647419
result:
ok - 1 values
Test #21:
score: 0
Accepted
time: 0ms
memory: 4028kb
input:
34 -96 -45 -14 -41 15 -27 -83 30 89 -89 19 -71 -10 -38 -46 -100 47 26 20 92 -92 -58 -100 4 -62 16 -54 7 -70 88 72 -42 27 -60 -22 -46 -98 -58 59 17 -30 -35 -2 -92 90 -30 -82 -25 -83 -47 52 -100 -12 82 75 -15 -21 48 -26 -11 -14 -44 -7 94 -8 14 18 3 44 -100 -29 8 -94 35 53 0 51 60 -40 -18 -71 60 31 59 ...
output:
4473.727827117970264
result:
ok - 1 values
Test #22:
score: 0
Accepted
time: 1ms
memory: 3984kb
input:
47 -22 -22 -5 -52 -62 -72 -36 -83 42 11 75 100 -62 -80 22 -59 -54 -6 -11 -3 36 -64 -14 -87 47 53 91 96 25 63 -94 -86 72 36 -14 -46 -31 -93 -24 -66 -64 -15 64 39 69 -10 -31 35 -13 -79 -35 14 15 30 90 -7 -92 15 100 -10 -84 -89 6 -45 -53 12 6 -1 45 38 -41 -39 51 50 -7 -22 88 11 -82 -56 51 -27 61 -13 -2...
output:
6462.351741273348125
result:
ok - 1 values
Test #23:
score: 0
Accepted
time: 1ms
memory: 3964kb
input:
14 -20 -60 4 -23 69 63 -48 76 37 -2 -68 -38 51 -13 71 8 54 85 88 -36 -46 -7 74 -2 36 -39 91 13 -2 -98 83 67 -76 -37 -18 -83 -32 78 52 42 -34 -90 64 76 -50 34 -49 23 32 0 48 -66 50 64 86 35 42 -73
output:
2194.269670292160754
result:
ok - 1 values
Test #24:
score: 0
Accepted
time: 4ms
memory: 4304kb
input:
203 100 -588 460 -5 -32 -817 342 -563 -590 -106 146 80 -738 -739 682 928 -627 -352 -924 776 357 28 280 305 -977 -955 -57 478 74 261 -520 200 -99 -77 -791 650 373 -427 178 454 -301 268 846 644 -15 -656 750 744 26 -106 -94 -561 876 -696 800 52 -598 -553 961 -65 -105 573 946 -562 -442 -469 -355 -380 -4...
output:
236913.590660143789137
result:
ok - 1 values
Test #25:
score: 0
Accepted
time: 8ms
memory: 4628kb
input:
300 -60 -206 -623 -211 980 -848 415 -547 -484 -693 -476 -831 -429 -635 -459 913 -559 -832 428 -996 -499 -146 -679 806 -85 -523 -633 -351 716 -68 -273 -559 130 -19 467 245 -599 -343 510 885 -876 537 154 774 -351 976 -172 465 942 -131 244 -568 -717 500 -805 720 -876 -133 -468 194 211 233 -960 -772 822...
output:
340476.888940476346761
result:
ok - 1 values
Test #26:
score: 0
Accepted
time: 3ms
memory: 4616kb
input:
289 -832 -527 880 285 -177 400 967 121 -103 776 68 481 482 -296 -545 851 445 -68 368 528 335 -34 -786 -495 891 773 158 20 654 404 543 626 736 -875 784 -390 -451 -687 422 -420 891 -444 -331 -915 581 880 -227 606 -112 216 290 -506 -43 -6 -455 813 -767 100 -421 -938 391 -277 -995 566 632 -182 -507 -56 ...
output:
336419.979440668073948
result:
ok - 1 values
Test #27:
score: 0
Accepted
time: 6ms
memory: 4688kb
input:
278 238 -157 382 798 24 658 134 594 -153 903 -84 908 596 686 -915 217 647 867 74 726 944 -811 611 -217 -979 -42 -314 -11 -707 -645 158 588 -399 589 146 -95 -171 711 -529 764 -384 -698 -879 -689 -140 -45 471 702 -120 51 -333 -281 -242 -59 -642 841 870 364 218 -48 -725 814 -974 892 -169 -793 -255 318 ...
output:
337492.840079513727687
result:
ok - 1 values
Test #28:
score: 0
Accepted
time: 6ms
memory: 4608kb
input:
267 -259 -353 -116 -707 868 -95 279 53 972 -681 527 -785 26 -197 656 366 398 -375 912 173 348 -331 558 148 -298 -762 -144 193 942 -447 238 756 -85 -550 -548 -22 584 -182 -6 144 -525 -728 719 -433 -226 -237 -259 -340 -259 -968 -101 32 260 -442 -418 -363 -186 -767 171 -696 570 -383 34 -688 667 701 877...
output:
324209.271218437643256
result:
ok - 1 values
Test #29:
score: 0
Accepted
time: 6ms
memory: 4480kb
input:
256 945 -901 -640 -202 -868 142 -946 -167 417 946 -956 -61 573 150 -128 831 -364 -470 -368 700 -265 249 -983 564 -121 -271 -506 324 170 -877 -272 199 -164 -385 570 54 64 115 473 -441 -727 774 -15 -180 87 -947 242 -252 -938 704 -973 886 107 -835 -983 132 -849 -820 250 215 -551 231 -837 -105 -766 867 ...
output:
306435.996707935992163
result:
ok - 1 values
Test #30:
score: 0
Accepted
time: 6ms
memory: 4512kb
input:
245 324 -503 863 294 -24 -611 123 -926 530 641 617 209 -36 114 527 -195 -570 -254 -693 -614 -126 629 -695 709 128 -49 865 31 328 -69 -17 -628 755 -269 592 245 -498 200 -2 540 824 -376 -194 882 128 -778 564 729 52 335 84 282 -980 584 -670 609 719 -236 671 -628 -13 822 -993 -197 -72 516 -229 -15 630 7...
output:
298006.016568596067373
result:
ok - 1 values
Test #31:
score: 0
Accepted
time: 4ms
memory: 4488kb
input:
234 -529 -103 365 807 177 -353 614 -301 -887 266 -600 988 734 -867 -694 -24 731 -570 -84 363 281 148 565 911 94 265 -452 536 9 481 522 -216 -181 544 162 281 138 -966 424 862 847 448 137 -46 254 561 469 69 -781 -817 803 275 -181 18 454 -386 -137 871 -803 395 159 744 -777 -231 -106 691 -707 75 455 -97...
output:
272144.536268214578740
result:
ok - 1 values
Test #32:
score: 0
Accepted
time: 5ms
memory: 4440kb
input:
223 -695 -21 -133 -698 -980 895 -747 -798 152 278 -364 -922 -583 951 537 -763 -66 442 -504 647 -642 -105 -649 53 38 -449 663 -96 -313 162 -716 -737 453 120 495 -9 93 -283 77 -858 575 -407 876 471 -177 -755 -663 94 -752 893 525 816 -855 635 243 220 385 -841 -679 912 -187 214 -818 500 418 277 605 25 7...
output:
269285.366814247390721
result:
ok - 1 values
Test #33:
score: 0
Accepted
time: 4ms
memory: 4496kb
input:
227 325 -365 -605 -178 386 -813 981 860 -130 -549 -387 -948 545 -515 -444 243 843 2 384 -76 -960 331 837 365 -601 -595 998 -39 -421 -191 -876 71 160 -474 637 276 -362 888 173 5 396 362 679 530 -956 892 18 -254 -239 700 -497 761 -154 486 572 -695 446 -490 50 -679 760 -921 420 464 591 24 408 -546 -190...
output:
268760.806250015506521
result:
ok - 1 values
Test #34:
score: 0
Accepted
time: 3ms
memory: 4492kb
input:
218 484 416 898 320 -677 435 484 241 -214 980 -463 -671 635 798 47 780 -466 -851 -9 134 -969 -598 -316 784 889 -324 334 113 -127 463 -624 -614 114 -635 -64 -616 -962 826 -792 -141 -506 157 -232 719 486 -193 11 -589 -262 -893 307 906 -676 417 446 -127 185 -22 -220 -690 985 655 -831 -762 104 553 -358 ...
output:
246782.956572395865805
result:
ok - 1 values
Test #35:
score: 0
Accepted
time: 4ms
memory: 4456kb
input:
205 4 293 400 831 -570 693 -19 937 602 -774 704 -415 -566 513 64 -159 709 284 880 5 -545 511 -548 696 -601 -541 -33 -757 735 406 -716 -494 623 666 -392 -521 757 -139 -238 -369 -845 -355 -627 165 725 -776 -89 -269 765 -510 678 -411 -842 -449 137 -986 -553 801 -349 923 -990 -346 347 668 -609 -107 -552...
output:
244964.907886284985580
result:
ok - 1 values
Test #36:
score: 0
Accepted
time: 3ms
memory: 4432kb
input:
196 466 573 -98 -672 368 -60 342 -794 -759 846 -973 546 528 -449 -78 542 240 -910 -704 167 -101 105 -676 887 139 -356 -539 264 -425 -374 -11 -172 353 146 326 442 -983 -477 -818 -692 957 461 -656 672 -640 -659 -815 -641 -231 -308 -812 -316 645 -623 207 16 107 131 -575 -87 -403 718 215 -633 632 -335 5...
output:
246062.933679006819148
result:
ok - 1 values
Test #37:
score: 0
Accepted
time: 0ms
memory: 4280kb
input:
183 -530 472 -622 -169 539 177 477 725 -727 -574 233 980 695 -436 -870 990 -6 -89 -930 -684 354 850 -321 478 478 -807 329 -45 -967 308 -888 375 -242 -893 -919 361 -102 -183 877 766 -154 792 347 -364 -467 129 -400 959 80 -189 261 934 696 415 495 -475 -733 862 -962 -962 -742 699 -356 -852 -641 -226 13...
output:
232140.699975179828471
result:
ok - 1 values
Test #38:
score: 0
Accepted
time: 3ms
memory: 4420kb
input:
174 -549 459 881 329 -524 -576 -790 228 -88 -546 23 50 -241 -508 -778 975 785 -116 -873 -765 362 -248 256 -743 -631 598 -920 996 698 617 970 -332 -913 143 -880 272 980 476 -788 -829 934 942 663 -18 -56 -711 -688 479 961 -292 -183 192 -102 837 -620 -74 -800 804 188 906 -204 635 -456 -261 -824 750 -72...
output:
215858.295357792638242
result:
ok - 1 values
Test #39:
score: 0
Accepted
time: 2ms
memory: 4332kb
input:
161 -974 974 383 840 -417 -318 -784 549 35 -585 743 539 -881 636 -251 -102 -548 -263 -134 826 -684 434 -816 683 808 -505 739 -475 -627 -278 -606 514 524 -258 203 327 773 963 606 -513 -152 194 -865 -52 600 -815 880 -420 -207 434 -358 558 397 348 860 632 -803 -802 -544 -272 9 896 846 -874 -940 -524 -9...
output:
205762.824833783961367
result:
ok - 1 values
Test #40:
score: 0
Accepted
time: 2ms
memory: 4376kb
input:
152 -632 88 -115 -663 521 930 818 -810 -785 561 -520 -495 336 -845 195 434 699 -633 -205 -872 675 419 288 247 153 617 -998 -838 -215 942 -799 -579 -532 288 -989 -778 -549 520 720 606 267 -593 -59 -92 -918 188 740 -970 -555 165 -39 794 99 -364 -352 -143 54 573 -351 -877 180 -50 961 770 -994 902 -447 ...
output:
179998.814824839035282
result:
ok - 1 values
Test #41:
score: 0
Accepted
time: 5ms
memory: 4580kb
input:
273 -211 187 -587 -173 624 -882 879 573 -802 -815 237 392 729 -955 466 704 611 -478 -317 -53 301 300 579 -201 -217 326 795 930 -199 313 -70 -316 637 570 462 45 -860 -550 -876 157 455 594 -99 438 96 13 632 -768 -480 553 -216 699 745 246 -842 -36 23 545 -878 -628 477 432 -629 -352 -606 -906 -640 -123 ...
output:
316054.299608264118433
result:
ok - 1 values
Test #42:
score: 0
Accepted
time: 6ms
memory: 4592kb
input:
262 730 -100 916 323 -533 366 802 992 -606 -774 -157 3 260 929 -7 540 932 585 -241 -75 168 463 372 621 -406 -31 -161 136 354 -152 797 814 780 -408 -183 -879 822 601 204 97 -39 842 -819 -668 61 550 751 -209 972 -171 769 -240 -189 263 -987 -797 351 619 -320 -903 785 446 -743 555 454 309 -233 -471 -32 ...
output:
323978.893113193218596
result:
ok - 1 values
Test #43:
score: 0
Accepted
time: 4ms
memory: 4576kb
input:
255 -390 -404 418 832 -144 624 -92 993 152 -604 695 916 -159 90 920 856 -457 131 -327 754 -56 642 298 -572 877 946 797 -205 467 279 411 675 -388 502 404 53 810 -391 150 -325 724 504 394 -71 -391 792 -782 -869 564 550 221 635 -851 -72 555 -290 987 255 640 385 -909 847 -975 -731 729 -529 920 -915 -292...
output:
304755.733192246116232
result:
ok - 1 values
Test #44:
score: 0
Accepted
time: 5ms
memory: 4740kb
input:
300 -570 201 -32 -1000 -817 1000 -373 -1000 232 1000 1000 431 -1000 -603 885 -1000 914 1000 -400 -1000 194 1000 -1000 -64 1000 -322 -340 1000 -335 -1000 -54 -1000 -979 1000 1000 -641 -1000 -890 1000 -106 -1000 -590 -1000 -738 1000 -739 -627 -1000 -352 1000 1000 28 -1000 357 -1000 446 1000 -770 1000 ...
output:
698625.211256064241752
result:
ok - 1 values
Test #45:
score: 0
Accepted
time: 8ms
memory: 4728kb
input:
300 -760 -600 1000 -848 -1000 980 823 1000 118 -1000 -1000 896 1000 -375 -693 1000 -484 -1000 158 -1000 -303 1000 1000 729 -1000 -798 -1000 -432 1000 261 516 1000 612 -1000 -1000 -429 1000 -635 -832 1000 -559 -1000 1000 -114 -1000 999 -146 1000 -499 -1000 -523 1000 -85 -1000 1000 -68 -1000 716 -1000...
output:
707149.101676568156108
result:
ok - 1 values
Test #46:
score: 0
Accepted
time: 7ms
memory: 4684kb
input:
300 632 450 -177 -1000 400 1000 -1000 622 1000 -408 -1000 -162 1000 -361 -103 -1000 776 1000 482 -1000 -296 1000 -265 -1000 -328 1000 -1000 541 1000 -509 -1000 445 1000 -68 -775 1000 -425 -1000 -34 1000 335 -1000 891 -1000 773 1000 1000 404 -1000 654 -875 1000 736 -1000 -1000 -451 1000 -687 -444 100...
output:
705851.596996172098443
result:
ok - 1 values
Test #47:
score: 0
Accepted
time: 6ms
memory: 4624kb
input:
300 -296 500 1000 658 -1000 24 550 1000 468 -1000 -1000 -917 1000 -211 302 1000 -932 -1000 -598 -1000 746 1000 1000 -662 -1000 -693 -1000 729 1000 -69 1000 584 -1000 -75 -549 1000 933 -1000 -1000 -509 1000 465 1000 -438 -1000 -687 -1000 -790 1000 457 -1000 -641 1000 923 339 1000 -642 -1000 -443 -100...
output:
704583.876068878220394
result:
ok - 1 values
Test #48:
score: 0
Accepted
time: 5ms
memory: 4688kb
input:
300 -540 -500 868 -1000 -95 1000 -1000 972 1000 -681 -1000 26 1000 -197 -726 -1000 -59 1000 398 -1000 -375 1000 28 -1000 -881 1000 -1000 291 1000 -197 -683 -1000 799 1000 -1000 599 1000 821 -1000 348 1000 -331 -298 -1000 -762 1000 -569 -1000 -453 1000 -1000 -875 1000 -197 -464 -1000 879 1000 1000 -4...
output:
679707.653480242472142
result:
ok - 1 values
Test #49:
score: 0
Accepted
time: 6ms
memory: 4572kb
input:
300 -471 1000 1000 142 -1000 -868 -129 1000 -486 -1000 -1000 926 1000 102 -1000 -793 1000 121 1000 157 -1000 428 655 1000 351 -1000 -1000 -720 1000 -813 813 -1000 472 1000 1000 -820 -1000 -573 -1000 -864 1000 -669 1000 -532 -1000 -589 1000 444 -1000 208 -1000 -582 1000 -236 -1000 518 1000 39 130 -10...
output:
682767.438608426018618
result:
ok - 1 values
Test #50:
score: 0
Accepted
time: 5ms
memory: 4568kb
input:
300 -875 271 -24 -1000 -611 1000 -1000 530 1000 641 -1000 -36 1000 114 1000 419 -1000 -855 1000 -254 -1000 -570 -1000 -701 1000 577 -1000 -126 1000 629 1000 -49 -1000 128 328 -1000 -69 1000 -1000 755 1000 -269 -498 -1000 200 1000 840 1000 596 -1000 -1000 824 1000 -376 1000 -778 -1000 128 1000 -774 -...
output:
677682.953569319332018
result:
ok - 1 values
Test #51:
score: 0
Accepted
time: 6ms
memory: 4676kb
input:
300 800 -835 1000 -353 -1000 177 -402 1000 -136 -1000 -1000 -887 1000 266 -1000 734 1000 -867 1000 -570 -1000 731 148 1000 281 -1000 -1000 94 1000 265 -1000 9 1000 481 -181 -1000 544 1000 -966 1000 138 -1000 1000 448 -1000 847 254 -1000 561 1000 -817 1000 -781 -1000 -181 -1000 18 1000 -1000 -137 100...
output:
685011.163255887338892
result:
ok - 1 values
Test #52:
score: 0
Accepted
time: 8ms
memory: 4700kb
input:
300 1000 -84 -980 -1000 895 1000 -1000 880 1000 368 -1000 152 1000 278 1000 -398 -1000 497 1000 -108 -1000 431 -1000 -583 1000 951 -1000 -66 1000 442 759 1000 167 -1000 1000 -105 -1000 -642 -973 1000 908 -1000 38 -1000 -449 1000 -1000 -313 1000 162 120 1000 453 -1000 82 1000 -583 -1000 -124 1000 292...
output:
718443.663055724697188
result:
ok - 1 values
Test #53:
score: 0
Accepted
time: 7ms
memory: 4588kb
input:
300 0 839 -1000 386 1000 -813 -688 -1000 640 1000 1000 950 -1000 -757 252 -1000 805 1000 -130 -1000 -549 1000 -1000 545 1000 -515 -1000 702 1000 -563 843 -1000 2 1000 1000 331 -1000 -960 -595 1000 -601 -1000 -191 1000 -421 -1000 160 -1000 -474 1000 1000 888 -1000 -362 1000 362 -1000 396 -956 -1000 8...
output:
691357.013964910758659
result:
ok - 1 values
Test #54:
score: 0
Accepted
time: 1ms
memory: 3968kb
input:
1 0 0 0 0 0 1
output:
2.000000000000000
result:
ok - 1 values
Test #55:
score: 0
Accepted
time: 0ms
memory: 3980kb
input:
1 0 1 0 0 0 1
output:
2.000000000000000
result:
ok - 1 values