QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#672312 | #2629. Let's Win the Election | liuziao | 39 | 19ms | 5916kb | C++23 | 2.6kb | 2024-10-24 16:26:01 | 2024-10-24 16:26:01 |
Judging History
answer
#include <bits/stdc++.h>
// #define int int64_t
using f64 = double;
using pii = std::pair<int, int>;
const int kMaxN = 505;
const f64 kEps = 1e-6;
int n, k;
pii a[kMaxN];
f64 f[kMaxN][kMaxN];
f64 func(int cnt) {
static pii b[kMaxN];
for (int i = 1; i <= n; ++i) b[i] = a[i];
for (int i = 0; i <= n; ++i)
for (int j = 0; j <= n; ++j)
f[i][j] = 1e9;
f[0][0] = 0;
for (int i = 1; i <= n; ++i) {
for (int j = cnt; ~j; --j) {
// for (int k = ::k - cnt; ~k; --k) {
// if (j && a[i].second != -1) f[j][k] = std::min(f[j][k], f[j - 1][k] + (f64)a[i].second / j);
// if (k) f[j][k] = std::min(f[j][k], f[j][k - 1] + (f64)a[i].first / (cnt + 1));
// }
f[i][j] = f[i - 1][j] + (f64)a[i].first / (cnt + 1);
if (j && a[i].second != -1) f[i][j] = std::min(f[i][j], f[i - 1][j - 1] + (f64)a[i].second / j);
}
}
f64 ret = 1e9;
for (int i = k; i >= cnt; --i) {
std::sort(b + 1 + i, b + 1 + n);
f64 sum = f[i][cnt];
for (int j = i + 1; j <= k; ++j) sum += (f64)b[j].first / (cnt + 1);
ret = std::min(ret, sum);
}
return ret;
}
void dickdreamer() {
std::cin >> n >> k;
int can = 0;
for (int i = 1; i <= n; ++i) {
std::cin >> a[i].first >> a[i].second;
if (a[i].second != -1) ++can;
}
std::sort(a + 1, a + 1 + n, [&] (pii p1, pii p2) { return p1.second < p2.second; });
f64 ans = 1e9;
// for (int cnt = 0; cnt <= std::min(can, k); ++cnt) {
// for (int i = 0; i <= n; ++i)
// for (int j = 0; j <= n; ++j)
// f[i][j] = 1e9;
// f[0][0] = 0;
// for (int i = 1; i <= n; ++i) {
// for (int j = cnt; ~j; --j) {
// for (int k = ::k - cnt; ~k; --k) {
// if (j && a[i].second != -1) f[j][k] = std::min(f[j][k], f[j - 1][k] + (f64)a[i].second / j);
// if (k) f[j][k] = std::min(f[j][k], f[j][k - 1] + (f64)a[i].first / (cnt + 1));
// }
// }
// }
// ans = std::min(ans, f[cnt][k - cnt]);
// }
int L = 0, R = std::min(can, k) + 1, res = 0;
while (L + 1 < R) {
int mid = (L + R) >> 1;
if (func(mid) <= func(mid - 1) - kEps) L = res = mid;
else R = mid;
}
std::cout << std::fixed << std::setprecision(10) << func(res) << '\n';
}
int32_t main() {
#ifdef ORZXKR
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
#endif
std::ios::sync_with_stdio(0), std::cin.tie(0), std::cout.tie(0);
int T = 1;
// std::cin >> T;
while (T--) dickdreamer();
// std::cerr << 1.0 * clock() / CLOCKS_PER_SEC << "s\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 0ms
memory: 3832kb
input:
1 1 729 -1
output:
729.0000000000
result:
ok error = 0.000000000
Test #2:
score: 5
Accepted
time: 0ms
memory: 3920kb
input:
2 2 204 -1 96 -1
output:
300.0000000000
result:
ok error = 0.000000000
Test #3:
score: 5
Accepted
time: 0ms
memory: 3848kb
input:
3 2 639 -1 597 -1 543 -1
output:
1140.0000000000
result:
ok error = 0.000000000
Test #4:
score: 5
Accepted
time: 0ms
memory: 3840kb
input:
4 3 765 -1 121 -1 409 -1 529 -1
output:
1059.0000000000
result:
ok error = 0.000000000
Test #5:
score: 5
Accepted
time: 1ms
memory: 5776kb
input:
500 50 16 -1 224 -1 562 -1 783 -1 830 -1 455 -1 744 -1 170 -1 196 -1 89 -1 80 -1 357 -1 400 -1 443 -1 690 -1 732 -1 705 -1 735 -1 776 -1 820 -1 992 -1 811 -1 690 -1 364 -1 148 -1 246 -1 535 -1 184 -1 951 -1 86 -1 324 -1 2 -1 842 -1 386 -1 55 -1 571 -1 840 -1 689 -1 538 -1 287 -1 310 -1 322 -1 471 -1...
output:
2580.0000000000
result:
ok error = 0.000000000
Test #6:
score: 5
Accepted
time: 2ms
memory: 5896kb
input:
500 125 567 -1 27 -1 102 -1 783 -1 52 -1 120 -1 732 -1 300 -1 193 -1 772 -1 829 -1 109 -1 699 -1 215 -1 392 -1 193 -1 400 -1 260 -1 559 -1 855 -1 974 -1 935 -1 507 -1 773 -1 481 -1 539 -1 369 -1 588 -1 593 -1 922 -1 28 -1 278 -1 553 -1 525 -1 140 -1 845 -1 637 -1 107 -1 641 -1 130 -1 514 -1 104 -1 9...
output:
15729.0000000000
result:
ok error = 0.000000000
Test #7:
score: 5
Accepted
time: 2ms
memory: 5872kb
input:
500 250 76 -1 295 -1 438 -1 389 -1 573 -1 937 -1 359 -1 81 -1 881 -1 565 -1 620 -1 275 -1 52 -1 572 -1 446 -1 942 -1 338 -1 684 -1 657 -1 616 -1 156 -1 648 -1 492 -1 168 -1 711 -1 348 -1 715 -1 868 -1 29 -1 509 -1 483 -1 658 -1 183 -1 214 -1 733 -1 566 -1 388 -1 962 -1 850 -1 44 -1 191 -1 743 -1 143...
output:
66687.0000000000
result:
ok error = 0.000000000
Test #8:
score: 5
Accepted
time: 0ms
memory: 5804kb
input:
500 375 565 -1 295 -1 459 -1 572 -1 658 -1 810 -1 178 -1 13 -1 644 -1 975 -1 150 -1 220 -1 557 -1 156 -1 573 -1 543 -1 325 -1 62 -1 427 -1 599 -1 204 -1 6 -1 892 -1 590 -1 801 -1 338 -1 367 -1 311 -1 890 -1 172 -1 606 -1 300 -1 806 -1 150 -1 814 -1 97 -1 712 -1 769 -1 583 -1 792 -1 24 -1 384 -1 136 ...
output:
147876.0000000000
result:
ok error = 0.000000000
Test #9:
score: 5
Accepted
time: 0ms
memory: 5808kb
input:
500 500 187 -1 429 -1 984 -1 572 -1 718 -1 162 -1 355 -1 922 -1 180 -1 457 -1 881 -1 946 -1 105 -1 273 -1 3 -1 891 -1 290 -1 281 -1 598 -1 432 -1 279 -1 471 -1 123 -1 212 -1 290 -1 975 -1 796 -1 438 -1 43 -1 371 -1 229 -1 121 -1 912 -1 317 -1 41 -1 445 -1 307 -1 777 -1 336 -1 320 -1 699 -1 617 -1 23...
output:
249562.0000000000
result:
ok error = 0.000000000
Test #10:
score: 5
Accepted
time: 2ms
memory: 5676kb
input:
500 350 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000 -1 1000...
output:
350000.0000000000
result:
ok error = 0.000000000
Subtask #2:
score: 0
Wrong Answer
Test #11:
score: 5
Accepted
time: 0ms
memory: 3896kb
input:
1 1 791 791
output:
791.0000000000
result:
ok error = 0.000000000
Test #12:
score: 5
Accepted
time: 4ms
memory: 5868kb
input:
500 150 824 824 524 524 20 20 713 713 668 668 342 342 53 53 660 660 180 180 614 614 504 504 216 216 200 200 551 551 660 660 696 696 194 194 820 820 517 517 209 209 484 484 744 744 904 904 268 268 931 931 265 265 701 701 511 511 591 591 443 443 374 374 296 296 848 848 481 481 771 771 521 521 687 687 ...
output:
341.0793145790
result:
ok error = 0.000000000
Test #13:
score: 0
Wrong Answer
time: 10ms
memory: 5872kb
input:
500 150 187 -1 798 798 819 819 927 927 9 -1 742 742 268 -1 453 -1 132 132 947 947 683 -1 156 -1 809 -1 681 -1 472 472 656 -1 177 177 347 347 102 102 45 45 215 -1 580 580 371 371 807 807 625 625 11 11 596 596 34 -1 803 803 360 360 45 -1 613 613 490 -1 871 -1 974 -1 710 -1 308 308 698 -1 117 117 962 -...
output:
21229.0000000000
result:
wrong answer read 21229.000000000 but expected 355.342286415, error = 20873.657713585
Subtask #3:
score: 0
Wrong Answer
Test #21:
score: 11
Accepted
time: 0ms
memory: 3852kb
input:
7 1 309 988 195 951 51 -1 104 279 498 906 410 498 76 -1
output:
51.0000000000
result:
ok error = 0.000000000
Test #22:
score: 11
Accepted
time: 0ms
memory: 3868kb
input:
7 2 299 867 879 943 170 -1 142 847 219 249 48 119 20 813
output:
68.0000000000
result:
ok error = 0.000000000
Test #23:
score: 0
Wrong Answer
time: 0ms
memory: 3916kb
input:
7 3 150 170 124 765 351 855 139 -1 182 -1 427 531 945 -1
output:
413.0000000000
result:
wrong answer read 413.000000000 but expected 301.500000000, error = 111.500000000
Subtask #4:
score: 0
Wrong Answer
Test #36:
score: 12
Accepted
time: 0ms
memory: 3920kb
input:
20 3 43 487 143 720 123 886 88 266 639 739 129 522 300 696 88 889 276 550 653 722 92 157 85 674 452 666 290 517 780 801 49 430 633 932 197 421 20 749 286 479
output:
112.0000000000
result:
ok error = 0.000000000
Test #37:
score: 12
Accepted
time: 0ms
memory: 3988kb
input:
20 9 30 114 174 185 50 580 851 893 525 729 167 804 13 48 614 700 244 933 348 357 97 970 539 879 339 344 275 430 619 979 810 847 108 896 590 619 214 343 189 662
output:
372.9166666667
result:
ok error = 0.000000000
Test #38:
score: 0
Wrong Answer
time: 0ms
memory: 3912kb
input:
20 9 208 346 207 411 259 509 644 -1 215 798 335 527 892 998 923 -1 342 639 576 858 275 460 238 951 646 693 820 996 628 -1 461 888 135 395 618 815 370 969 84 812
output:
1277.1333333333
result:
wrong answer read 1277.133333333 but expected 1021.333333333, error = 255.800000000
Subtask #5:
score: 0
Wrong Answer
Test #61:
score: 33
Accepted
time: 0ms
memory: 4308kb
input:
100 15 824 961 637 866 334 751 463 701 28 953 68 168 589 741 107 298 690 754 20 869 686 990 151 659 90 234 279 477 210 337 481 626 347 916 428 580 445 708 239 584 306 495 932 978 84 896 39 199 498 609 308 668 301 605 275 664 426 444 220 345 429 488 365 698 364 681 57 156 129 824 166 931 412 855 745 ...
output:
324.3333333333
result:
ok error = 0.000000000
Test #62:
score: 0
Wrong Answer
time: 1ms
memory: 4228kb
input:
100 15 699 980 501 508 700 814 511 619 535 922 883 962 945 -1 686 735 858 884 819 -1 904 966 828 -1 755 766 657 980 633 679 620 867 553 809 900 996 515 819 969 -1 994 -1 898 902 572 704 820 -1 832 -1 768 831 660 845 609 840 578 -1 766 978 723 852 663 934 728 929 660 667 729 990 773 852 654 691 603 -...
output:
7812.0000000000
result:
wrong answer read 7812.000000000 but expected 1892.320526696, error = 5919.679473304
Subtask #6:
score: 11
Accepted
Test #81:
score: 11
Accepted
time: 10ms
memory: 5764kb
input:
500 500 215 315 169 657 849 974 865 984 799 919 681 905 236 828 612 980 342 741 203 235 955 997 456 691 358 1000 617 965 691 912 10 295 426 646 72 725 242 788 171 742 256 696 157 347 151 397 229 798 323 427 133 368 833 993 266 525 254 915 371 438 700 889 235 654 400 953 52 277 31 562 15 298 244 383 ...
output:
1767.1975007973
result:
ok error = 0.000000000
Test #82:
score: 11
Accepted
time: 8ms
memory: 5896kb
input:
500 500 205 643 330 716 239 703 264 305 223 429 319 806 279 764 538 850 908 938 357 944 583 968 376 927 593 597 882 947 249 254 770 794 231 553 215 518 448 887 699 964 484 538 314 583 565 648 342 703 554 869 667 814 264 953 269 902 292 546 234 943 375 705 488 637 238 933 363 466 532 966 233 738 637 ...
output:
2763.3815674113
result:
ok error = 0.000000000
Test #83:
score: 11
Accepted
time: 5ms
memory: 5676kb
input:
500 500 621 820 492 921 496 917 602 719 670 831 533 828 616 764 790 923 907 994 732 854 428 715 448 485 666 970 695 959 446 865 552 582 556 670 421 569 576 871 696 793 618 982 484 838 558 680 475 601 657 890 452 795 639 864 640 967 821 995 489 937 922 990 623 868 444 719 401 887 442 690 403 822 444 ...
output:
3763.0435188736
result:
ok error = 0.000000000
Test #84:
score: 11
Accepted
time: 8ms
memory: 5916kb
input:
500 500 806 904 712 941 724 822 850 985 844 899 910 932 705 835 715 907 727 895 659 703 839 887 819 828 772 785 723 774 680 872 726 928 690 797 770 891 673 884 836 857 728 973 630 963 816 967 865 972 627 918 651 695 652 843 799 929 779 795 885 974 807 854 707 991 786 914 678 805 682 785 859 864 649 ...
output:
4840.5411729334
result:
ok error = 0.000000000
Test #85:
score: 11
Accepted
time: 8ms
memory: 5912kb
input:
500 500 801 849 901 999 849 921 925 999 864 992 851 989 907 967 853 923 840 912 816 877 853 878 825 893 909 992 824 914 854 902 961 981 871 905 812 985 800 981 902 998 943 991 818 967 899 999 811 878 815 968 919 990 896 994 805 870 833 892 809 895 850 982 863 984 828 850 835 953 860 973 825 876 896 ...
output:
5820.4909981528
result:
ok error = 0.000000000
Test #86:
score: 11
Accepted
time: 13ms
memory: 5876kb
input:
500 500 298 693 393 595 298 660 327 678 293 668 374 585 369 629 346 615 319 702 308 678 333 708 335 656 274 748 333 709 368 665 289 707 315 635 338 623 262 777 304 740 281 742 266 695 314 712 271 752 308 655 304 665 298 677 326 665 328 701 268 716 307 737 247 736 248 702 322 669 361 603 282 736 317 ...
output:
3946.9244817827
result:
ok error = 0.000000000
Test #87:
score: 11
Accepted
time: 8ms
memory: 5896kb
input:
500 500 431 590 318 561 389 581 897 976 980 980 659 799 431 641 517 675 732 800 688 810 891 960 685 779 464 686 464 607 831 874 205 517 932 1000 555 719 666 758 306 546 593 752 257 550 923 968 839 907 932 979 422 579 865 865 941 977 499 692 618 789 628 793 630 766 655 761 931 991 482 617 638 786 663...
output:
3878.5527203058
result:
ok error = 0.000000000
Subtask #7:
score: 23
Accepted
Test #88:
score: 23
Accepted
time: 0ms
memory: 5836kb
input:
500 50 170 253 450 885 684 995 425 830 76 273 249 856 188 360 410 635 457 765 184 217 364 807 74 675 504 883 768 975 714 814 222 922 144 940 704 878 780 949 256 325 113 997 436 692 683 812 154 655 227 816 666 750 645 940 537 579 267 671 474 972 188 403 65 459 606 671 375 495 590 722 238 998 157 790 ...
output:
368.1297619048
result:
ok error = 0.000000000
Test #89:
score: 23
Accepted
time: 3ms
memory: 5828kb
input:
500 50 621 709 721 966 896 937 884 911 865 993 714 915 736 840 740 753 615 796 717 976 825 872 622 788 955 964 903 983 882 972 643 797 648 826 648 855 784 839 871 935 683 813 885 968 706 707 636 844 896 933 737 743 629 909 905 936 688 957 712 767 972 983 678 900 633 731 683 985 843 987 689 835 812 9...
output:
2882.4745823040
result:
ok error = 0.000000000
Test #90:
score: 23
Accepted
time: 2ms
memory: 5868kb
input:
500 125 343 870 15 907 372 477 393 818 503 521 415 979 129 385 415 578 242 983 211 233 215 531 193 910 791 875 543 674 153 443 301 419 308 368 263 474 76 454 334 691 510 788 108 152 129 476 408 459 200 640 496 633 484 912 558 953 39 331 490 899 653 762 262 310 724 857 133 896 44 967 489 829 776 919 ...
output:
641.5151181260
result:
ok error = 0.000000000
Test #91:
score: 23
Accepted
time: 2ms
memory: 5676kb
input:
500 125 785 890 963 978 640 690 657 926 847 926 602 714 882 910 806 933 632 941 674 923 764 864 664 842 793 832 714 859 717 783 641 795 702 716 753 809 600 615 786 821 706 945 672 700 754 773 864 901 849 908 620 986 795 994 831 835 830 857 830 833 741 858 639 963 698 827 729 916 614 732 602 757 629 ...
output:
3543.8836038744
result:
ok error = 0.000000000
Test #92:
score: 23
Accepted
time: 11ms
memory: 5772kb
input:
500 250 904 938 748 933 232 445 209 736 251 399 156 840 29 923 131 988 200 214 271 773 552 664 157 827 181 641 160 913 405 915 544 571 218 448 126 916 112 694 438 536 488 944 708 922 299 688 233 723 103 962 62 85 525 581 438 581 695 852 834 981 131 379 41 614 491 663 299 585 447 680 176 434 75 157 3...
output:
955.8861020681
result:
ok error = 0.000000000
Test #93:
score: 23
Accepted
time: 3ms
memory: 5828kb
input:
500 250 629 951 763 855 614 864 667 962 692 827 634 855 920 986 970 997 600 641 680 885 744 746 907 966 796 798 716 761 621 854 815 872 843 905 809 992 682 891 748 790 706 750 698 897 680 772 714 779 662 987 890 905 670 857 785 837 773 875 807 812 784 872 658 925 629 962 837 993 659 765 743 1000 658...
output:
4225.9687876561
result:
ok error = 0.000000000
Test #94:
score: 23
Accepted
time: 13ms
memory: 5896kb
input:
500 375 332 564 621 979 202 471 174 761 757 895 385 847 535 777 200 737 346 394 124 748 154 455 239 863 714 715 60 862 452 588 671 729 224 398 419 870 148 437 968 976 140 419 14 991 124 280 175 699 185 679 110 345 107 633 629 842 53 278 796 800 174 420 750 954 20 477 834 872 11 780 426 760 696 983 9...
output:
1459.5140837496
result:
ok error = 0.000000000
Test #95:
score: 23
Accepted
time: 8ms
memory: 5812kb
input:
500 375 800 861 655 757 664 806 913 945 784 899 640 643 834 841 819 968 832 892 760 932 641 728 616 622 776 902 827 865 816 889 629 639 809 888 674 851 651 757 747 858 738 820 812 994 743 987 934 995 638 913 705 998 664 698 711 843 772 977 647 687 770 848 679 990 724 929 625 952 715 927 643 920 691 ...
output:
4543.5172691461
result:
ok error = 0.000000000
Test #96:
score: 23
Accepted
time: 10ms
memory: 5864kb
input:
500 450 394 517 311 554 622 688 420 615 330 636 6 972 119 191 376 629 99 397 297 901 10 31 152 367 889 904 792 892 514 826 9 507 724 751 507 996 122 225 33 819 508 595 33 630 333 877 59 352 326 820 651 725 403 994 762 861 224 580 565 811 440 694 176 673 65 203 167 520 238 601 57 650 38 907 146 816 5...
output:
1503.7968079258
result:
ok error = 0.000000000
Test #97:
score: 23
Accepted
time: 8ms
memory: 5900kb
input:
500 450 700 779 744 803 846 982 624 899 906 966 668 882 982 997 651 978 785 806 606 755 763 942 829 889 693 776 702 801 711 873 632 701 899 1000 666 772 731 818 638 838 666 779 678 905 610 948 734 930 764 776 654 821 854 860 970 989 688 883 782 801 646 705 757 787 727 966 818 985 611 707 698 796 806...
output:
4679.3552447889
result:
ok error = 0.000000000
Test #98:
score: 23
Accepted
time: 15ms
memory: 5820kb
input:
500 350 454 576 151 799 423 562 307 733 164 886 449 508 443 527 446 596 346 619 37 943 369 600 58 910 17 977 351 668 70 965 161 873 425 525 295 682 481 520 88 957 192 845 465 492 104 856 338 665 390 639 299 726 347 625 325 643 207 818 258 743 33 959 48 958 476 530 307 682 287 666 305 659 124 917 482...
output:
3006.7652979011
result:
ok error = 0.000000000
Test #99:
score: 23
Accepted
time: 19ms
memory: 5808kb
input:
500 350 160 818 18 1000 25 958 215 786 18 1000 61 973 87 917 196 780 58 902 66 925 124 835 47 913 161 835 25 938 106 915 220 811 133 903 218 830 57 980 216 816 193 850 130 908 231 725 95 880 228 801 239 721 190 858 100 927 45 953 148 866 196 772 223 727 244 775 211 808 138 827 190 854 251 785 144 84...
output:
3767.2089795903
result:
ok error = 0.000000000
Test #100:
score: 23
Accepted
time: 14ms
memory: 5820kb
input:
500 350 389 614 406 625 331 663 246 708 299 750 347 624 282 711 250 721 282 762 334 672 388 597 264 778 312 663 311 716 353 621 368 659 376 580 274 735 274 701 308 703 418 627 391 624 379 629 350 680 370 583 327 686 319 656 286 668 330 706 294 681 348 611 355 668 399 638 357 619 392 595 395 609 272 ...
output:
3691.7046047957
result:
ok error = 0.000000000
Test #101:
score: 23
Accepted
time: 11ms
memory: 5916kb
input:
500 350 576 892 463 886 430 810 505 945 470 729 334 647 353 600 634 991 526 949 380 712 386 715 656 998 484 782 510 789 453 841 590 876 503 777 482 768 547 977 495 823 399 773 412 609 429 663 517 971 531 779 412 727 570 982 529 935 446 796 329 641 410 623 350 623 403 777 390 649 562 912 576 947 335 ...
output:
3489.9814632569
result:
ok error = 0.000000000
Test #102:
score: 23
Accepted
time: 4ms
memory: 5872kb
input:
500 350 607 836 703 834 703 847 800 972 407 546 437 602 739 840 654 890 612 823 612 772 517 580 787 950 685 808 429 598 441 616 812 992 729 911 381 528 457 504 466 654 723 879 637 799 679 924 534 702 631 860 518 595 398 551 740 962 445 527 505 719 792 930 675 828 670 864 424 565 528 713 592 775 642 ...
output:
3505.9720675481
result:
ok error = 0.000000000
Test #103:
score: 23
Accepted
time: 7ms
memory: 5868kb
input:
500 350 590 680 419 607 623 742 545 676 627 754 292 569 878 879 900 900 844 903 371 553 918 918 743 836 973 973 447 670 310 567 454 594 776 845 494 671 392 638 924 985 322 525 966 991 710 837 740 796 444 613 355 586 614 727 879 884 815 916 767 867 969 969 810 908 861 932 700 805 332 550 762 837 528 ...
output:
3562.0854954342
result:
ok error = 0.000000000
Test #104:
score: 23
Accepted
time: 8ms
memory: 5876kb
input:
500 350 993 993 100 525 408 663 963 963 376 634 441 659 990 990 769 839 241 557 324 589 854 936 730 837 91 507 945 945 281 605 890 969 699 799 120 525 154 531 509 720 173 575 943 943 503 733 388 637 741 852 740 872 201 554 349 649 256 581 213 528 810 880 284 604 954 967 287 615 812 872 896 919 282 6...
output:
3476.2567559925
result:
ok error = 0.000000000
Test #105:
score: 23
Accepted
time: 10ms
memory: 5896kb
input:
500 350 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 1000 1 100...
output:
350.0000000000
result:
ok error = 0.000000000