自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

MaJorieL

我们向右偏左的坠落,琢磨着寻求自我。

  • 博客(10)
  • 收藏
  • 关注

原创 洛谷P2754 [CTSC1999]家园 / 星际转移问题【网络流/按时间拆点/前后】

题目链接:P2754 [CTSC1999]家园 / 星际转移问题 分析:这道题我wa了太多次所以我PTSD了所以我什么都不想说了 #include<bits/stdc++.h> #define pb push_back using namespace std; typedef long long ll; const int maxn=1e5+7; const int mod=1e...

2020-03-28 17:47:10 291

原创 洛谷P1402 酒店之王【网络流/点的限制/拆点】

题目链接:P1402 酒店之王 分析:对客人拆点加上限为1的限制; #include<bits/stdc++.h> #define pb push_back using namespace std; typedef long long ll; const int maxn=1200; const int mod=1e9+7; const int inf=0x3f3f3f3f; s...

2020-03-28 13:58:40 227

原创 POJ3281 Dining【网络流/点的限制/拆点】

题目链接:POJ3281 Dining 题意:f个食物和d个饮料,分别有自己的编号,n个奶牛吃到自己想要的食物和饮料才会开心,求最多多少奶牛开心; 分析:对奶牛而言有1的上限,对奶牛拆点建边,流量为1(注意点的编号); #include<cstdio> #include<cstdlib> #include<iostream> #include<cm...

2020-03-28 13:34:25 152

原创 洛谷P4551 最长异或路径【Trie树异或路径】

题目链接:P4551 最长异或路径 题意:n个点的一棵树,两点间的距离是路径上所有边权的异或和; 分析:由树的性质可以想到:dis[u][v]=dis[root][u]^dis[root][v],那么就dfs一棵树出来,更新dis[root][i]; 每个点dis的二进制01串建一棵trie,然后从高向低,贪心选取高位异或为1的; #include<bits/stdc++.h&gt...

2020-03-24 21:49:14 276

原创 洛谷P2580 于是他错误的点名开始了【trie板子】

题目链接:洛谷P2580 于是他错误的点名开始了 最近在重新学字符串体系,打算从头开始好好学习; 这里先贴一个trie的板子; #include<bits/stdc++.h> #define pb push_back using namespace std; typedef long long ll; const int maxn=5e5+7; const int mod=1e...

2020-03-24 19:24:52 187

原创 Educational Codeforces Round 83 (Rated for Div. 2)

比赛链接:Educational Codeforces Round 83 (Rated for Div. 2) A. Two Regular Polygons 分析:判断是否倍数; #include<bits/stdc++.h> #define pb push_back using namespace std; typedef long long ll; const int m...

2020-03-10 00:45:43 181

原创 Codeforces Round #626 (Div. 2, based on Moscow Open Olympiad in Informatics)

比赛链接:Codeforces Round #626 (Div. 2, based on Moscow Open Olympiad in Informatics) A. Even Subset Sum Problem 题意:找一个子集sum为偶数; 分析:xjb写 #include<bits/stdc++.h> #define pb push_back using names...

2020-03-09 11:56:59 163

原创 Codeforces Round #625 (Div. 2, based on Technocup 2020 Final Round)

比赛链接: Codeforces Round #625 (Div. 2, based on Technocup 2020 Final Round) C. Remove Adjacent 题意:给你一个字符串,相邻有前一位的可以删除,问最多删多少个; 分析:越大的影响越小,从大到小删除,每次暴力; #include<bits/stdc++.h> using namespace ...

2020-03-07 19:30:09 167

原创 HDU1598 find the most comfortable road【最小生成树】

题目链接:HDU1598 find the most comfortable road 题意:询问xy所有路径上mx-mn的最小值; 分析:枚举每一条边作为最小生成树的最小边,直到xy连通时更新答案,用当前-最小边更新,有可能会出现将无用边算入答案的情况,但后面会把答案改小,所以不影响; #include<bits/stdc++.h> #define pb push_back ...

2020-03-06 23:57:16 168

原创 CodeCraft-20 (Div. 2)

比赛链接:CodeCraft-20 (Div. 2) A. Grade Allocation 题意:啊懒得说了 分析:啊懒得分析了 #include<bits/stdc++.h> #define pb push_back using namespace std; typedef long long ll; const int maxn=2e5+7; const int mod...

2020-03-05 21:09:03 219

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除