{"problem":{"name":"036. Speed Limits","description":{"content":"You are going on a long road trip, and want to know what the maximum speed limit is in each state that you are traveling through.  The first line of input contains a positive integer _S_, indicating ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269036"},"statements":[{"statement_type":"Markdown","content":"You are going on a long road trip, and want to know what the maximum speed limit is in each state that you are traveling through. \n\nThe first line of input contains a positive integer _S_, indicating the number of states that are in the database. The next _S_ lines each contain a string representing the name of the state, a space, and an integer representing the maximum speed limit in that state. Names of states will not contain spaces. The next line of input contains a positive integer _T_ indicating the number of test cases that follow. Each test case will consist of a state name.\n\nFor each of the _T_ test cases, output a single integer: the maximum speed limit in the given state, from the database.\n\n## Input\n\nThe first line of input contains a positive integer _S_, indicating the number of states that are in the database. The next _S_ lines each contain a string representing the name of the state, a space, and an integer representing the maximum speed limit in that state. Names of states will not contain spaces. The next line of input contains a positive integer _T_ indicating the number of test cases that follow. Each test case will consist of a state name.\n\n## Output\n\nFor each of the _T_ test cases, output a single integer: the maximum speed limit in the given state, from the database.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ S \\in \\mathbb{Z}^+ $ be the number of states in the database.  \nLet $ D = \\{ (s_i, v_i) \\mid i \\in \\{1, \\dots, S\\} \\} $ be the database, where:  \n- $ s_i $ is a string denoting the name of state $ i $,  \n- $ v_i \\in \\mathbb{Z}^+ $ is the maximum speed limit in state $ s_i $.  \n\nLet $ T \\in \\mathbb{Z}^+ $ be the number of test cases.  \nLet $ Q = (q_1, q_2, \\dots, q_T) $ be a sequence of state names (queries), where each $ q_j $ is a string.\n\n**Constraints**  \n1. $ 1 \\le S \\le 100 $  \n2. $ 1 \\le T \\le 100 $  \n3. Each $ s_i $ and $ q_j $ is a non-empty string without spaces.  \n4. Each $ v_i \\in \\{1, 2, \\dots, 150\\} $  \n\n**Objective**  \nFor each query $ q_j \\in Q $, output the speed limit $ v_i $ such that $ (s_i, v_i) \\in D $ and $ s_i = q_j $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269036","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}