{"problem":{"name":"Snake Toy","description":{"content":"Snuke has $N$ sticks. The length of the $i$\\-th stick is $l_i$. Snuke is making a snake toy by joining $K$ of the sticks together. The length of the toy is represented by the sum of the individual sti","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc067_b"},"statements":[{"statement_type":"Markdown","content":"Snuke has $N$ sticks. The length of the $i$\\-th stick is $l_i$.\nSnuke is making a snake toy by joining $K$ of the sticks together.\nThe length of the toy is represented by the sum of the individual sticks that compose it. Find the maximum possible length of the toy.\n\n## Constraints\n\n*   $1 \\leq K \\leq N \\leq 50$\n*   $1 \\leq l_i \\leq 50$\n*   $l_i$ is an integer.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $K$\n$l_1$ $l_2$ $l_3$ $...$ $l_{N}$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc067_b","tags":[],"sample_group":[["5 3\n1 2 3 4 5","12\n\nYou can make a toy of length $12$ by joining the sticks of lengths $3$, $4$ and $5$, which is the maximum possible length."],["15 14\n50 26 27 21 41 7 42 35 7 5 5 36 39 1 45","386"]],"created_at":"2026-03-03 11:01:14"}}