摘要: #include#include#includeusing namespace std;char str[100];char resultstr[100];int visit[100];void dfs( int cur , int len){ if( cur == len ) { ... 阅读全文
posted @ 2015-05-18 13:27 crazyzhping 阅读(820) 评论(0) 推荐(0)
摘要: #include#includeusing namespace std;class MinStack{public: class Data { public: Data( int a = 0 , int b = -1 ): data(a) , cur( b){} ... 阅读全文
posted @ 2015-05-17 22:03 crazyzhping 阅读(139) 评论(0) 推荐(0)
摘要: #include#includeusing namespace std;int a[100][100];int l,r,t,b;int n,m;void solve(){ l = 0 , r = m-1 , t = 0 , b = n - 1; int i,j; while( t ... 阅读全文
posted @ 2015-05-17 21:19 crazyzhping 阅读(155) 评论(0) 推荐(0)
摘要: #includeusing namespace std;int a[100][100];int key;int n , m;int DFS( int i , int j , int value , int &ivalue , int &jvalue ){ if( i >= n || j >= ... 阅读全文
posted @ 2015-05-13 22:19 crazyzhping 阅读(125) 评论(0) 推荐(0)
摘要: Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7)... 阅读全文
posted @ 2015-05-12 14:41 crazyzhping 阅读(131) 评论(0) 推荐(0)
摘要: 题目连接如下:http://www.acmerblog.com/max-sum-rectangle-in-a-matrix-5955.html一维数组的连续子数组的最大和题目:输入一个整型数组,数组里有正数也有负数。数组中一个或连续的多个整数组成一个子数组。求所有子数组的和的最大值。要求时间负责度为... 阅读全文
posted @ 2015-05-12 14:01 crazyzhping 阅读(588) 评论(0) 推荐(0)
摘要: #include#include#include#include#includeusing namespace std;#define min( x, y ) (x) edges; vector G[maxn]; int a[maxn]; int p[maxn]; vo... 阅读全文
posted @ 2015-05-05 21:52 crazyzhping 阅读(114) 评论(0) 推荐(0)
摘要: #include#include#includeusing namespace std;const int MAXN = 4000 * 100 + 10;const int sigma = 26;const int MAXNn = 300010;const int mod = 20071027;ch... 阅读全文
posted @ 2015-05-05 18:37 crazyzhping 阅读(155) 评论(0) 推荐(0)
摘要: #include#includeusing namespace std;class AVL{public: enum BF { RH = 1 , EH , LH }; class Node { public: Node* lchild; Node*... 阅读全文
posted @ 2015-05-05 10:14 crazyzhping 阅读(107) 评论(0) 推荐(0)