CT48386

The Crimson panels of Yara

MediumL5 · Recursion RenegadeAcceptance: 0.0%XP: 60

Every season at the mangrove channels of Rootwater, someone must verify the safety inspections. This year the task falls to Yara, armed only with the panels register. Task: Print the minimum sum of any contiguous subarray of length exactly k. Input format: First line: n and k. Second line: n integers. Output format: Print the minimum window sum. Constraints: 1 <= k <= n <= 2854; 0 <= a[i] <= 1000000000.

Example 1:

Input: 221 129 999115075 793202142 299201110 812102331 189322566 672720175 593583488 539172513 519531523 390124023 443245430 733443870 92316404 715661602 171825923 418223892 222649989 86867020 60603038 735629792 388093297 755893123 680077650 270336036 268805555 843033425 863608514 776267107 79070994 460023805 293498427 975854697 686801680 112117458 123805641 581192953 82623759 926902453 695958886 213987903 400855198 54268509 720263362 82243745 230140438 645378148 606530172 615800537 213691502 446715309 405314874 360236114 214375678 608089057 529432208 836266955 989560852 898244195 683768336 827917770 189818644 514891124 399933907 121614421 745674717 813630743 756431396 353974991 409356887 832717805 736319308 596796833 939633133 572278197 650551384 8811633 946993661 650076249 819679688 413336841 7…
Output: 65176123266

Example 2:

Input: 2278 1373 411807657 322660152 806242494 313154176 566371391 741829793 445553883 871688674 353534032 546130364 707426698 540342005 507123868 734302070 336853091 238644075 387088972 902891459 432555752 656321318 257490568 387184721 588209694 407841632 124817027 539429618 585139195 280952187 55444625 167668737 522385189 696544179 218275421 101532498 697722145 591845503 760487601 212972492 481322885 632120803 956997457 400264386 504187715 425250047 697310900 759612941 913680917 144704909 788152209 319731495 65733902 78798674 916583516 500715896 762311343 164644558 950308948 277534291 793310187 805036205 556860276 810116993 550365947 298632303 496570542 252837694 705436717 681763917 562112136 548420635 89114796 346108960 857947505 68930558 811063980 818919974 328225533 149431416 488879275 87984…
Output: 676818197460

Example 3:

Input: 828 406 830746929 62337763 961430829 327662517 201122426 503916310 257371340 554525862 999627782 438258724 165025055 894555575 900302814 37221908 397452201 320124725 37006204 530499399 955300401 766138719 910179814 856511939 507052423 461384510 546389801 793677988 170520202 691875803 409245675 381474531 956186884 200499112 135700641 651083195 866860329 207670652 656327567 744511254 845533102 40087218 165618935 857840276 60933476 198031330 705575032 63164597 284655458 566222147 216374115 630444636 228271547 272393437 824850223 700108676 888348862 436983695 395548794 723847208 113842414 535187296 297537727 668979413 958479299 304162670 329514235 510542750 134241351 41418819 336266241 991552632 240018510 361771563 651505142 934019599 598371389 360131095 147353293 833691063 28569774 538309566 …
Output: 189321469719

Constraints:

1 <= k <= n <= 2854; 0 <= a[i] <= 1000000000.

Loading...
Test Cases:No test cases
No test cases available.