博客园 首页 私信博主 显示目录 隐藏目录 管理 动画
摘要: 题意:求一个树上背包~~ 先贴代码存一下,好像打挂了。 c++ include using namespace std; const int maxn = 400; const int INF = 0x3c; int dp[maxn][maxn][3]; inline int read() { in 阅读全文
posted @ 2018-09-06 21:55 Allorkiya 阅读(178) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-09-06 21:50 Allorkiya 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 题意:带温度最短路。 思路: 我们将温度从小到大的将边加入,用并查集维护连通性。 如果一旦联通那么跑一遍$spfa$就可以得到答案。 复杂度$O(m log m)$ c++ include using namespace std; define ll long long const int maxn 阅读全文
posted @ 2018-09-06 10:03 Allorkiya 阅读(131) 评论(0) 推荐(0) 编辑