{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"hlce","formal_name":"Humanity's Last Code Exam","introduction":"Humanity's Last Code Exam evaluates problem solving and code generation using ICPC World Finals and IOI problems. The project describes 235 problems; this import selects its public ICPC dataset of 146 problems.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://humanity-s-last-code-exam.github.io/website/","indexing_mode":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"2d77e91d-ee0b-5f55-b188-30a53aa4de8d","task_key":"ICPC~2dWorld~2dFinals--examples--2014~5fB","task_revision_id":"2","upstream_id":"2014_B","short_description":"Buffed Buffet","config":"ICPC-World-Finals","split":"examples","body":"{\"platform\":\"atcoder\",\"question_content\":\"## Problem Description\\n\\nYou are buying lunch at a buffet. A number of different dishes are available, and you can mix and match them to your heart’s desire. Some of the dishes, such as dumplings and roasted potatoes, consist of pieces of roughly equal size, and you can pick an integral number of such pieces (no splitting is allowed). Refer to these as “discrete dishes.” Other dishes, such as tzatziki or mashed potatoes, are fluid and you can pick an arbitrary real-valued amount of them. Refer to this second type as “continuous dishes.”\\n\\nOf course, you like some of the dishes more than others, but how much you like a dish also depends on how much of it you have already eaten. For instance, even if you generally prefer dumplings to potatoes, you might prefer a potato over a dumpling if you have already eaten ten dumplings. To model this, each dish \\\\(i\\\\) has an initial tastiness \\\\(t_i\\\\), and a rate of decay of the tastiness \\\\(\\\\Delta t_i\\\\). For discrete dishes, the tastiness you experience when eating the \\\\(n\\\\)-th item of the dish is \\\\(t_i - (n - 1)\\\\Delta t_i\\\\). For continuous dishes, the tastiness you experience when eating an infinitesimal amount \\\\(dx\\\\) grams of the dish after already having eaten \\\\(x\\\\) grams is \\\\((t_i - x\\\\Delta t_i)dx\\\\). In other words, the respective total amounts of tastiness you experience when eating \\\\(N\\\\) items of a discrete dish or \\\\(X\\\\) grams of a continuous dish are as follows:\\n\\n\\\\[\\n\\\\sum_{n=1}^{N} (t_i - (n - 1)\\\\Delta t_i) \\\\quad \\\\text{and} \\\\quad \\\\int_{0}^{X} (t_i - x\\\\Delta t_i) \\\\, dx\\n\\\\]\\n\\nFor simplicity, do not take into account that different dishes may or may not go well together, so define the total tastiness that you experience from a meal as the sum of the total tastinesses of the individual dishes in the meal (and the same goes for the weight of a meal – there are no food antiparticles in the buffet!).\\n\\nYou have spent days of painstaking research determining the numbers \\\\(t_i\\\\) and \\\\(\\\\Delta t_i\\\\) for each of the dishes in the buffet. All that remains is to compute the maximum possible total tastiness that can be achieved in a meal of weight \\\\(w\\\\). Better hurry up, lunch is going to be served soon!\\n\\n### Input\\n\\nThe input consists of a single test case. The first line of input consists of two integers \\\\(d\\\\) and \\\\(w\\\\) \\\\((1 \\\\leq d \\\\leq 250 \\\\text{ and } 1 \\\\leq w \\\\leq 10,000)\\\\), where \\\\(d\\\\) is the number of different dishes at the buffet and \\\\(w\\\\) is the desired total weight of your meal in grams.\\n\\nThen follow \\\\(d\\\\) lines, the \\\\(i\\\\)-th of which describes the \\\\(i\\\\)-th dish. Each dish description is in one of the following two forms:\\n\\n- A description of the form “D \\\\(w_i\\\\) \\\\(t_i\\\\) \\\\(\\\\Delta t_i\\\\)” indicates that this is a discrete dish where each item weighs \\\\(w_i\\\\) grams, with initial tastiness \\\\(t_i\\\\) and decay of tastiness \\\\(\\\\Delta t_i\\\\).\\n- A description of the form “C \\\\(t_i\\\\) \\\\(\\\\Delta t_i\\\\)” indicates that this is a continuous dish with initial tastiness \\\\(t_i\\\\) and decay of tastiness \\\\(\\\\Delta t_i\\\\).\\n\\nThe numbers \\\\(w_i\\\\), \\\\(t_i\\\\), and \\\\(\\\\Delta t_i\\\\) are integers satisfying \\\\(1 \\\\leq w_i \\\\leq 10,000\\\\) and \\\\(0 \\\\leq t_i, \\\\Delta t_i \\\\leq 10,000\\\\).\\n\\n### Output\\n\\nDisplay the maximum possible total tastiness of a meal of weight \\\\(w\\\\) based on the available dishes. Give the answer with a relative or absolute error of at most \\\\(10^{-6}\\\\). If it is impossible to make a meal of total weight exactly \\\\(w\\\\) based on the available dishes, display `impossible`.\\n\\n### Sample Input 1\\n```\\n2 15\\nD 4 10 1\\nC 6 1\\n```\\n\\n### Sample Output 1\\n```\\n40.500000000\\n```\\n\\n### Sample Input 2\\n```\\n3 15\\nD 4 10 1\\nC 6 1\\nC 9 3\\n```\\n\\n### Sample Output 2\\n```\\n49.000000000\\n```\\n\\n### Sample Input 3\\n```\\n2 19\\nD 4 5 1\\nD 6 3 2\\n```\\n\\n### Sample Output 3\\n```\\nimpossible\\n```\",\"question_title\":\"Buffed Buffet\"}","display_format":"text","language":"","answer_status":"published","assets":[],"source_url":"https://humanity-s-last-code-exam.github.io/website/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}