Description 很久很久以前,森林里住着一群跳蚤.一天,跳蚤国王得到了一个神秘的字符串,它想进行研究. 首先,他会把串分成不超过 k 个子串,然后对于每个子串 S,他会从S的所有子串中选择字典序最大的那一个,并在选出来的 k 个子串中选择字典序最大的那一个.他称其为"魔力串". 现在他想找一个最优的分法让"魔力串"字典序最小. Input 第一行一个整数 k. 接下来一个长度不超过 105 的字符串 S. Output 输出一行,表示字典序最小的"…
Dr. Ellie Arroway has established contact with an extraterrestrial civilization. However, all efforts to decode their messages have failed so far because, as luck would have it, they have stumbled upon a race of stuttering aliens! Her team has found…
永恒的大牛,kuangbin,膜拜一下,Orz 链接:http://www.cnblogs.com/kuangbin/archive/2013/04/23/3039313.html Musical Theme Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 14334 Accepted: 4945 Description A musical melody is represented as a sequence of…