08 2017 档案

该文被密码保护。
posted @ 2017-08-13 09:26 ws_zzy 阅读(15) 评论(1) 推荐(1)
摘要:算法:LCA,树上差分+(乱搞) 如果有写错的地方请大佬更正 对于100%数据: u表示起点,v表示终点 对于一条u到v的路径,先讨论LCA!=u&&LCA!=v的情况: 分为u到LCA的路径和LCA到v的路径 对于u到LCA的路径上的点x,当deep[u]-deep[x]=w[x]时,即w[x]+ 阅读全文
posted @ 2017-08-12 11:53 ws_zzy 阅读(2826) 评论(1) 推荐(3)
摘要:#include<iostream> #include<cstdio> #include<cstring> #define LL long long #define maxn 1000009 #define N maxn+10 #define M 1000000007 using namespace 阅读全文
posted @ 2017-08-11 19:08 ws_zzy 阅读(322) 评论(2) 推荐(1)