{"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":"72810935-74a4-5056-9a57-c29ed37d7fef","task_key":"ICPC~2dWorld~2dFinals--examples--2020~5fI","task_revision_id":"2","upstream_id":"2020_I","short_description":"Quests","config":"ICPC-World-Finals","split":"examples","body":"{\"platform\":\"atcoder\",\"question_content\":\"## Problem Description\\n\\nTo relax before competing in the ICPC World Finals, you have decided to play a computer game called Quests. You have played it a number of times already, and now you want to achieve a perfect playthrough—to prepare for your perfect playthrough of the finals!\\n\\nIn the game, you have to complete a number of quests, and you earn experience points (XPs) for completing each one. The total number of XPs you have earned at any time determines your current level. You reach a new level for every \\\\( v \\\\) XPs that you earn. Formally, your level at any time is the largest integer \\\\( L \\\\) such that you have at least \\\\( L \\\\cdot v \\\\) XPs.\\n\\nEach quest is assigned a number \\\\( x \\\\) of XPs and a target difficulty level \\\\( d \\\\). If you complete the quest when your level is at least \\\\( d \\\\), you earn \\\\( x \\\\) XPs. However, if you complete the quest when your level is less than \\\\( d \\\\), you will earn \\\\( c \\\\cdot x \\\\) XPs. The constant \\\\( c \\\\) is an XP multiplier that results in a bonus for completing a quest when you are at a lower level than the recommended level \\\\( d \\\\).\\n\\nYou know all the \\\\( n \\\\) quests and their respective \\\\( x \\\\) and \\\\( d \\\\) numbers by heart (and you know the numbers \\\\( v \\\\) and \\\\( c \\\\) as well—you have played this game a lot). You are also skilled enough to complete any quest, regardless of its target difficulty level and your level. You want to complete all the quests in an order that will allow you to earn the largest possible number of XPs.\\n\\nFor example, in the sample input, the maximum XPs you can earn is 43, which is done as follows:\\n- First complete the second quest (you earn 4 XPs, because you are at level 0, and you completed a quest with target difficulty level 2).\\n- Then complete the first quest (you earn 30 XPs, because you are still at level 0, and the target difficulty level is 1).\\n- With 34 XPs, you are now level 3.\\n- Finally, complete the third quest (for which you earn 9 XPs, without the multiplier, since you are already at level 3).\\n\\n## Input\\n\\n- The first line of input contains three integers \\\\( n \\\\), \\\\( v \\\\), and \\\\( c \\\\), where \\\\( n \\\\) \\\\((1 \\\\leq n \\\\leq 2000)\\\\) is the number of quests in the game, \\\\( v \\\\) \\\\((1 \\\\leq v \\\\leq 2000)\\\\) is the number of XPs required to reach each level, and \\\\( c \\\\) \\\\((2 \\\\leq c \\\\leq 2000)\\\\) is the XP multiplier for completing a quest before reaching its target difficulty level.\\n- Following that are \\\\( n \\\\) lines, each of which contains two integers \\\\( x \\\\) and \\\\( d \\\\) describing one quest, where \\\\( x \\\\) \\\\((1 \\\\leq x \\\\leq 2000)\\\\) is the number of XPs you earn for completing that quest if you are at or above its target difficulty level and \\\\( d \\\\) \\\\((1 \\\\leq d_i \\\\leq 10^6)\\\\) is the target difficulty level for that quest.\\n\\n## Output\\n\\n- Output the maximum possible number of XPs you could earn by finishing all the quests.\\n\\n## Sample Input 1\\n\\n```\\n3 10 2\\n15 1\\n2 2\\n9 1\\n```\\n\\n## Sample Output 1\\n\\n```\\n43\\n```\",\"question_title\":\"Quests\"}","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":[]}