CT34641

Violet windows Calm Window

MediumL4 · Loop LordAcceptance: 0.0%XP: 35

Deep in the smokehouses of Brineport, Sarla studies rows of windows entries. One clean number will settle the guild's oldest argument. 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 <= 2801; -1000000 <= a[i] <= 1000000000.

Example 1:

Input: 764 129 144540177 797144066 117971918 499794221 121765203 262993251 88965962 193273355 881059891 12767533 51003330 452379535 885739196 369373140 190619367 50137166 685436934 439807143 297163868 626240110 386577624 116495379 945032076 997945188 690845408 712159455 967091116 68835977 357631969 889134211 112778621 384959937 522140478 30320661 651948174 614233041 187042737 329159594 873578718 228960273 931327831 978574413 845945917 410311273 813297792 543699437 818260300 502139223 593428530 757683740 638813850 598325609 902730808 575639731 969893260 433155183 242922256 136001188 558830741 542116228 443008653 517765083 568415577 909994586 13213999 147720471 833738 842280209 286572255 481055705 984885754 961964426 733087692 298946235 747437351 200222535 945625030 414858867 961681235 748909172 58…
Output: 54913369546

Example 2:

Input: 1104 1034 87685580 208477526 840283444 759270727 669596449 80162429 301462024 66655894 905944482 250228749 96005149 631571231 235103531 789501445 361302705 135070461 815952792 368535193 529043834 602422611 223829593 682754967 461116 771870521 760836512 37749125 494484938 114665338 672212918 276126725 983027539 442267167 639902094 645300982 70477698 526344354 962561290 666542159 731914612 765229070 901107246 441899061 184442574 350682479 770002186 374689793 477857424 783824337 551033403 403884964 475129602 978431165 375156909 397569216 557255753 377179018 348289068 745137689 616332287 279885238 103825823 20286308 620658455 317740090 620793720 384915909 674058388 701364074 686421529 71314186 156863319 647350038 204615071 120553149 432224646 904852451 958485578 838013363 694273906 372613002 1…
Output: 508845807695

Example 3:

Input: 2427 67 380424352 21613746 226473542 57348916 452106934 382072690 496516890 581667192 893144486 691460391 592225622 779577381 300628383 509331943 802767498 136835139 360999617 122354860 787130325 853366013 657585187 508666741 62048846 432929322 534574238 188529397 837660407 352604404 621698023 577005288 463563411 272213141 876630600 266975063 720415970 589773488 852962275 813895556 776871990 699819254 110634692 497571904 508612703 313807598 503121638 173003858 76903767 379368751 437306003 589839933 411565371 91555113 975200277 155968709 858940236 782415487 63135411 434329180 29595270 403993953 774401924 122075711 163630513 916045205 491452234 902273243 634253350 952254847 711067469 742263675 980580930 771670222 794116941 418818236 332386386 4450721 -377157 528674267 642939706 609882448 459…
Output: 26776561838

Constraints:

1 <= k <= n <= 2801; -1000000 <= a[i] <= 1000000000.

Loading...
Test Cases:No test cases
No test cases available.
Violet windows Calm Window - MEDIUM Coding Problem | CodeTikki