在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
题目连接:http://www.codeforces.com/contest/632/problem/C DescriptionYou're given a list of n strings a1, a2, ..., an. You'd like to concatenate them together in some order such that the resulting string would be lexicographically smallest. Given the list of strings, output the lexicographically smallest concatenation. InputThe first line contains integer n — the number of strings (1 ≤ n ≤ 5·104). Each of the next n lines contains one string ai (1 ≤ |ai| ≤ 50) consisting of only lowercase English letters. The sum of string lengths will not exceed 5·104. OutputPrint the only string a — the lexicographically smallest string concatenation. Sample Input4 Sample Outputabacabaabbabcder Hint题意给你n个串,然后你要组合这n个串,使得n个串的字典序最小 题解:写个CMP就好了~ 代码
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论