#include#include#includeusing namespace std;int D[111]; //存放拆解的数字int DI=0; //D的数组下标bool isPrime(int n){ if(n<=1) return 0; int ...
分类:
其他好文 时间:
2015-03-06 12:23:02
阅读次数:
130
HDU 2222 Keywords Search (AC自动机入门 模板)...
分类:
其他好文 时间:
2015-03-06 11:22:27
阅读次数:
138
题目链接:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1311
题意: 给出一张有向图,和一个权值c,问将1~n亮点之间的最短路径花费降到c,最少需要修改多少条边。 数据规模是100个点,1000条边。
思路:这道题题目的最关键点就是想到用一个二维数据去记录每个点的情况(也就是dp式子的定义) dp[x][y] 表示从顶点1...
分类:
其他好文 时间:
2015-03-06 01:04:55
阅读次数:
140
题意:多个模板串,一个文本串,求出那些模板串在文本串中出现次数最多。解法:AC自动机入门模板题。代码:#include #include #include #include #include #include #include #include #include #include #define M...
分类:
其他好文 时间:
2015-03-05 23:41:49
阅读次数:
155
Problem Description
Biologists finally invent techniques of repairing DNA that contains segments causing kinds of inherited diseases. For the sake of simplicity, a DNA is represented as a string conta...
分类:
其他好文 时间:
2015-03-05 21:03:31
阅读次数:
155
#include#includeusing namespace std;const int AIM=6174;int n;int arr[4];bool NonIncreasingOrder(int a,int b){ return a>b;}bool NonDecreasingOrder(int....
分类:
其他好文 时间:
2015-03-05 20:59:09
阅读次数:
156
#include#includeusing namespace std;const int AIM=6174;int n;int arr[4];bool NonIncreasingOrder(int a,int b){ return a>b;}bool NonDecreasingOrder(int....
分类:
其他好文 时间:
2015-03-05 20:52:58
阅读次数:
215
我是通过http://wenku.baidu.com/view/4e70ccc38bd63186bcebbcb9.html的第二篇学会的
这篇也总结的很好,附带很多经典的习题http://www.cppblog.com/menjitianya/archive/2014/07/10/207604.html
这是bin神的总结:http://www.cnblogs.com/kuangbin/p/3...
分类:
其他好文 时间:
2015-03-05 19:36:07
阅读次数:
186
#includeint main(){ int n,ans=0,now=0; //要停n层,ans是总时间,now代表当前层数 scanf("%d",&n); for(int i=0 ; inow) //上楼,每上一层6秒 { ans+=(tmp...
分类:
其他好文 时间:
2015-03-05 19:03:54
阅读次数:
104
Little jay really hates to deal with string. But moondy likes it very much, and she’s so mischievous that she often gives jay some dull problems related to string. And one day, moondy gave jay another...
分类:
其他好文 时间:
2015-03-05 14:48:39
阅读次数:
177