Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Prob C Notes : IN C LANGUAGE USE BASIC CODE INPUT AND OUTPUT MUST BE SAME Google Translate KW Super One day_Jaja is typing something
Prob C
Notes : IN C LANGUAGE
USE BASIC CODE
INPUT AND OUTPUT MUST BE SAME
Google Translate KW Super One day_Jaja is typing something while drinking tea and eating snacks. It turns out he is making the very problem you're reading right now. One of his biggest pet peeves about making these algorithm problems is that the description has to be written in two languages: English and Indonesian, this means that he has to write the exact same sen tences twice in different languages. Because Joje is a lazy guy, he asks for your help to create a simple translator program so that he only needs to write the problem description in English and let the program translate it to Indonesian. The translator program works as follows: first the program will be given a "dictionary" which contains N English words and their translation in Indonesian. The program will then translate an English sentence simply by replacing each word in the sentence with its translation according to the dictionary. If a word doesn't exist in the dictionary, then the program will just display that word again. Now help deja to create this translator program! Format Input The first line contains a single number I, the number of testcases. Each testcase contains a single number N, the number of words in the dictionary. The next N lines contain the word Ai and Bi, where Ai is a English word and Bi is the Indonesian translation of that word. The next line contains Q which is the number of words in the sentence to be translated followed by another line containing all Q words that are in the sentence separated by space. Format Output For each testcase, output one line starting with Case #X: (without quotes) where X is the testcase number (starting from 1) followed by the translation of the English sentence. Constraints Let's say that Ci means the i-th word on the English sentence to translate. 1ST s 10 15N, Q teh dan makan camilan Case #2: ada seorang impostor antara kita dan saya adalah --> seorang impostorStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started