题目:http://poj.org/problem?id=3096 题意:给定一个字符串S,从中找出所有有两个字符组成的子串,每当组成子串的字符之间隔着n字符时,如果没有相同的子串出现,则输出 "S is surprising." , 反之,则输出 "S is NOT surprising." . 例如 AABA 把它分成两个字符为一个整体的,1..相邻两个字符 AA,AB,BA 没有相同的; 2.隔一个字符的 AB AA 没有相同; 3.隔…
hdu 1247 Hat's Words Input Standard input consists of a number of lowercase words, one per line, in alphabetical order. There will be no more than 50,000 words. Only one case. Output Your output should contain all the hat's words, one per line, in…