随笔分类 -  数据结构/算法

【树状数组】单点更新区间查询
摘要:#include #include #include #include #include #include #include #include #include #include #include #include #include const double PI=acos(-1.0);///3.1... 阅读全文

posted @ 2015-08-03 16:38 Susake 阅读(368) 评论(0) 推荐(0)

【伸展树】
摘要:#include #include #include __gnu_pbds::tree , __gnu_pbds::splay_tree_tag, __gnu_pbds::tree_order_statistics_node_update> sp_t;int main(int argc, char ... 阅读全文

posted @ 2015-08-03 16:37 Susake 阅读(302) 评论(0) 推荐(0)

【KMP】
摘要:char S[100] = "oooSusakeooo", P[100] = "Susake";int s_next[100];int KMP(int pos, int len1, int len2){ int i = pos, j = 1, k = 0; s_next[1] = 0; ... 阅读全文

posted @ 2015-08-03 16:36 Susake 阅读(231) 评论(0) 推荐(0)

【已知前序中序二叉树求后序二叉树】
摘要:int PreOrder[1000], InOrder[1000];int flag, n;typedef struct BiTNode { int data; struct BiTNode *LChild, RChild;} BiTNode, *BiTree;void PostOrde... 阅读全文

posted @ 2015-08-01 19:14 Susake 阅读(258) 评论(0) 推荐(0)

【已知中序后序二叉树求前序二叉树】
摘要:int InOrder[1000], PosterOrder[1000];typedef struct BiTNode { int data; struct BiTNode *LChild, *RChild;} BiTNode, *BiTree;int find(int *InOrder... 阅读全文

posted @ 2015-08-01 19:13 Susake 阅读(249) 评论(0) 推荐(0)

【动态规划】The least round way
摘要:B. The least round waytime limit per test5 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputThere is a square matrix n ... 阅读全文

posted @ 2015-06-17 15:39 Susake 阅读(604) 评论(0) 推荐(0)

导航