CT26001

The Azure weights of Piper

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The council of the kelp forests of Tangledeep pays by the answer, and Piper intends to earn it. First: the full register of weights. Task: Print the k-th smallest element (1-based; duplicates count separately). Input format: First line: n and k. Second line: n integers. Output format: Print the k-th smallest value. Constraints: 1 <= k <= n <= 782; -1000000 <= a[i] <= 1000000000.

Example 1:

Input: 376 373 814947141 574870118 477598703 483427613 39888306 225666930 397767929 852680237 959152321 147786119 570411084 319158480 59141805 824219979 280890362 659307935 158991347 525324677 622568304 393363135 346128600 189179587 43009868 945229238 899868611 638488411 416298813 277316958 656605891 379793596 671309625 731812934 237955627 435007034 291229205 581567155 755692260 17631212 109140867 691566512 280343536 150488354 347187894 860483881 513824244 656365111 239077752 549998547 183135155 119908027 650491413 186120864 796499016 819955309 74560311 157379911 216161890 243304656 499427318 610350625 776356499 68212025 567077922 115882852 801954051 998066470 470176768 966874290 686262247 541534931 543610004 670875495 343835888 349659134 163385318 996122516 663558113 871990146 144768900 67946656…
Output: 989653205

Example 2:

Input: 529 387 575888458 498926407 571679154 278158776 220943591 267475365 348987765 777230175 292906163 274673076 407234883 41685838 9961873 597921560 567423589 339024963 356506063 927403584 550986289 723095577 393489786 218143041 585050940 659533975 467706172 240741140 709452064 472833236 668209964 757046025 410475183 430929242 276913641 391498608 19992464 171377581 523743079 456611411 563628705 880250864 6938610 891540129 766623771 109328663 15133032 444446122 627252045 515302255 848536240 972486598 473075280 696276294 24829769 540139176 462683788 926829721 841232623 145002914 553510298 50858364 823155256 696184651 673884684 41873126 287046787 329050013 437163897 957058107 468187960 79268002 521317691 913545483 140952566 84396827 784482661 95677663 861058392 63098736 772674111 89834417 1345576…
Output: 763149332

Example 3:

Input: 91 7 667229034 119728042 992724442 138134534 517601366 903610095 747739082 418665774 267241113 660397873 453123422 354263478 242257416 915567749 18401622 442189592 362943209 169661805 684769299 361878583 304652708 28617529 223245859 463567602 803141428 297267356 52838471 796983281 686537759 959373687 619190230 432982592 72077118 637382951 726700974 451365834 969370037 12210010 421739349 909489602 142279551 799932200 322233770 18455143 729243826 868157495 302697821 26744836 760747577 216527973 412754370 936950206 979210404 786879830 837477794 816365532 321677656 487143821 218400445 62346706 204047254 382654390 448141566 763656458 635280334 229088304 21355496 752780431 50837780 240849560 477617145 866774479 200674713 392395210 17535489 472299303 468149903 346052964 793774120 668141864 411185…
Output: 28617529

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Azure weights of Piper - EASY Coding Problem | CodeTikki