{"problem":{"name":"Potion","description":{"content":"There are $N$ kinds of materials. Material $i$ has a magic power of $A_i$. Takahashi, the magician, wants to make a potion by choosing one or more kinds from these materials and mixing them. At the mo","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc192_f"},"statements":[{"statement_type":"Markdown","content":"There are $N$ kinds of materials. Material $i$ has a magic power of $A_i$.\nTakahashi, the magician, wants to make a potion by choosing one or more kinds from these materials and mixing them.\nAt the moment when he makes a potion by mixing $k$ kinds of materials, the magic power of the potion is the sum of the materials used. Then, every second, its magic power increases by $k$. Note that the increase of the magic power is a discrete - not continuous - process.\nTakahashi will mix materials just once, at time $0$. What is the earliest time he can get a potion with a magic power of exactly $X$?\nUnder the constraints, it can be proved that it is possible to make a potion with a magic power of exactly $X$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 100$\n*   $1 \\leq A_i \\leq 10^7$\n*   $10^9 \\leq X \\leq 10^{18}$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $X$\n$A_1$ $\\ldots$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc192_f","tags":[],"sample_group":[["3 9999999999\n3 6 8","4999999994\n\nThe potion made by mixing Material $1$ and Material $3$ has a magic power of $3+8=11$ at time $0$, and it increases by $2$ every second, so it will be $9999999999$ at time $4999999994$, which is the earliest possible time.\nThe potion made by mixing all the materials $1, 2, 3$ will have a magic power of $9999999998$ at time $3333333327$ and $10000000001$ at time $3333333328$, so it will never be exactly $9999999999$."],["1 1000000000000000000\n1","999999999999999999"]],"created_at":"2026-03-03 11:01:14"}}