{"problem":{"name":"099. Autobahn","description":{"content":"Autobahn You are about to drive on the Autobahn. You have several different cars, and you're trying to decide which one to take on the Autobahn. The different cars have differing fuel efficiencies, m","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269099"},"statements":[{"statement_type":"Markdown","content":"Autobahn\n\nYou are about to drive on the Autobahn. You have several different cars, and you're trying to decide which one to take on the Autobahn. The different cars have differing fuel efficiencies, measured in miles per gallon (MPG), and the cars have different top speeds. You calculate a car's _score_ as its fuel efficiency (MPG) multiplied by its top speed. \n\nGiven the list of possible cars, your task is to sort them by their score.\n\nThe first line of input contains a single positive integer $n$: the number of cars. The next $n$ lines each contain the data for a car: the name of the car, its fuel efficiency in MPG, and its top speed.\n\nOutput $n$ lines, each consisting of a car, sorted by their score as described above. Each line should be in the same format as its corresponding line in the input file. The car with the lowest score should appear first, and the car with the highest score should appear last. If two or more cars have equal scores, sort them alphabetically by the names of each car. \n\n## Input\n\nThe first line of input contains a single positive integer $n$: the number of cars. The next $n$ lines each contain the data for a car: the name of the car, its fuel efficiency in MPG, and its top speed.\n\n## Output\n\nOutput $n$ lines, each consisting of a car, sorted by their score as described above. Each line should be in the same format as its corresponding line in the input file. The car with the lowest score should appear first, and the car with the highest score should appear last. If two or more cars have equal scores, sort them alphabetically by the names of each car. \n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of cars.  \nLet $ C = \\{ (name_i, mpg_i, speed_i) \\mid i \\in \\{1, \\dots, n\\} \\} $ be the set of cars, where:  \n- $ name_i \\in \\mathbb{S} $ is the car name (string),  \n- $ mpg_i \\in \\mathbb{R}^+ $ is the fuel efficiency in miles per gallon,  \n- $ speed_i \\in \\mathbb{R}^+ $ is the top speed.  \n\nThe score of car $ i $ is defined as:  \n$$ s_i = mpg_i \\cdot speed_i $$\n\n**Constraints**  \n1. $ 1 \\le n \\le 10^5 $ (implied by typical problem constraints; not explicitly given but standard)  \n2. $ mpg_i > 0 $, $ speed_i > 0 $ for all $ i $  \n3. Car names are non-empty strings (assumed alphanumeric or printable ASCII)\n\n**Objective**  \nSort the cars in ascending order of $ s_i $.  \nIf $ s_i = s_j $, sort alphabetically by $ name_i $ in ascending lexicographical order.  \nOutput the original input lines (name, mpg, speed) in the sorted order.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269099","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}