Statistics

Problem Statement for "EllysIncinerator"

Problem Statement

The government of the country, where Elly lives, thinks that the air there is too clean. To fix this, they want to build an incinerator, which burns waste.

For some unknown reason, the citizens started protesting. They had the absurd claim that the country was already burning enough coal and waste in its thermal power stations. Now the government thinks how to realize its project without making too much noise.

We can represent the country as a square 1000 by 1000 kilometers. There are several thermal power plants (TPS) inside it, which we'll represent as points with coordinates (X[i], Y[i]), laying inside or on the borders of this square. The TPS have different capacities. We'll consider the smoke cloud generated by each of them as a circle with radius R[i] and center the point (X[i], Y[i]). Since people have protested before because of the polu… clean air, the TPS are built in such a way that the smoke clouds of no two of them overlap (they are allowed to touch though).

Now the government has decided that if they make the incinerator follow the same rules people would stop protesting. For that, they need to find such a position and capacity for it, so its smoke cloud would not overlap with the smoke cloud of any of the TPS. Of course, they want the incinerator to be as powerful as possible, thus its radius should be as large as possible. Its coordinates should be inside or on the border of the country, however its smoke cloud (as well as the smoke clouds of the TPS) can go outside it.

You are given the double[]s X, Y and R giving the coordinates and the radius of each of the TPS. Return the maximum radius of the incinerator if positioned optimally.

Definition

Class:
EllysIncinerator
Method:
getMax
Parameters:
double[], double[], double[]
Returns:
double
Method signature:
double getMax(double[] X, double[] Y, double[] R)
(be sure your method is public)

Notes

  • Your return value will be considered correct if it has relative or an absolute error of less than 1e-9.

Constraints

  • X, Y and R will contain between 2 and 100 elements, inclusive.
  • X, Y and R will contain the same number of elements.
  • Each element of X and Y will be between 0 and 1000, inclusive.
  • Each element of R will be between 1 and 1414, inclusive.
  • All the input circles will not overlap, but may touch.

Examples

  1. {42.1337, 543.21, 987.987, 0, 666.666, 133.331, 888.8}

    {13.666, 765.432, 666.666, 1000, 66.66, 666.666666666, 88.8}

    {191.17, 55.555, 321.321, 100, 16.6, 123.321, 8.8}

    Returns: 320.33719645669953

    The answer is achieved with the incinerator being at coordinates (434.939950686, 341.298204535).

  2. {0, 1000}

    {0, 1000}

    {666, 666}

    Returns: 334.0000000000005

    Two termal plants at the opposite corners of the country.

  3. {0, 550}

    {0, 700}

    {666, 5}

    Returns: 535.8326913195992

  4. {0, 550}

    {0, 800}

    {666, 5}

    Returns: 493.1812989815517

  5. {123, 808}

    {497, 505}

    {42, 17}

    Returns: 577.9142674597779

  6. {837, 959}

    {987, 864}

    {17, 13}

    Returns: 1277.1166871654198

  7. {500, 500}

    {0, 1000}

    {50, 50}

    Returns: 657.1067811865478

  8. {0, 0, 1000, 1000}

    {0, 1000, 0, 1000}

    {13, 42, 17, 55}

    Returns: 673.3140001931692

  9. {0, 0, 1000, 1000, 0, 1000, 500, 500, 338, 267, 338, 267, 658, 729, 658, 729}

    {0, 1000, 0, 1000, 500, 500, 0, 1000, 282, 353, 744, 673, 282, 353, 744, 673}

    {10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}

    Returns: 271.00000000000085

  10. {100, 300, 500, 700, 900, 100, 100, 100, 100, 300, 500, 700, 900, 900, 900, 900, 499.999}

    {100, 100, 100, 100, 100, 300, 500, 700, 900, 900, 900, 900, 900, 700, 500, 300, 499.999}

    {50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50}

    Returns: 185.70288893513973

  11. {42, 404, 783, 707}

    {17, 917, 700, 287}

    {202, 101, 21, 297}

    Returns: 401.1828758767322

  12. {633.788, 728.094, 931.67, 247.332, 106.492, 6.457, 371.183}

    {796.014, 234.534, 682.141, 194.325, 728.503, 456.982, 804.682}

    {158.355, 121.365, 123.185, 79.514, 63.725, 170.38, 11.106}

    Returns: 239.3595287454352

  13. {912.998, 96.038, 930.238, 658.469, 274.005, 249.663, 319.577, 51.181, 11.025, 429.06, 674.28, 823.337, 548.555}

    {755.554, 947.233, 279.785, 193.388, 605.117, 730.019, 357.653, 469.232, 163.78, 51.024, 969.851, 146.993, 868.239}

    {177.207, 36.788, 121.149, 57.286, 17.77, 99.764, 149.562, 1.089, 138.568, 134.106, 68.022, 47.916, 32.697}

    Returns: 207.40919218380492

  14. {827.471, 14.129, 618.708, 476.184, 809.486, 159.701, 43.542, 217.328, 520.811, 487.601, 304.607, 71.408, 580.637, 431.44, 24.895, 56.299, 9.497, 739.488, 662.694, 120.741, 926.914, 339.471, 276.891, 283.293, 992.381, 900.847, 923.426, 245.573, 990.897, 272.343, 137.418, 165.462, 977.63, 865.129, 434.287, 660.135, 698.627, 58.002, 606.568, 336.6, 993.813, 90.582, 585.609, 269.735, 992.49, 659.948, 526.141, 81.724, 223.153, 469.335}

    {880.162, 746.768, 230.709, 795.253, 586.775, 959.95, 117.509, 677.183, 548.965, 24.335, 470.169, 788.348, 361.403, 576.748, 642.461, 875.51, 318.453, 666.799, 724.513, 400.208, 26.04, 209.771, 272.209, 638.333, 759.456, 499.977, 332.563, 946.253, 919.925, 34.973, 685.423, 847.907, 405.094, 342.004, 187.919, 67.409, 502.555, 747.495, 45.324, 296.785, 636.987, 985.778, 594.304, 849.649, 299.628, 985.759, 415.145, 488.322, 825.231, 338.399}

    {133.779, 11.522, 120.985, 180.029, 53.259, 1.206, 191.179, 43.29, 21.854, 70.408, 133.972, 6.499, 10.191, 14.466, 54.393, 44.575, 1.007, 32.116, 3.19, 48.873, 187.111, 29.704, 41.875, 32.19, 1.18, 52.696, 37.619, 16.1, 1.864, 17.377, 5.939, 23.41, 49.367, 4.069, 48.236, 3.956, 71.83, 14.036, 13.614, 2.498, 73.595, 14.513, 43.772, 4.456, 16.72, 24.049, 41.104, 14.412, 19.842, 50.129}

    Returns: 86.72241709552333

  15. {16.349, 173.644, 481.947, 759.713, 519.929, 318.816, 839.171, 203.531, 776.353, 28.899, 961.537, 439.919, 777.418, 415.404, 998.805, 151.216, 25.829, 891.4, 126.891, 312.393, 618.351, 710.248, 346.642, 550.182, 20.483, 661.265, 472.404, 564.731, 847.107, 266.093, 541.317, 696.735, 151.996, 228.057, 635.243, 76.217, 505.886, 194.839, 797.865, 91.019, 89.36, 237.765, 28.147, 724.479, 61.695, 427.331, 189.548, 228.205, 595.504, 719.674, 451.593, 717.925, 787.117, 77.349, 982.408, 994.821, 566.662, 360.974, 129.831, 513.144, 763.647, 825.076, 271.17, 590.484, 476.141, 783.335, 638.551, 864.53, 779.193, 191.161, 882.881, 820.138, 547.42, 71.827, 139.138}

    {992.045, 492.135, 73.694, 334.637, 602.425, 747.882, 639.041, 255.803, 129.048, 464.718, 842.869, 645.611, 964.949, 413.605, 290.066, 695.935, 824.166, 519.682, 67.272, 562.586, 783.547, 380.54, 973.418, 484.093, 80.503, 482.903, 817.269, 870.971, 567.79, 552.636, 270.472, 221.075, 552.999, 407.64, 632.716, 178.789, 718.26, 439.265, 475.854, 951.421, 404.712, 121.76, 326.082, 36.397, 254.65, 908.802, 371.463, 928.817, 978.383, 576.91, 581.265, 801.665, 670.153, 733.016, 47.213, 585.55, 257.181, 870.039, 175.745, 960.274, 750.931, 301.803, 27.556, 588.973, 267.424, 342.6, 902.539, 193.088, 413.106, 14.447, 36.829, 3.745, 374.357, 645.536, 121.429}

    {20.393, 35.176, 160.659, 12.058, 53.957, 77.984, 18.504, 86.799, 63.292, 69.212, 176.414, 15.803, 41.747, 123.79, 152.179, 65.673, 83.037, 36.49, 3.037, 19.205, 48.681, 51.242, 63.742, 25.565, 49.198, 40.784, 49.963, 47.476, 17.166, 1.013, 14.33, 3.169, 24.182, 15.045, 19.138, 3.563, 31.223, 12.493, 23.037, 22.5, 15.896, 4.444, 43.027, 23.098, 34.83, 24.332, 13.347, 52.455, 48.432, 30.51, 7.95, 3.792, 40.473, 13.23, 32.247, 54.388, 1.932, 29.785, 12.008, 28.219, 14.511, 13.551, 24.881, 14.148, 33.073, 5.057, 1.571, 5.606, 23.487, 50.746, 14.901, 49.043, 7.971, 27.326, 5.623}

    Returns: 74.63715643790164

  16. {185.681, 717.228, 556.826, 138.542, 255.153, 834.977, 987.336, 7.404, 559.227, 230.966, 881.966, 435.083, 441.546, 550.416, 919.638, 769.97, 554.726, 389.676, 502.037, 25.989, 371.578, 496.726, 520.573, 954.407, 500.389, 470.604, 279.761, 498.128, 89.419, 211.625, 479.965, 68.314, 346.738, 701.68, 422.956, 51.483, 136.961, 183.259, 943.332, 149.626, 248.533, 898.313, 133.326, 620.812, 30.328, 445.065, 416.687, 992.577, 822.15, 414.932, 38.288, 593.647, 31.798, 316.281, 886.311, 453.237, 207.211, 618.525, 401.43, 81.859, 295.83, 509.349, 227.521, 559.01, 410.247, 348.258, 265.544, 435.925, 561.363, 418.531, 246.396, 544.264, 21.298, 389.655, 816.594, 8.654, 175.028, 340.081, 398.716, 632.289, 478.783, 571.48, 969.867, 300.286, 967.744, 995.777, 980.404, 79.508, 274.827, 2.069, 746.416, 592.405, 16.073, 394.35, 409.847, 269.538, 784.806, 43.33, 352.183, 474.363}

    {292.263, 387.563, 938.704, 576.068, 876.241, 146.23, 241.153, 835.297, 103.959, 647.758, 884.148, 629.991, 525.383, 753.429, 26.299, 75.022, 645.679, 428.038, 6.811, 439.338, 37.037, 185.598, 590.945, 538.501, 874.54, 698.141, 665.948, 793.018, 847.452, 38.689, 986.286, 937.293, 667.255, 43.446, 236.067, 127.975, 5.519, 985.111, 146.201, 770.176, 8.864, 116.432, 704.402, 17.995, 684.704, 720.531, 412.318, 475.935, 24.849, 113.568, 599.043, 950.213, 514.357, 484.721, 84.091, 1.684, 82.892, 81.35, 714.599, 720.24, 572.803, 917.525, 500.205, 606.315, 875.843, 462.608, 704.182, 920.401, 893.639, 157.817, 65.94, 828.997, 968.273, 753.239, 95.81, 46.191, 490.596, 972.716, 137.684, 767.974, 585.872, 671.171, 613.724, 82.785, 301.387, 320.891, 132.052, 38.105, 515.345, 177.369, 8.438, 820.076, 460.81, 816.913, 300.108, 484.285, 108.509, 16.083, 119.227, 82.843}

    {187.86, 245.645, 11.566, 78.119, 108.86, 18.681, 40.391, 71.306, 37.583, 33.985, 264.43, 48.933, 55.201, 35.845, 49.602, 10, 10, 10, 27.399, 10, 10, 46.811, 10, 25.611, 30.562, 10, 12.446, 19.763, 10, 10, 62.778, 36.051, 22.23, 24.282, 14.174, 11.149, 28.328, 16.593, 10, 21.974, 31.901, 10, 20.617, 10, 35.206, 15.747, 20.703, 31.583, 24.675, 10, 10, 20.471, 38.417, 17.295, 10, 21.656, 10, 19.301, 13.922, 24.291, 29.331, 11.842, 10, 10, 30.445, 12.415, 20.597, 10, 10, 15.46, 10, 15.614, 18.419, 22.514, 10, 32.516, 10, 13.174, 10, 10, 12.712, 10, 14.694, 10, 17.15, 10, 26.339, 32.196, 21.125, 12.691, 28.074, 10, 11.111, 23.417, 23.62, 10, 21.272, 10, 12.603, 21.116}

    Returns: 55.77157651238729

  17. {317.596, 865.772, 400.026, 128.221, 383.041, 56.139, 720.097, 577.459, 108.157, 747.368, 706.473, 163.778, 424.379, 188.985, 242.359, 827.519, 702.655, 58.715, 408.729, 207.434, 699.649, 323.418, 211.31, 347.745, 945.219, 543.723, 316.12, 985.538, 361.216, 581.088, 425.415, 750.765, 882.142, 617.786, 931.542, 130.672, 501.075, 215.813, 840.505, 428.448, 230.776, 445.333, 141.45, 207.146, 24.288, 133.029, 497.557, 481.434, 619.386, 300.15, 407.379, 524.098, 38.614, 937.676, 808.197, 41.972, 982.839, 110.408, 86.307, 817.511, 260.266, 681.982, 364.337, 235.965, 535.098, 597.701, 294.936, 133.026, 963.374, 901.287, 681.805, 989.266, 610.475, 468.345, 393.402, 598.171, 280.158, 270.735, 392.626, 666.703, 188.99, 33.032, 799.64, 169.183, 109.149, 711.953, 412.974, 2.574, 514.174, 360.197, 588.225, 314.893, 88.102, 850.517, 210.728, 928.694, 865.258, 188.112, 888.442, 619.787}

    {578.698, 417.169, 536.159, 472.096, 702.15, 405.503, 846.004, 443.542, 345.41, 82.946, 904.83, 185.082, 207.816, 116.775, 552.938, 550.343, 788.492, 773.983, 423.174, 360.102, 115.499, 739.671, 462.684, 827.559, 342.709, 0.069, 240.447, 953.119, 16.122, 158.734, 311.193, 214.804, 744.115, 100.604, 889.577, 408.849, 76.276, 403.321, 866.917, 603.494, 203.86, 97.155, 88.893, 271.974, 921.148, 225.516, 372.346, 795.956, 914.703, 350.197, 842.19, 855.856, 165.989, 220.539, 341.519, 19.268, 723.114, 541.015, 475.988, 596.163, 453.062, 513.137, 916.362, 962.589, 927.441, 671.891, 660.276, 964.656, 843.267, 59.783, 454.211, 474.891, 363.668, 177.506, 123.611, 601.501, 871.024, 79.392, 272.549, 290.516, 549.398, 630.426, 114.212, 907.691, 23.171, 8.916, 792.032, 506.544, 592.828, 632.218, 723.994, 616.314, 260.327, 643.178, 505.321, 555.697, 991.996, 839.857, 499.627, 798.74}

    {10, 10, 26.101, 20.104, 18.725, 10, 10, 49.789, 15.706, 10, 10, 12.498, 33.448, 10, 38.849, 18.489, 35.236, 36.032, 34.984, 33.277, 10, 13.546, 14.417, 20.094, 10, 24.195, 10, 38.805, 10.721, 45.375, 22.318, 13.179, 10, 14.881, 10, 21.764, 10.99, 10, 18.806, 22.554, 10.251, 23.415, 10, 10, 42.192, 10, 24.017, 10, 22.088, 10, 16.041, 28.473, 48.026, 27.316, 28.258, 38.267, 18.542, 25.774, 19.622, 14.037, 18.887, 29.456, 37.885, 41.079, 42.038, 27.222, 10.069, 10, 10, 15.987, 10, 48.065, 10, 10, 10, 13.401, 23.371, 29.621, 27.445, 10, 10, 30.51, 44.562, 24.468, 10, 35.687, 30.165, 15.884, 35.498, 12.876, 14.771, 10, 18.53, 42.011, 10, 10, 35.994, 43.885, 15.891, 10}

    Returns: 110.20425034433987

  18. {126.683, 417.489, 913.654, 894.866, 111.423, 824.468, 570.679, 357.297, 397.095, 93.892, 461.073, 24.259, 485.72, 444.68, 479.302, 158.841, 958.498, 646.994, 474.277, 866.093, 134.764, 700.684, 733.984, 560.07, 138.458, 371.522, 722.968, 289.869, 302.127, 134.788, 50.313, 585.097, 406.273, 702.66, 534.378, 200.925, 588.726, 612.482, 502.651, 483.765, 200.534, 945.8, 632.408, 784.791, 372.803, 982.099, 117.469, 761.112, 319.842, 622.358, 702.793, 234.838, 505.836, 531.63, 17.173, 261.865, 492.983, 8.299, 300.381, 997.287, 952.256, 441.832, 885.807, 408.141, 483.03, 51.823, 284.279, 316.413, 141.839, 528.017, 1.75, 148.52, 312.563, 492.478, 626.847, 76.248, 691.816, 378.78, 32.093, 200.171, 884.116, 348.939, 673.066, 90.847, 517.652, 630.699, 910.417, 885.707, 462.039, 733.382, 549.874, 421.995, 514.553, 488.798, 983.188, 749.6, 980.377, 688.523, 786.996, 239.181}

    {841.774, 510.801, 335.61, 946.332, 414.282, 712.819, 657.856, 200.33, 581.228, 33.056, 383.436, 14.529, 927.547, 640.376, 1.375, 112.054, 702.271, 965.234, 478.045, 808.144, 158.222, 969.474, 18.875, 490.42, 86.706, 368.809, 616.835, 512.687, 372.554, 36.985, 135.836, 167.617, 712.72, 830.583, 39.107, 1.368, 135.552, 38.886, 61.696, 454.135, 68.44, 784.507, 79.163, 653.484, 500.298, 709.046, 165.421, 955.411, 441.141, 801.745, 913.882, 574.633, 150.54, 418.3, 261.958, 295.713, 240.184, 249.57, 559.435, 813.459, 725.193, 784.985, 835.01, 446.936, 37.007, 241.221, 586.632, 1.373, 217.924, 315.748, 126.759, 126.035, 611.902, 84.923, 64.005, 215.291, 699.647, 464.862, 611.808, 582.788, 845.608, 477.002, 9.661, 56.875, 452.984, 562.502, 852.528, 859.263, 540.391, 619.781, 185.312, 32.673, 288.849, 273.293, 856.788, 647.861, 733.276, 898.9, 804.814, 628.968}

    {223.694, 16.424, 325.829, 77.301, 152.85, 59.637, 105.004, 129.008, 38.73, 2.259, 42.185, 67.233, 144.226, 18.287, 15.097, 5.305, 8.121, 17.091, 3.121, 28.767, 8.529, 27.949, 9.367, 29.487, 26.572, 16.795, 5.118, 6.12, 40.663, 8.8, 41.841, 1, 46.658, 52.836, 13.022, 11.21, 26.54, 14.662, 8.702, 22.41, 13.501, 33.013, 6.351, 4.706, 17.478, 3.449, 10.15, 28.636, 30.161, 25.103, 4.614, 19.414, 4.364, 24.197, 1, 1, 7.928, 1, 9.889, 20.003, 11.115, 1.126, 4.071, 1, 16.875, 7.896, 4.376, 56.922, 30.14, 19.836, 3.791, 11.691, 5.944, 11.452, 2.25, 25.367, 14.35, 7.615, 10.619, 14.853, 4.71, 13.428, 3.678, 9.745, 7.65, 3.872, 16.679, 4.417, 17.078, 5.291, 30.678, 40.886, 9.648, 12.604, 1.589, 12.456, 13.255, 10.899, 4.172, 9.749}

    Returns: 50.74698249988154

  19. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999}

    {0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999}

    {50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50}

    Returns: 28.488852711709974

  20. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999}

    {0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999}

    {49.965, 49.969, 50.028, 50.053, 49.952, 50.053, 49.98, 50.041, 50.045, 50.071, 49.968, 49.968, 50.024, 50.025, 49.924, 49.929, 49.916, 50.045, 50.043, 50.016, 49.967, 50.055, 49.905, 49.901, 50.032, 50.008, 49.902, 49.958, 50.077, 50.037, 49.934, 50.099, 50.089, 50.053, 50.072, 50.069, 49.901, 50.007, 50.037, 50.058, 50.07, 49.925, 50.079, 50.067, 49.973, 50.005, 49.978, 49.908, 50.079, 50.089, 49.941, 50.035, 49.948, 49.994, 50.04, 50.008, 50.082, 49.958, 49.94, 49.903, 50.066, 49.967, 49.916, 49.941, 50.049, 49.959, 50.036, 50.041, 49.94, 50.059, 50.029, 50.062, 50.054, 50.015, 50.09, 50.088, 49.962, 50.06, 49.936, 49.923, 49.987, 50.017, 49.925, 50.095, 49.922, 50.003, 49.986, 50.077, 50, 50.034, 50.013, 50.066, 50.022, 50.099, 49.96, 49.902, 50.093, 50.002, 50.016, 50.053}

    Returns: 28.534370944745145

  21. {964.354, 59.915, 527.787, 981.864, 7.88, 54.482, 52.216, 915.823, 52.824, 171.587, 946.925, 637.071, 991.257, 47.02, 807.149, 259.867, 390.755, 798.242, 917.339, 407.361, 944.022, 69.684, 375.638, 13.636, 908.769, 890.241, 993.232, 866.256, 92.245, 16.067, 464.31, 925.033, 316.96, 71.357, 316.765, 224.801, 632.071, 270.02, 90.472, 847.487, 99.395, 410.029, 22.406, 908.592, 197.99, 284.471, 757.633, 765.183, 444.421, 938.333, 925.178, 131.161, 513.34, 947.71, 980.521, 674.606, 79.772, 61.975, 39.735, 991.141, 12.227, 427.41, 216.396, 723.858, 958.167, 75.923, 28.032, 464.754, 732.252, 882.048, 315.166, 904.624, 98.55, 444.561, 32.468, 5.858, 345.816, 182.973, 987.017, 81.499, 905.494, 57.029, 715.727, 626.784, 944.029, 55.675, 527.782, 941.688, 736.501, 935.62, 929.145, 71.444, 924.137, 900.042, 950.368, 967.701, 159.737, 290.439, 75.45, 93.86}

    {621.916, 559.71, 27.566, 60.065, 190.283, 264.786, 924.986, 360.949, 713.805, 42.367, 805.67, 917.717, 207.692, 94.812, 916.738, 52.285, 947.953, 8.474, 988.677, 6.427, 900.748, 671.644, 48.809, 754.911, 917.487, 39.037, 913.227, 985.679, 655.998, 435.551, 907.837, 484.178, 37.086, 193.926, 98.275, 951.57, 98.753, 999.614, 351.932, 84.571, 146.003, 75.946, 162.502, 967.523, 25.159, 937.751, 84.286, 998.895, 943.565, 707.743, 55.143, 68.664, 960.945, 982.556, 383.843, 41.405, 25.844, 11.377, 190.921, 702.948, 791.433, 40.399, 95.695, 91.369, 716.072, 813.344, 15.963, 983.841, 962.091, 55.576, 925.441, 640.101, 780.262, 95.538, 630.425, 552.282, 59.225, 916.694, 420.8, 52.612, 86.198, 786.327, 942.961, 63.768, 1.424, 168.024, 924.284, 920.026, 3.481, 398.091, 910.269, 755.502, 29.323, 974.339, 696.083, 321.734, 996.673, 975.172, 652.945, 716.282}

    {56.641, 36.357, 73.861, 43.38, 3.326, 50.912, 99.699, 20.388, 31.224, 4.204, 67.609, 72.457, 96.481, 42.055, 64.055, 45.254, 32.914, 59.402, 9.772, 10.308, 1.065, 12.772, 21.382, 1, 1.475, 8.983, 23.678, 18.371, 8.694, 89.169, 32.999, 67.554, 4.356, 3.263, 19.282, 29.995, 26.272, 14.298, 21.588, 16.296, 21.353, 16.156, 15.559, 3.648, 9.162, 16.891, 2.892, 3.675, 1.148, 11.337, 9.961, 39.839, 12.722, 20.729, 11.788, 37.083, 7.848, 14.031, 1.21, 1, 30.846, 5.693, 16.086, 12.503, 9.199, 11.547, 17.405, 24.495, 17.178, 9.131, 10.234, 5.602, 21.946, 21.247, 37.139, 9.744, 3.919, 1.586, 1, 10.373, 9.822, 4.569, 5.598, 6.112, 4.227, 10.973, 25.598, 2.41, 2.484, 16.262, 13.282, 11.177, 14.126, 2.983, 1.565, 1, 21.317, 10.569, 2.485, 5.795}

    Returns: 378.13037136779883

  22. {250, 750}

    {250, 750}

    {1, 1}

    Returns: 789.5694150420954

  23. {500, 500, 500, 750, 750, 750, 1000, 1000, 1000, 475, 475}

    {500, 0, 1000, 500, 0, 1000, 500, 0, 1000, 250, 750}

    {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}

    Returns: 504.7806466246021

  24. {1000, 450}

    {1000, 300}

    {666, 5}

    Returns: 535.8326913195992

  25. {252.938577836, 281.526105411, 391.934618452, 89.912126302, 94.46663711, 486.424744267, 188.396959607, 329.279967698, 393.64973293, 302.665953991, 419.196053396, 301.718327301, 210.736726989, 247.075904626, 468.690547064, 205.559423934, 327.570341673, 32.408008849, 275.355533031, 425.590241344, 90.508559283, 419.711567674, 182.324911117, 337.226764963, 470.347318632, 174.201274239, 189.315534027, 134.904326617, 196.141151602, 356.763172008, 370.611634883, 175.87191386, 72.990296192, 481.223578, 173.692988607, 39.592427711, 302.325321511, 366.849844611, 163.801641342, 469.13508355, 354.511621702, 96.579993797, 70.198542847, 213.989807225, 7.04338605, 369.269722942, 158.463402961, 421.524821918, 40.347771895, 301.051076165, 138.515840037, 374.441596422, 430.496578104, 164.737226826, 493.97441745, 13.577038722, 3.734876517, 463.936516807, 390.086709971, 324.295077969, 379.128419222, 252.597145314, 15.949758424, 190.395606785, 285.365625753, 109.829797336, 169.577618141, 464.042997649, 90.916983845, 344.637949242, 232.606155701, 15.612564251, 341.954211325, 413.331130656, 190.128492865, 199.729172238, 492.198725538, 250.129923704, 65.533976812, 270.57301223, 129.827489658, 179.638302338, 47.014926241, 37.991519117, 441.633276773, 187.14776205, 10.63316578, 483.136108697, 225.298926188, 235.264502865, 58.480079989, 401.401049379, 388.296693674, 111.182374109, 438.948881929, 360.98692285, 95.407882373, 29.469836791, 97.110609103, 95.72546886 }

    {60.974847605, 51.80992048, 139.157975713, 290.684197026, 316.481933121, 185.05792373, 153.045680304, 139.471037832, 292.906934117, 262.383666364, 381.727579166, 290.819078577, 318.660367883, 217.669540435, 401.00304634, 291.918202969, 24.989846036, 463.777759474, 249.860618793, 239.3699322, 334.352664876, 144.971285248, 357.84688669, 477.161785887, 243.150644514, 155.604422714, 43.191082886, 187.160368519, 172.337765996, 156.867470272, 140.96968756, 145.783818232, 314.128367275, 247.937807383, 74.766955204, 255.515648396, 468.255911911, 462.404360851, 416.378172132, 187.829311495, 320.875517307, 361.47391028, 386.729129903, 187.819160859, 455.61215347, 428.867600974, 175.982480874, 104.41795113, 453.635013953, 443.903349406, 146.269992165, 457.603759637, 35.63757707, 248.723344198, 430.65380828, 51.869119227, 109.14995558, 321.298262332, 392.9768533, 388.295554332, 357.556476071, 3.093482664, 448.153645824, 54.944959997, 149.75847837, 362.30398866, 66.587319185, 55.120961928, 219.707077151, 353.946620525, 368.781371446, 287.046516878, 454.349822307, 26.733426125, 339.15598165, 18.766096334, 106.214728227, 332.352428367, 438.237074491, 293.433634387, 236.375664118, 322.737160361, 35.869060025, 354.094597312, 88.028860189, 383.104325185, 305.072074717, 492.485614703, 14.891192525, 197.454877627, 307.629551382, 248.634916529, 369.728944693, 290.430969194, 194.869537263, 83.051678224, 128.683365379, 146.738480804, 292.402019306, 243.253921783 }

    {1.0, 1.53701157573054, 1.0, 1.0, 1.0, 5.900649608913841, 1.0, 10.23149862599058, 1.0, 1.0766883320090102, 1.0, 7.025918379113611, 1.0, 4.75693008322347, 6.53743641898206, 10.55602892565513, 23.685135369277774, 1.0, 14.44251721138362, 7.3623426588371705, 4.16809433363985, 7.639245386782201, 2.60429408979867, 1.0, 4.52561809836645, 1.4352147607088699, 1.0, 3.6197670869671503, 9.14788039628124, 12.040190911886851, 9.04322742582141, 5.53714921295415, 2.61432129052566, 7.149031154973541, 3.00541246657479, 5.52404658698172, 3.75244037122104, 1.91164051640367, 24.812458384934878, 3.7509208594163104, 6.90509162339325, 10.62383336260398, 13.96295699603373, 10.205655331426112, 4.906249150017871, 15.73856835574257, 10.12786303535685, 4.16396551092849, 6.9090917483916, 18.96520540204944, 11.05418574103716, 6.96073822592166, 17.19046399264101, 17.92578463236108, 15.791370395716891, 8.069580870384332, 8.211374921429641, 60.04620785791674, 8.562365771486041, 23.927367258934648, 8.61387296840892, 17.87958402537177, 6.710553599792941, 9.36706702439304, 3.6723881697510605, 2.65181347760004, 5.873084630566381, 14.57458237471878, 9.053071693377749, 15.49494594599103, 27.873957532637252, 7.33321036916298, 21.617192504913213, 2.14678015998372, 5.92156307777706, 15.94800874931769, 35.8808548078638, 12.55026362210874, 22.61080034173548, 24.228633541241702, 14.05501307746371, 13.562127471369061, 28.09490492414124, 31.88748519495927, 17.85491217809271, 15.83427825063405, 11.367274926114, 46.98252871701453, 9.91342624874616, 13.14919005578451, 13.28460718559967, 17.88522726793878, 6.624946023877261, 10.79923957952427, 27.24508423543311, 43.30556919497745, 33.005261993079515, 35.35934560800795, 3.40975654809354, 14.979486822633811 }

    Returns: 677.3924663071596

  26. {500.0, 888.0 }

    {500.0, 888.0 }

    {500.0, 1.0 }

    Returns: 207.1067811865483

  27. {0.0, 2.0 }

    {0.0, 0.0 }

    {1.0, 1.0 }

    Returns: 1411.8000566251408


This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2024, TopCoder, Inc. All rights reserved.
This problem was used for: