HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


Goal Parser

Section problems

• Distinct Numbers
• Dice Combinations
• Collecting Numbers
• Maximum Subarray Sum
• Static Range Sum Queries
• A+B
• B. Влюбленная Duff
• B. Песня о любви
• Goal Parser
• Keyboard Row
• Word Break
• А. Любовь «А»
• Sort People
• Баскетбольная команда
• Бириктирилген создук
• Бутун сандар массиви
• Вирусы

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