QOJ.ac

QOJ

時間限制: 1 s 記憶體限制: 1024 MB 總分: 100 可 Hack ✓

#18388. 結合跆拳道與拳擊的運動

统计

*태보 (Tae Bo) 是一種結合了跆拳道 (Taekwondo) 與拳擊 (Boxing) 的運動!

TAE BO DIET, 2003

Kuong 在看了 Tae Bo 之後,產生了這樣的想法:「如果跆拳道和拳擊結合起來是 Tae Bo,那麼射箭 (Archery) 和舉重 (Powerlifting) 結合起來會不會是『洋蔥』(Yang-Pa) 呢?我也來創造一種運動吧!」

將運動 $A$ 與 $B$ 的名稱結合,會產生一個新的運動名稱,該名稱由 $A$ 的第一個音節與 $B$ 的第一個音節連接而成。如果兩者中任一者不存在第一個音節,則無法創造出新的運動名稱。

字串的第一個音節定義為:包含字串的第一個母音,且不包含其後出現的第一個子音的最長前綴。如果字串中沒有母音,或者第一個母音之後沒有子音,則第一個音節不存在。以下是幾個字串的第一個音節範例:

  • taekwondo $\rightarrow$ tae
  • boxing $\rightarrow$ bo
  • tae 因為沒有子音,所以第一個音節不存在。
  • ski 雖然有母音,但第一個母音之後沒有子音,所以第一個音節不存在。

母音定義為 a, e, i, o, u 這 5 個字母,子音則為除了這 5 個字母以外的所有字母。

請輸出 Kuong 所創造的新運動名稱。

輸入格式

第一行給定運動 $A$ 的名稱 $S_A$ ($1 \le |S_A| \le 100$)。

第二行給定運動 $B$ 的名稱 $S_B$ ($1 \le |S_B| \le 100$)。

運動名稱皆僅由英文小寫字母組成。

輸出格式

輸出運動 $A$ 與運動 $B$ 結合後的新運動名稱。

如果根據給定規則無法創造出運動名稱,則輸出 no such exercise

範例

範例 1

taekwondo
boxing

輸出 1

taebo

範例 2

swimming
racing

輸出 2

swira

範例 3

mtb
running

輸出 3

no such exercise

範例 4

archery
powerlifting

輸出 4

apo

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.