随笔分类 -  树链剖分

摘要:1036: [ZJOI2008]树的统计CountTime Limit:10 SecMemory Limit:162 MBSubmit:5759Solved:2383[Submit][Status]Description一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式... 阅读全文
posted @ 2014-11-19 12:48 一样菜 阅读(194) 评论(0) 推荐(0) 编辑
摘要:题意:给出一颗树形图,有三种操作,I:在u到v的路径上的每个点的权值+d,D:在u到v的路径上的每个点的权值都-d,Q询问u点的权值#pragma comment(linker, "/STACK:1024000000,1024000000")#include"stdio.h"#include"str... 阅读全文
posted @ 2014-11-18 20:40 一样菜 阅读(244) 评论(0) 推荐(0) 编辑
摘要:TreeTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1385Accepted Submission(s): 237Problem Descri... 阅读全文
posted @ 2014-10-01 16:16 一样菜 阅读(206) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5029Relief grainTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 100000/100000 K (Java/Others)Total Subm... 阅读全文
posted @ 2014-09-23 14:58 一样菜 阅读(213) 评论(0) 推荐(0) 编辑
摘要:hdu3804Query on a treeTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 622 Accepted Submission(s)... 阅读全文
posted @ 2014-08-05 00:27 一样菜 阅读(244) 评论(0) 推荐(0) 编辑
摘要:poj3237TreeTime Limit:5000MSMemory Limit:131072KTotal Submissions:3629Accepted:1017DescriptionYou are given a tree withNnodes. The tree’s nodes are nu... 阅读全文
posted @ 2014-08-04 19:50 一样菜 阅读(325) 评论(0) 推荐(0) 编辑
摘要:hdu4871Shortest-path treeTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 130712/130712 K (Java/Others)Total Submission(s): 382Accepted Submission(... 阅读全文
posted @ 2014-07-28 20:35 一样菜 阅读(246) 评论(0) 推荐(0) 编辑
摘要:hdu4760Cube number on a treeTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 878Accepted Submissi... 阅读全文
posted @ 2014-07-28 19:44 一样菜 阅读(176) 评论(0) 推荐(0) 编辑
摘要:poj2114BoatherdsTime Limit:2000MSMemory Limit:65536KTotal Submissions:1195Accepted:387DescriptionBoatherds Inc. is a sailing company operating in the ... 阅读全文
posted @ 2014-07-28 19:08 一样菜 阅读(260) 评论(0) 推荐(0) 编辑
摘要:poj1741TreeTime Limit:1000MSMemory Limit:30000KTotal Submissions:10012Accepted:3024DescriptionGive a tree with n vertices,each edge has a length(posit... 阅读全文
posted @ 2014-07-28 18:49 一样菜 阅读(378) 评论(0) 推荐(0) 编辑