HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


Goal Parser

Section problems

• E_Blocks_Subtask_4
• F. Kitten
• F. Marriage
• F. opposition
• F. Гонки
• G. Loudcats
• G. Suffixgame
• G. Робот
• Goal Parser
• H. Message
• H. Odd
• H. Санта Клаус
• Hello World!
• Hypotenuse
• I. Python
• I. tic-tac-toe
• I. Подстрока

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Difficulty Alpha

You own a Goal Parser that can interpret a string command. The command consists of an alphabet of "G", "()" and/or "(al)" in some order. The Goal Parser will interpret "G" as the string "G", "()" as the string "o", and "(al)" as the string "al". The interpreted strings are then concatenated in the original order.
Given the string command, return the Goal Parser's interpretation of command.
Сизге "Goal" парсер берилди.Ал сиз жоноткон буйруктарды(командаларды) которот.Буйруктар:"G"="G", ()=o , (al)=al. Которулган буйруктарды бириктирип жыйынтыгын чыгарып бергиле?
Input: "G()()()()(al)"
Output: "Gooooal"

Input: command = "(al)G(al)()()G"
Output: "alGalooG"

Для отправки решений необходимо выполнить вход.

www.contester.ru