上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 50 下一页
摘要: problemsolutioncodes#include#includeusing namespace std;const int maxn = 110;int tree[maxn][2], higt, weigt[maxn], ww;void dfs(int now... 阅读全文
posted @ 2018-06-05 21:12 gwj1139177410 阅读(110) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes/*作者:gwj1139177410题目:p2627 村村通*///Kruskal#include#include#includeusing namespace std;int n, a[110][110], fa[110], ... 阅读全文
posted @ 2018-06-05 21:11 gwj1139177410 阅读(162) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include#includeusing namespace std;struct xyz{ int x, y; xyz(int x = 0, int y = 0):x(x),y(y){};};int m, n, ... 阅读全文
posted @ 2018-06-04 21:58 gwj1139177410 阅读(109) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//dp[i+1][j]:从0到i+1这个物品中选出总重量不超过j的物品时总价值的最大值#include#includeusing namespace std;int n, s, w[5050], k[5050], dp[505... 阅读全文
posted @ 2018-06-04 21:56 gwj1139177410 阅读(78) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include#include#include#includeusing namespace std;struct Bigint{ vectors; int is_minus; Bigint(long lon... 阅读全文
posted @ 2018-06-04 21:54 gwj1139177410 阅读(151) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include#define mod 6662333using namespace std;typedef long long LL;LL dfs(LL a, LL b, LL p){ if(b==1)return a%... 阅读全文
posted @ 2018-06-04 21:48 gwj1139177410 阅读(96) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//巧妙的利用了x-=min(x,t); x若剩余为0则下面升温也为0#include#includeusing namespace std;typedef long long LL;int main(){ LL a, c... 阅读全文
posted @ 2018-06-04 21:45 gwj1139177410 阅读(114) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#includeint n, a[(int)1e5+10];int readint(){ int op=1,x=0; char ch=getchar(); while(ch'9'){if(ch=='-')op=-1;... 阅读全文
posted @ 2018-06-04 21:42 gwj1139177410 阅读(106) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//树形DP//f[u]:割掉u和u子树中所有的叶子节点所需要的最小代价#include#includeusing namespace std;typedef long long LL;const int N = (int)1e... 阅读全文
posted @ 2018-06-04 21:40 gwj1139177410 阅读(90) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//1,2:各在左右:把所有物品从区间移到最左边的花费减去把所有物品从目标位置移到最左边的花费就是把所有物品从区间移到目标位置的花费,右边同理。//3:若目标仓库在区间内部,将区间拆为两部分分别算。//ans:所以只需要维护bi... 阅读全文
posted @ 2018-06-04 21:39 gwj1139177410 阅读(145) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 50 下一页
选择