问题 3606 --HYH的歌词

3606: HYH的歌词

题目描述

  HYH同学喜欢听歌,尤其喜欢看歌词……由于个人问题,他开始对LRC歌词进行研究……
众所周知地,听音乐想看歌词可以安装《千千静听》或者Winamp+歌词显示插件等等软件实现。而现在的歌词,大多是以lrc为后缀名的歌词文件。 
HYH同学最近在使用此类软件的时候,萌发了想制作一个同类软件的念头。可是由于他只有囧力没有编程力,所以只好靠你了。 
附Lrc格式说明:

LRC 歌词是一种包含着“[*:*]”形式的“标签(tag)”的、基于纯文本的歌词专用格式。最早由郭祥祥先生(Djohan)提出并在其程序中得到应用。这种歌词文件既可以用来实现卡拉OK功能(需要专门程序),又能以普通的文字处理软件查看、编辑。当然,实际操作时通常是用专门的LRC歌词编辑软件进行高效编辑的。以下具体介绍LRC格式中的“标签”。

时间标签(Time-tag) 
形式为"[mm:ss]"或"[mm:ss.fff]"(分钟数:秒数)。数字须为非负整数,比如"[12:34.5]"是有效的,而"[0x0C:-34.5]"无效。 
它可以位于某行歌词中的任意位置。一行歌词可以包含多个时间标签(比如歌词中的迭句部分)。根据这些时间标签,用户端程序会按顺序依次高亮显示歌词,从而实现卡拉OK功能。

标识标签(ID-tags) 
其格式为"[标识名:值]"。大小写等价。以下是预定义的标签。 
[ar:艺人名] 
[ti:曲名] 
[al:专辑名] 
[by:编者(指编辑LRC歌词的人)] 
[offset:时间补偿值] 其单位是毫秒,正值表示整体提前,负值相反。这是用于总体调整显示快慢的。

以下列出了开发支持LRC格式的软件时应遵守的一些标准。 
无论是否在行首,行内凡具有“[*:*]”形式的都应认为是标签。(注意:其中的冒号并非全角字符“:”) 
凡是标签都不应显示。 
凡是标签,且被冒号分隔的两部分都为非负数,则应认为是时间标签。因此,对于非标准形式(非“[mm:ss]”)的时间标签也应能识别(如“[0:0]”)。 
凡是标签,且非时间标签的,应认为是标识标签。 
标识名中大小写等价。 
为了向后兼容,应对未定义的新标签作忽略处理。另应对标识标签后的同一行内容作忽略处理。 
应允许一行中存在多个标签,并能正确处理。为简化本题,一行中不会同时存在标识标签和时间标签。 
应能正确处理未排序的标签。 
注意:为简化本题,数据保证正确,不存在未定义标签等格式问题。并且保证时间没有相同的。

输入

第一行一个整数n,表示输入的行数。 
接下来有n行,每行有一个字符串,整个输入文件是一个lrc文件。 
字符串长度有可能超过255,请注意处理。 
时间标签保证不超过100个。

输出

输出歌词显示时的结果(即按照时间标签排序好的歌词)

样例输入输出

输入#1 复制
40
[ti:euphoric field (English)]
[ar:ELISA]
[al:ef - a tale of memories. OPENING THEME]
[00:11.85] 
[00:13.85]Why am I standing alone in the twilight
[00:20.13]Let me go,no more lonely nights
[00:26.61]I take a deep breath under the bazy sky
[00:32.90]Feel like losing, but it's gonna be alright
[00:38.86] 
[00:39.23]Break through the night, go and try to fight
[00:45.17]Don't be afraid,now is the time
[00:52.00] 
[00:55.34]Be alive,take it
[00:58.10]I surely feel my heartbeat
[01:01.68]There's no limit to my reach
[01:08.05]I say good-bye to my tears that I don't need
[01:14.42]So believe in my dream
[01:21.04] 
[02:15.50]Don't look back to the sorrow I left behind
[02:21.70]Here's my real intention I hide
[02:28.12]I wish you were here, and so just right by my side
[02:34.53]Need to be strong enough to swallow my pride
[02:40.52] 
[02:40.89]I have been looking for my onw style
[02:46.64]Don't give it up,here comes the life
[02:53.97] 
[02:57.00]Be alive,take it
[02:59.64]I have leained a great deal
[03:03.29]Brighten our sweet memories
[03:09.70]Hope there will be a future for you and me
[03:16.09]So believe in your dream
[03:22.31] 
[03:22.75]Be alive, take it
[03:25.26]Promise to find, yes I will
[03:28.86]Shining wings filled with wishes
[03:35.28]Fly high, make it
[03:38.14]Get to the new world that I seek
[03:41.66]Someday, so I Believe
[03:48.49] 
[03:50.94]fin
输出#1 复制
Why am I standing alone in the twilight
Let me go,no more lonely nights
I take a deep breath under the bazy sky
Feel like losing, but it's gonna be alright
 
Break through the night, go and try to fight
Don't be afraid,now is the time
 
Be alive,take it
I surely feel my heartbeat
There's no limit to my reach
I say good-bye to my tears that I don't need
So believe in my dream
 
Don't look back to the sorrow I left behind
Here's my real intention I hide
I wish you were here, and so just right by my side
Need to be strong enough to swallow my pride
 
I have been looking for my onw style
Don't give it up,here comes the life
 
Be alive,take it
I have leained a great deal
Brighten our sweet memories
Hope there will be a future for you and me
So believe in your dream
 
Be alive, take it
Promise to find, yes I will
Shining wings filled with wishes
Fly high, make it
Get to the new world that I seek
Someday, so I Believe
 
fin

提示

序号 标题 作者 发表时间 费用 订购数 操作