上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 35 下一页
摘要: 题:http://acm.hdu.edu.cn/showproblem.php?pid=6736 题意:删掉一些边使得图不存在点双,求方案数。 分析:若一条边不属于点双,那么这条边有删和不删俩种选择,若找到点双,点双中必须删掉一条边(题目有保证一条边只能属于一个点双,所以不用担心一条边用于多个点双) 阅读全文
posted @ 2019-09-29 20:40 starve_to_death 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 学习粗:https://blog.csdn.net/ddelphine/article/details/77935670 模板题:http://poj.org/problem?id=2914 #include <iostream> #include<cstring> using namespace 阅读全文
posted @ 2019-09-26 00:15 starve_to_death 阅读(292) 评论(0) 推荐(1) 编辑
摘要: 题:http://codeforces.com/contest/1216/problem/F dp[i][0]:表示第i个位置不装的最小代价 dp[i][1]:表示第i个位置装的最小代价 T1的线段树是维护装的最小代价 T2的线段树是维护装和不装的最小代价 #include<bits/stdc++. 阅读全文
posted @ 2019-09-23 16:08 starve_to_death 阅读(261) 评论(0) 推荐(0) 编辑
摘要: poj1741 题:http://poj.org/problem?id=1741 题意:给定树,和一个树k,问有多少个点对之间的路径是不超过k #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> usin 阅读全文
posted @ 2019-09-21 13:56 starve_to_death 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 题: https://nanti.jisuanke.com/t/41414 #include<bits/stdc++.h> using namespace std; typedef __int128 ll; const int M=30; const int mod=1e9+7; ll dp[M][ 阅读全文
posted @ 2019-09-15 23:49 starve_to_death 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 题:https://nanti.jisuanke.com/t/41420 定义 dp[x][y] 表示第 x 个数到最后一个数能组成和为 y 的方案数 #include<bits/stdc++.h> using namespace std; typedef long long ll; const i 阅读全文
posted @ 2019-09-15 23:06 starve_to_death 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 题:https://nanti.jisuanke.com/t/41403 题意:求任意俩点之间距离之和模3后的三个结果的总数(原距离之和) 第一种做法: 树形dp #include<bits/stdc++.h> using namespace std; #define pb push_back ty 阅读全文
posted @ 2019-09-15 09:11 starve_to_death 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 基础(据说):基数排序:https://blog.csdn.net/zhen921/article/details/80354096 模板题:https://www.luogu.org/problem/P3809 学习粗:https://www.cnblogs.com/chenxiaoran666/ 阅读全文
posted @ 2019-09-13 23:10 starve_to_death 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 长文章:https://www.cnblogs.com/ZuoAndFutureGirl/p/9028287.html 板题:求子串在主串中出现的次数 #include<bits/stdc++.h> using namespace std; const int M=1e6+6; char S[M], 阅读全文
posted @ 2019-09-12 23:01 starve_to_death 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 题:https://www.luogu.org/problem/P2221#submit 求:ans=i=l∑r​a[i]∗(r−i+1)(i−l+1) #include<bits/stdc++.h> using namespace std; typedef long long ll; #defin 阅读全文
posted @ 2019-09-12 12:48 starve_to_death 阅读(150) 评论(0) 推荐(0) 编辑
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 35 下一页