
图论
文章平均质量分 86
madaidao
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #726 (Div. 2) F. Figure Fixing (图论、数学、思维题)
题目链接:https://codeforces.com/contest/1537/problem/F题目大意:原创 2021-06-24 21:26:08 · 286 阅读 · 2 评论 -
LeetCode 2021 春季赛组队赛 解题报告
LCP 33. 蓄水题目链接:https://leetcode-cn.com/problems/o8SXZn/题解:暴力枚举蓄水操作的次数计算最优解即可代码如下:class Solution {public: int storeWater(vector<int>& bucket, vector<int>& vat) { int sum=0; for(int i=0;i<int(vat.size());i原创 2021-05-09 17:48:50 · 332 阅读 · 0 评论 -
Codeforces Round #698 (Div. 1) D. Nezzar and Hidden Permutations(高难度的构造问题)
题目链接:https://codeforces.com/contest/1477/problem/D题目大意:给定两个数字n,m。以及m对数字,,m对数不重复出现求出两个1到n的排列,(p1,p2,p3......pn),(q1,q2,q3....qn),对于所有要求和符号相同,并且对于所有,要让满足的数目最大。题解:我们可以把问题抽象到图上,构造一个图,包含n个编号为1到n的点,对于每对,我们在点和点之间建一条边。我们需要在每个点上填两个数字和,若点和点之间存在一条边,则点和点上...原创 2021-02-25 20:13:58 · 278 阅读 · 0 评论 -
CodeForces 1389G Directing Edges 边联通分量缩点+树形dp+rerooting technique
题目链接:https://codeforces.com/contest/1389/problem/GG. Directing Edgestime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou are given an undirected connected graph consisting ofnnverti..原创 2020-10-12 19:32:33 · 414 阅读 · 0 评论 -
poj 2914 Minimum Cut(无向图最小割)
题目链接Minimum CutTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 7803 Accepted: 3294Case Time Limit: 5000MSDescriptionGiven an undirected gra原创 2014-12-01 16:49:15 · 515 阅读 · 0 评论 -
poj 2942 Knights of the Round Table(点双连通分量)
题目链接Knights of the Round TableTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 10122 Accepted: 3305DescriptionBeing a knight is a very attractive car原创 2014-11-30 19:27:10 · 320 阅读 · 0 评论 -
poj 3177 Redundant Paths
题目链接Redundant PathsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9438 Accepted: 4043DescriptionIn order to get from one of the F (1 <= F <= 5,000)原创 2014-11-30 19:40:28 · 692 阅读 · 0 评论 -
poj 3592 Instantaneous Transference(强连通分量)
题目链接Instantaneous TransferenceTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 5734 Accepted: 1275DescriptionIt was long ago when we played the gam原创 2014-11-30 19:56:33 · 351 阅读 · 0 评论 -
poj 3352 Road Construction
题目链接Road ConstructionTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 9155 Accepted: 4547DescriptionIt's almost summer time, and that means that it原创 2014-11-30 19:47:09 · 383 阅读 · 0 评论 -
zoj 3847 Collect Chars(dp)
题目链接Collect CharsTime Limit: 2 Seconds Memory Limit: 65536 KB Bob was playing MC and was punished by Alice. Bob was trapped in a maze and there were some characters on some specif原创 2015-01-11 21:30:00 · 745 阅读 · 0 评论 -
poj 1475 Pushing Boxes(搜索)
题目链接Pushing BoxesTime Limit: 2000MS Memory Limit: 131072KTotal Submissions: 4617 Accepted: 1585 Special JudgeDescriptionImagine you are standing insid原创 2015-01-12 14:29:00 · 471 阅读 · 0 评论 -
ZOJ 3781 Paint the Grid Reloaded ( BFS(重点是对问题的分析) )
题目链接Paint the Grid ReloadedTime Limit: 2 Seconds Memory Limit: 65536 KB Leo has a grid with N rows and M columns. All cells are painted with either black or white initially.Tw原创 2015-04-15 21:28:35 · 495 阅读 · 0 评论 -
SCU 4429 frog's dice (二分匹配 or 网络流)
题目链接4429: frog's diceSubmit your solution Discuss this problem Best solutionsTime: 2000msThe Problemfrog has many dices:)Each dice has six surfaces and there is原创 2015-04-09 21:30:02 · 637 阅读 · 0 评论 -
ZOJ 3877 Earthstone Keeper(最短路问题)
题目链接Earthstone KeeperTime Limit: 4 Seconds Memory Limit: 65536 KB Earthstone Keeper is a famous roguelike game created by Lizard Entertainment. In this game, an adventurer will ex原创 2015-06-08 16:06:39 · 1321 阅读 · 0 评论 -
poj 1734 Sightseeing trip(floyd求最小环并输出方案)
题目链接Sightseeing tripTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5736 Accepted: 2220 Special JudgeDescriptionThere is a travel agency in Adel原创 2015-11-22 21:43:22 · 446 阅读 · 0 评论 -
codeforces 596E Wilbur and Strings(DFS)
题目链接E. Wilbur and Stringstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWilbur the pig now wants to pla原创 2015-11-24 21:53:45 · 794 阅读 · 0 评论 -
poj 3694 Network(桥+边联通分量+LCA)
题目链接NetworkTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 6942 Accepted: 2476DescriptionA network administrator manages a large network. The netw原创 2014-11-30 20:26:44 · 483 阅读 · 0 评论 -
POJ 2186 Popular Cows(强连通)
题目链接Popular CowsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 24039 Accepted: 9865DescriptionEvery cow's dream is to become the most popular cow i原创 2014-11-29 13:37:25 · 319 阅读 · 0 评论 -
hdu 4948 Kingdom
KingdomTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 194 Accepted Submission(s): 106Special JudgeProblem DescriptionTeacher Mai原创 2014-08-15 19:34:50 · 527 阅读 · 0 评论 -
hdu 5025 Saving Tang Monk(dp+最短路)
题目链接原创 2014-09-23 10:53:12 · 461 阅读 · 0 评论 -
hdu 5040 Instrusive(堆优化+dij)
题目链接原创 2014-09-23 10:26:21 · 661 阅读 · 0 评论 -
Hdu 4114 Disney's FastPass(状压dp)
题目链接原创 2014-09-24 18:44:41 · 555 阅读 · 0 评论 -
Hdu 4587 TWO NODES(割点)
题目链接原创 2014-11-07 18:13:55 · 533 阅读 · 0 评论 -
Hdu 4081 Qin Shi Huang's National Road System(最小生成树)
题目链接原创 2014-10-10 18:35:06 · 376 阅读 · 0 评论 -
POJ 3678 Katu Puzzle(2-sat)
点击打开链接Eliminate the ConflictTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1722 Accepted Submission(s): 746Problem Description原创 2014-10-28 21:11:11 · 467 阅读 · 0 评论 -
Hdu 1814 Peaceful Commission(2-sat+输出字典序最小方案)
Peaceful CommissionTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2018 Accepted Submission(s): 585Problem DescriptionThe Public原创 2014-10-28 21:26:50 · 473 阅读 · 0 评论 -
poj 3648 Wedding(2-sat)
题目链接原创 2014-11-01 16:17:43 · 444 阅读 · 0 评论 -
Hdu 5090 Game with Pearls(二分匹配)
点击打开链接Game with PearlsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 70 Accepted Submission(s): 51Problem DescriptionTom and原创 2014-11-02 20:17:27 · 412 阅读 · 0 评论 -
poj 1236 Network of Schools(强连通缩点)
题目链接原创 2014-11-20 21:27:29 · 574 阅读 · 0 评论 -
poj 1659 Frogs' Neighborhood(Heal定理)
题目链接Frogs' NeighborhoodTime Limit: 5000MS Memory Limit: 10000KTotal Submissions: 7615 Accepted: 3267 Special JudgeDescription未名湖附近共有N个大小湖泊L1, L2, ..., L原创 2014-11-20 22:55:27 · 558 阅读 · 0 评论 -
poj 2762 Going from u to v or from v to u?(强连通分量)
题目链接Going from u to v or from v to u?Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 14729 Accepted: 3894DescriptionIn order to make their sons brav原创 2014-11-29 13:47:25 · 476 阅读 · 0 评论 -
poj 2553 The Bottom of a Graph(强连通)
题目链接The Bottom of a GraphTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 9003 Accepted: 3728DescriptionWe will use the following (standard) definiti原创 2014-11-29 13:28:51 · 421 阅读 · 0 评论 -
poj 3687 Labeling Balls
题目链接Labeling BallsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11229 Accepted: 3223DescriptionWindy has N balls of distinct weights from 1 unit原创 2014-11-30 20:05:22 · 324 阅读 · 0 评论 -
hdu 4862 Jump(最小k路径覆盖)
JumpTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 495 Accepted Submission(s): 213Problem DescriptionThere are n*m grids, each g原创 2014-07-24 15:23:54 · 629 阅读 · 0 评论