3 2 5 10 6 8
2 Consider the case where Takahashi chooses the first and third cups and drinks them. Two out of the three cups contain sake, so the following three cases are possible: * If the first and second cups contain sake He drinks $10$ ml of sake and $8$ ml of water. * If the first and third cups contain sake He drinks $18$ ml of sake. * If the second and third cups contain sake He drinks $8$ ml of sake and $10$ ml of water. Thus, in all cases, he can drink at least $5$ ml of sake. On the other hand, it is impossible to satisfy the condition by choosing only one cup without knowing which cups contain sake. Therefore, print $2$.
2 1 8 6 10
\-1 If the first cup contained sake, it is impossible to drink $8$ ml or more of sake no matter which cups are chosen. Therefore, print $-1$.
5 3 3000000000 1000000000 1000000000 1000000000 1000000000 1000000000
5
{
"problem": {
"name": "Sake or Water",
"description": {
"content": "There are $N$ cups, each containing a colorless and transparent liquid. Specifically, the $i$\\-th $(1\\leq i\\leq N)$ cup contains $A_i$ ml of liquid. It is known that exactly $K$ of these cups cont",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc441_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There are $N$ cups, each containing a colorless and transparent liquid. \nSpecifically, the $i$\\-th $(1\\leq i\\leq N)$ cup contains $A_i$ ml of liquid. \nIt is known that exactly $K$ of these cups cont...",
"is_translate": false,
"language": "English"
}
]
}