[水] POJ 3096】的更多相关文章

Surprising Strings Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7659   Accepted: 4878 Description The D-pairs of a string of letters are the ordered pairs of letters that are distance D from each other. A string is D-unique if all of…
题目:http://poj.org/problem?id=3096 题意:给定一个字符串S,从中找出所有有两个字符组成的子串,每当组成子串的字符之间隔着n字符时,如果没有相同的子串出现,则输出 "S is surprising." , 反之,则输出 "S is NOT surprising." . 例如 AABA 把它分成两个字符为一个整体的,1..相邻两个字符 AA,AB,BA 没有相同的;    2.隔一个字符的 AB AA 没有相同;          3.隔…
Surprising Strings Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 5081   Accepted: 3336 Description The D-pairs of a string of letters are the ordered pairs of letters that are distance D from each other. A string is D-unique if all of…
Surprising Strings Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6193   Accepted: 4036 Description The D-pairs of a string of letters are the ordered pairs of letters that are distance D from each other. A string is D-unique if all of…
Surprising Strings Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 5783   Accepted: 3792 Description The D-pairs of a string of letters are the ordered pairs of letters that are distance D from each other. A string is D-unique if all of…
Surprising Strings Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6258   Accepted: 4072 Description The D-pairs of a string of letters are the ordered pairs of letters that are distance D from each other. A string is D-unique if all of…
OJ上的一些水题(可用来练手和增加自信) (POJ 3299,POJ 2159,POJ 2739,POJ 1083,POJ 2262,POJ 1503,POJ 3006,POJ 2255,POJ 3094) 初期: 一.基本算法: 枚举. (POJ 1753,POJ 2965) 贪心(POJ 1328,POJ 2109,POJ 2586) 递归和分治法. 递推. 构造法.(POJ 3295) 模拟法.(POJ 1068,POJ 2632,POJ 1573,POJ 2993,POJ 2996) 二…
著名题单,最初来源不详.直接来源:http://blog.csdn.net/a1dark/article/details/11714009 OJ上的一些水题(可用来练手和增加自信) (POJ 3299,POJ 2159,POJ 2739,POJ 1083,POJ 2262,POJ 1503,POJ 3006,POJ 2255,POJ 3094) 初期: 一.基本算法: 枚举. (POJ 1753,POJ 2965) 贪心(POJ 1328,POJ 2109,POJ 2586) 递归和分治法. 递…
做这道题的动机就是想练习一下堆的应用,顺便补一下好久没看的图论算法. Dijkstra算法概述 //从0出发的单源最短路 dis[][] = {INF} ReadMap(dis); for i = 0 -> n - 1 d[i] = dis[0][i] while u = GetNearest(1 .. n - 1, !been[]) been[u] = 1 for_each edge from u d[edge.v] = min(d[edge.v], d[u] + dis[u][edge.v]…
POJ 1488 题目大意:给定一篇文章,将它的左引号转成 ``(1的左边),右引号转成 ''(两个 ' ) 解题思路:水题,设置一个bool变量标记是左引号还是右引号即可 /* POJ 1488 Tex Quotes --- 水题 */ #include <cstdio> #include <cstring> int main() { #ifdef _LOCAL freopen("D:\\input.txt", "r", stdin); #…