New Problem 解题报告
来源:互联网 发布:sql点击安装没反应 编辑:程序博客网 时间:2024/04/30 02:49
Coming up with a new problem isn't as easy as many people think. Sometimes it is hard enough to name it. We'll consider a titleoriginal if it doesn't occur as a substring in any titles of recent Codeforces problems.
You've got the titles of n last problems — the strings, consisting of lowercase English letters. Your task is to find the shortest original title for the new problem. If there are multiple such titles, choose the lexicographically minimum one. Note, that title of the problem can't be an empty string.
A substring s[l... r] (1 ≤ l ≤ r ≤ |s|) of string s = s1s2... s|s| (where |s| is the length of string s) is string slsl + 1... sr.
String x = x1x2... xp is lexicographically smaller than string y = y1y2... yq, if either p < q and x1 = y1, x2 = y2, ... , xp = yp, or there exists such number r (r < p, r < q), that x1 = y1, x2 = y2, ... , xr = yr and xr + 1 < yr + 1. The string characters are compared by their ASCII codes.
The first line contains integer n (1 ≤ n ≤ 30) — the number of titles you've got to consider. Then follow n problem titles, one per line. Each title only consists of lowercase English letters (specifically, it doesn't contain any spaces) and has the length from 1 to 20, inclusive.
Print a string, consisting of lowercase English letters — the lexicographically minimum shortest original title.
5threehorsesgoodsubstringssecretprimematrixbeautifulyear
j
4aabdefghijklmnopqrstuvwxyzc
ab
codeforces 278B
- New Problem 解题报告
- 第四届吉林省大学生程序设计大赛个人解题报告 Problem H: New Feature in Windows 7
- hdu1016Prime Ring Problem解题报告
- Problem B: Palindromes 解题报告
- A simple problem解题报告
- problem-1006 Elevator 解题报告
- The Skyline Problem解题报告
- fjnu 1000 A+B Problem 解题报告
- FOJ 2013 A short problem 解题报告
- HDOJ1022 Train Problem I 解题报告
- hdu 2058 解题报告 - The sum problem
- UVALive 5861 Hidden Terminal Problem 解题报告
- HDU 4627 The Unsolvable Problem 解题报告
- HDU1016 Prime Ring Problem 解题报告--dfs
- ZOJ Problem Set - 1711 解题报告
- ZOJ Problem Set - 2412解题报告
- ZOJ Problem Set - 1457 解题报告
- F - The Hardest Problem Ever解题报告
- protobuf是啥玩意儿
- 正则表达式
- Linux中如何让进程在后台运行
- 总结MySQL建表、查询优化实用小技巧
- csharp:汉字转带拼音声调
- New Problem 解题报告
- msql && sql
- 递归和非递归俩种方法实现二叉树的前序、中序、后续遍历
- csharp:汉字转带拼音声调
- dw内的dropdown dw列获取数据
- onenand小结 及 与nor 和nand 的区别 .
- 软工课题——实验报告三
- 枚举类型详解
- html5 一个很好用的html5图表html