TopCoder

User's AC Ratio

0.0% (0/1)

Submission's AC Ratio

0.0% (0/1)

Tags

Description

晴☆正在準備網管考幹網頁,但是他覺得 html 好難寫

這時,春遊大地遊戲劇本出現在晴☆的面前,使他非常想要去洗個頭……

(兩個小時以後)

一邊吹頭髮的晴☆想著:「要是 html 跟 markdown 一樣簡單就好了」

於是,他開始著手撰寫 Markdown 轉 html 的 C++ 專案

不過最後晴☆發現寫程式好難,寫不出來……

你可以幫助他嗎?

所有可能出現的格式:

"\n"<br>

** **<b> </b>

_ _&* *<i> </i>

__ __<u> </u>

~~ ~~<s> </s>

​ ​` ` ​ →<code> </code>

[text](link)<a href="link">text</a>

注意:[前面有\] 或是 [在<code>裡面] 的格式不會被啟用!

Input Format

markdown 格式的字串

全部的語法都是正確的

不會有__+_**+*的組合

可能會有很多行直到 EOF

可能包含空格

Output Format

轉換成 html 的字串

請使用單引號

請不要輸出換行或多餘的空格

Sample Input 1

this is a **__BOLD AND UNDERLINE__** text!
and this is a *~~ITALIC AND STRIKETHROUGH~~* text!

Sample Output 1

this is a <b><u>BOLD AND UNDERLINE</u></b> text!<br>and this is a <i><s>ITALIC AND STRIKETHROUGH</s></i> text!

Sample Input 2

look, a [LINK](https://www.google.com/)!
but inside code it's `[NOT LINK](https://www.google.com/)` now...

Sample Output 2

look, a <a href="https://www.google.com/">LINK</a>!<br>but inside code it's <code>[NOT LINK](https://www.google.com/)</code> now...

Hints

有人想要生一些比較難的側資嗎?

目前每一個都不超過兩行耶😅

Problem Source

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Memory Limit (RSS, KiB) Output Limit (KiB) Subtasks
0 1000 250000 250000 65536
1 1000 250000 250000 65536
2 1000 250000 250000 65536
3 1000 250000 250000 65536
4 1000 250000 250000 65536
5 1000 250000 250000 65536
6 1000 250000 250000 65536
7 1000 250000 250000 65536
8 1000 250000 250000 65536
9 1000 250000 250000 65536