{"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":"e380f2fd-54e7-55a0-8ee9-1b9e57a6963a","task_key":"ICPC~2dWorld~2dFinals--examples--2012~5fC","task_revision_id":"3","upstream_id":"2012_C","short_description":"Bus Tour","config":"ICPC-World-Finals","split":"examples","body":"{\"platform\":\"atcoder\",\"question_content\":\"## Problem Description\\n\\nImagine you are a tourist in Warsaw and have booked a bus tour to see some amazing attraction just outside of town. The bus first drives around town for a while (a long while, since Warsaw is a big city) picking up people at their respective hotels. It then proceeds to the amazing attraction, and after a few hours goes back into the city, again driving to each hotel, this time to drop people off.\\n\\nFor some reason, whenever you do this, your hotel is always the first to be visited for pickup, and the last to be visited for dropoff, meaning that you have to suffer through two not-so-amazing sightseeing tours of all the local hotels. This is clearly not what you want to do (unless for some reason you are really into hotels), so let’s fix it. We will develop some software to enable the sightseeing company to route its bus tours more fairly—though it may sometimes mean longer total distance for everyone, but fair is fair, right?\\n\\nFor this problem, there is a starting location (the sightseeing company headquarters), \\\\( h \\\\) hotels that need to be visited for pickups and dropoffs, and a destination location (the amazing attraction). We need to find a route that goes from the headquarters, through all the hotels, to the attraction, then back through all the hotels again (possibly in a different order), and finally back to the headquarters. In order to guarantee that none of the tourists (and, in particular, you) are forced to suffer through two full tours of the hotels, we require that every hotel that is visited among the first \\\\( \\\\left\\\\lfloor \\\\frac{h}{2} \\\\right\\\\rfloor \\\\) hotels on the way to the attraction is also visited among the first \\\\( \\\\left\\\\lfloor \\\\frac{h}{2} \\\\right\\\\rfloor \\\\) hotels on the way back. Subject to these restrictions, we would like to make the complete bus tour as short as possible. Note that these restrictions may force the bus to drive past a hotel without stopping there (this is not considered visiting) and then visit it later, as illustrated in the first sample input.\\n\\n## Input\\n\\nThe first line of each test case consists of two integers \\\\( n \\\\) and \\\\( m \\\\) satisfying \\\\( 3 \\\\leq n \\\\leq 20 \\\\) and \\\\( 2 \\\\leq m \\\\), where \\\\( n \\\\) is the number of locations (hotels, headquarters, attraction) and \\\\( m \\\\) is the number of pairs of locations between which the bus can travel.\\n\\nThe \\\\( n \\\\) different locations are numbered from 0 to \\\\( n-1 \\\\), where 0 is the headquarters, 1 through \\\\( n-2 \\\\) are the hotels, and \\\\( n-1 \\\\) is the attraction. Assume that there is at most one direct connection between any pair of locations and it is possible to travel from any location to any other location (but not necessarily directly).\\n\\nFollowing the first line are \\\\( m \\\\) lines, each containing three integers \\\\( u, v, \\\\) and \\\\( t \\\\) such that \\\\( 0 \\\\leq u, v \\\\leq n-1 \\\\), \\\\( u \\\\neq v \\\\), \\\\( 1 \\\\leq t \\\\leq 3600 \\\\), indicating that the bus can go directly between locations \\\\( u \\\\) and \\\\( v \\\\) in \\\\( t \\\\) seconds (in either direction).\\n\\n## Output\\n\\nFor each test case, display the case number and the time in seconds of the shortest possible tour.\\n\\n## Sample Input\\n\\n```\\n5 4\\n0 1 10\\n1 2 20\\n2 3 30\\n3 4 40\\n4 6\\n0 1 1\\n0 2 1\\n0 3 1\\n1 2 1\\n1 3 1\\n2 3 1\\n```\\n\\n## Output for Sample Input\\n\\n```\\nCase 1: 300\\nCase 2: 6\\n```\",\"question_title\":\"Bus Tour\"}","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":[]}