摘要:
普通的最短路...dijkstra水过..------------------------------------------------------------------------------#include#include#include#include#include#define rep... 阅读全文
摘要:
直接用STL的的deque就好了...----------------------------------------------------------------------#include#include#include#include#include#define rep( i , n ) ... 阅读全文
摘要:
01背包...-----------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i ... 阅读全文
摘要:
树形dp..水------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i... 阅读全文
摘要:
略恶心的线段树...不过只要弄清楚了AC应该不难....----------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( ... 阅读全文
摘要:
这道题用 LCA 就可以水过去 , 但是我太弱了 QAQ 倍增写LCA总是写残...于是就写了树链剖分...其实也不难写 , 线段树也不用用到 , 自己YY一下然后搞一搞就过了...速度还挺快的好像= = #9---------------------------------------------... 阅读全文
摘要:
因为是棵树 , 所以直接 dfs 就好了...-------------------------------------------------------------------------------------#include#include#include#include#define re... 阅读全文
摘要:
树链剖分...细节挺多的...---------------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) f... 阅读全文