![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
sigh_
这个作者很懒,什么都没留下…
展开
-
洛谷_2474 [SCOI2008]天平(差分约束)
[SCOI2008]天平 题目链接:https://www.luogu.com.cn/problem/P2474 题解: 设dis1[i][j]dis1[i][j]dis1[i][j]代表j−i≤dis1[i][j]j-i\le dis1[i][j]j−i≤dis1[i][j], dis2[i][j]dis2[i][j]dis2[i][j]代表j−i≥dis2[i][j]j-i\ge dis2[i][j]j−i≥dis2[i][j]。 初始化: 若str[i][j] == ‘+’ , dis1[i][j]原创 2020-11-13 10:10:26 · 93 阅读 · 0 评论 -
POJ_2983 Is the Information Reliable?(差分约束)
Is the Information Reliable? Time Limit: 3000MS Memory Limit: 131072K Problem Description The galaxy war between the Empire Draco and the Commonwealth of Zibu broke out 3 years ago. Draco established a line of defense called Grot. Grot is a straight line原创 2020-11-06 15:03:24 · 109 阅读 · 0 评论 -
CodeForces_1422D Returning Home(最短路)
Returning Home time limit per test:2 seconds memory limit per test:256 megabytes Problem Description Yura has been walking for some time already and is planning to return home. He needs to get home as fast as possible. To do this, Yura can use the instant-原创 2020-10-05 18:14:11 · 712 阅读 · 1 评论 -
POJ_3694 Network(并查集+DFS)
Network Time Limit: 5000MS Memory Limit: 65536K Problem Description A network administrator manages a large network. The network consists of N computers and M links between pairs of computers. Any pair of computers are connected directly or indirectly by原创 2020-09-18 11:42:25 · 104 阅读 · 0 评论 -
ZOJ_3009 Spread Sheet(拓扑排序)
Spread Sheet Time Limit: 2000 ms Memory Limit: 65536 KB Problem Description In 1979, Dan Bricklin and Bob Frankston wrote VisiCalc, the first spreadsheet application. It became a huge success and, at that time, was the killer application for the Apple II c原创 2020-08-19 19:06:06 · 149 阅读 · 0 评论 -
ZOJ_1903 Jogging Trails(Floyd+DFS)
Jogging Trails Time Limit: 2000 ms Memory Limit: 65536 KB Problem Description Gord is training for a marathon. Behind his house is a park with a large network of jogging trails connecting water stations. Gord wants to find the shortest jogging route that t原创 2020-07-28 20:20:17 · 203 阅读 · 0 评论 -
ZOJ_3229 Shoot the Bullet(有源汇有上下界最大流)
Shoot the Bullet Time Limit: 2000 ms Memory Limit: 32768 KB Problem Description Gensokyo is a world which exists quietly beside ours, separated by a mystical border. It is a utopia where humans and other beings such as fairies, youkai(phantoms), and gods l原创 2020-06-01 09:31:30 · 155 阅读 · 0 评论 -
POJ_2594 Treasure Exploration(最小路径覆盖)
Treasure Exploration Time Limit: 6000MS Memory Limit: 65536K Problem Description Have you ever read any book about treasure exploration? Have you ever see any film about treasure exploration? Have you ever explored treasure? If you never have such experi原创 2020-05-24 23:08:18 · 125 阅读 · 0 评论 -
51nod_2929 部落战争(DAG最小路径覆盖)
部落战争 Problem Description lanzerb的部落在A国的上部,他们不满天寒地冻的环境,于是准备向A国的下部征战来获得更大的领土。 A国是一个M*N的矩阵,其中某些地方是城镇,某些地方是高山深涧无人居住。lanzerb把自己的部落分成若干支军队,他们约定: 每支军队可以从任意一个城镇出发,并只能从上往向下征战,不能回头。途中只能经过城镇,不能经过高山深涧。 如果某个城镇被某支军队到过,则其他军队不能再去那个城镇了。 每支军队都可以在任意一个城镇停止征战。 所有军队都很奇怪,他们走的方法有原创 2020-05-24 12:24:58 · 251 阅读 · 0 评论 -
POJ_3522 Slim Span(最小生成树)
Slim Span Time Limit: 5000MS Memory Limit: 65536K Problem Description Given an undirected weighted graph G, you should find one of spanning trees specified as follows. The graph G is an ordered pair...原创 2020-04-22 10:53:01 · 153 阅读 · 0 评论 -
51nod_2983 数字配对(费用流)
数字配对 Problem Description 有 n 种数字,第 i 种数字是 ai、有 bi 个,权值是 ci。 若两个数字 ai、aj 满足,ai 是 aj 的倍数,且 ai/aj 是一个质数, 那么这两个数字可以配对,并获得 ci×cj 的价值。 一个数字只能参与一次配对,可以不参与配对。 在获得的价值总和不小于 0 的前提下,求最多进行多少次配对。 Input 第一行一个整数 n。 第...原创 2020-04-20 20:36:34 · 183 阅读 · 0 评论 -
ZOJ_3780 Paint the Grid Again(拓扑排序)
Paint the Grid Again Time Limit: 2000 ms Memory Limit: 65536 KB Problem Description Leo has a grid with N × N cells. He wants to paint each cell with a specific color (either black or white). Leo has ...原创 2020-04-13 09:17:00 · 99 阅读 · 0 评论 -
51nod_2861 满汉全席(2-SAT)
满汉全席 Problem Description 满汉全席是中国最丰盛的宴客菜肴,有许多种不同的材料透过满族或是汉族的料理方式,呈现在数量繁多的菜色之中。由于菜色众多而繁杂,只有极少数博学多闻技艺高超的厨师能够做出满汉全席,而能够烹饪出经过专家认证的满汉全席,也是中国厨师最大的荣誉之一。世界满汉全席协会是由能够料理满汉全席的专家厨师们所组成,而他们之间还细分为许多不同等级的厨师。 为了招收新进的厨...原创 2020-03-25 11:41:00 · 157 阅读 · 0 评论