摘要: 普通的最短路...dijkstra水过..------------------------------------------------------------------------------#include#include#include#include#include#define rep... 阅读全文
posted @ 2015-06-14 22:00 JSZX11556 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 直接用STL的的deque就好了...----------------------------------------------------------------------#include#include#include#include#include#define rep( i , n ) ... 阅读全文
posted @ 2015-06-14 20:46 JSZX11556 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 01背包...-----------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i ... 阅读全文
posted @ 2015-06-14 20:34 JSZX11556 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 树形dp..水------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i... 阅读全文
posted @ 2015-06-14 20:23 JSZX11556 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 略恶心的线段树...不过只要弄清楚了AC应该不难....----------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( ... 阅读全文
posted @ 2015-06-14 13:57 JSZX11556 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 这道题用 LCA 就可以水过去 , 但是我太弱了 QAQ 倍增写LCA总是写残...于是就写了树链剖分...其实也不难写 , 线段树也不用用到 , 自己YY一下然后搞一搞就过了...速度还挺快的好像= = #9---------------------------------------------... 阅读全文
posted @ 2015-06-14 11:00 JSZX11556 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 因为是棵树 , 所以直接 dfs 就好了...-------------------------------------------------------------------------------------#include#include#include#include#define re... 阅读全文
posted @ 2015-06-14 10:06 JSZX11556 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 树链剖分...细节挺多的...---------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) f... 阅读全文
posted @ 2015-06-14 00:04 JSZX11556 阅读(213) 评论(0) 推荐(0) 编辑