-------------图论-------------
文章平均质量分 80
Key_LD
垫底一本的寝室蹲
展开
-
HDU 5883 2016 ICPC青岛网络赛
The Best PathTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 784 Accepted Submission(s): 325Problem DescriptionAlice is planning原创 2016-09-21 20:49:04 · 301 阅读 · 0 评论 -
hdu4499 超暴力dfs回溯
DescriptionIn Chinese Chess, there is one kind of powerful chessmen called Cannon. It can move horizontally or vertically along the chess grid. At each move, it can either simply move to another e原创 2016-08-03 09:38:59 · 384 阅读 · 0 评论 -
POJ 3503 神特么的 BFS
再一次感慨英语是多么的重要 今天打比赛写到这题一直看不懂 尤其是最关键的那个双重否定一出来我整个人就懵逼了我还是弱弱的简单说一下题意吧 就是给你一个二维数组 每个值表示高度给你 长 宽 和一个数d如果一个点高度为h 只走 高度大于 h-d 的点并且达不到一个更高的点 那么这个点就是一个峰值求峰值的数目思路原创 2016-07-28 23:22:02 · 280 阅读 · 0 评论 -
hdu1198 不一样的搜索水题
Benny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in these squares. Different square has a different type o原创 2016-07-27 20:25:17 · 388 阅读 · 0 评论 -
FZU2039 匈牙利算法
惯例来个简介 因为一开始看到这个算法的时候我也十分懵逼匈牙利算法是由匈牙利数学家Edmonds于1965年提出,因而得名。匈牙利算法是基于Hall定理中充分性证明的思想,它是部图匹配最常见的算法,该算法的核心就是寻找增广路径,它是一种用增广路径求二分图最大匹配的算法。其实说白了 这个算法用途有限 只能求二分图的最大匹配(如果没有任何扩展,毕竟我是鶸……原创 2016-07-26 21:45:22 · 295 阅读 · 0 评论 -
codeforces 14D 个人搜索小进阶
一看到这道题我就是大写 的懵逼这道题上半年去华科还是地大打邀请赛的时候做到过类似的题目,当初写不来就跳过去了,结果现在因果循环,真是造孽题意:给你一个无向不成环的图 让你找出两条不相交的树链 使其乘积最大思路 枚举每一条道路 并使其暂时断裂 再从这条道路的两端开始搜索 寻找最长的树链即可说实话 搜索的题目虽然说做的还凑合 但是这种原创 2016-07-24 15:24:01 · 281 阅读 · 0 评论 -
hdu1728 关于bfs的理解
Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,不能转太多弯原创 2016-07-06 09:50:35 · 370 阅读 · 0 评论 -
HDU1180
DescriptionHogwarts正式开学以后,Harry发现在Hogwarts里,某些楼梯并不是静止不动的,相反,他们每隔一分钟就变动一次方向. 比如下面的例子里,一开始楼梯在竖直方向,一分钟以后它移动到了水平方向,再过一分钟它又回到了竖直方向.Harry发现对他来说很难找到能使得他最快到达目的地的路线,这时Ron(Harry最好的朋友)告诉Harry正好有一个魔法道具可以帮助他原创 2016-07-04 20:51:41 · 472 阅读 · 0 评论 -
poj1011 sticks
DescriptionGeorge took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many s原创 2016-07-03 23:26:45 · 224 阅读 · 0 评论 -
HDU4403
A - A very hard Aoshu problemTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 4403DescriptionAoshu is very popular among p原创 2016-11-07 14:39:42 · 327 阅读 · 0 评论 -
算法学习——求割点与桥的tarjan算法 HDU4738
前天打周赛做到 HDU4738 绞尽脑汁都没想到用什么好的方法来解决这个问题 周赛结束之后跟Yasola和xcy讨论了一下居然用到 tarjan算法 exm??? tarjan不是用来求 lca的么???回去怒补了一发才知道 tarjan原来是一系列是算法 根据我看到的博客原文 可以这么说 tarjan是个天才 他伟大的一生创造了无数的算法 统称 tarjan算原创 2016-11-15 11:48:58 · 2328 阅读 · 1 评论 -
hdu1498 大水题
DescriptionOn Octorber 21st, HDU 50-year-celebration, 50-color balloons floating around the campus, it's so nice, isn't it? To celebrate this meaningful day, the ACM team of HDU hold some fuuny ga原创 2016-08-07 18:35:31 · 524 阅读 · 5 评论 -
hdu 1045 二分匹配练习 重在转化啊!!
Fire NetTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10212 Accepted Submission(s): 5975Problem DescriptionSuppose that we have原创 2016-08-08 19:42:05 · 210 阅读 · 0 评论 -
hdu1350 坐标建图后的最小路径覆盖
Taxi Cab SchemeTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1067 Accepted Submission(s): 533Problem DescriptionRunning a tax原创 2016-08-08 23:03:04 · 379 阅读 · 0 评论 -
hdu 1384 差分约束
DescriptionYou are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn.Write a program that: > reads the number of intervals, their endpoints and integers c1, ..., cn f原创 2016-08-22 20:51:41 · 350 阅读 · 0 评论 -
hdu 1664 Different Digits 数位BFS(怎么都是这些题……
DescriptionGiven a positive integer n, your task is to find a positive integer m, which is a multiple of n, and that m contains the least number of different digits when represented in decimal. Fo原创 2016-08-26 14:39:44 · 507 阅读 · 0 评论 -
hdu 1226 超级密码 数位bfs(我称之为
Problem DescriptionIgnatius花了一个星期的时间终于找到了传说中的宝藏,宝藏被放在一个房间里,房间的门用密码锁起来了,在门旁边的墙上有一些关于密码的提示信息:密码是一个C进制的数,并且只能由给定的M个数字构成,同时密码是一个给定十进制整数N(0注意:由于宝藏的历史久远,当时的系统最多只能保存500位密码.因此如果得到的密码长度大于500也不能用来开启房门,这原创 2016-08-26 09:44:30 · 408 阅读 · 0 评论 -
hdu 1534 简单差分约束
DescriptionA project can be divided into several parts. Each part should be completed continuously. This means if a part should take 3 days, we should use a continuous 3 days do complete it. There原创 2016-08-24 16:55:30 · 360 阅读 · 0 评论 -
hdu 4474 数位BFS
DescriptionThere are tons of problems about integer multiples. Despite the fact that the topic is not original, the content is highly challenging. That’s why we call it “Yet Another Multiple Probl原创 2016-08-24 10:57:16 · 351 阅读 · 0 评论 -
poj 1135 基础最短路
DescriptionDid you know that you can use domino bones for other things besides playing Dominoes? Take a number of dominoes and build a row by standing them on end with only a small distance in betwe原创 2016-08-22 14:30:51 · 349 阅读 · 0 评论 -
hdu2874 lca问题的Tarjan算法 内存险过
Problem DescriptionAfter World War X, a lot of cities have been seriously damaged, and we need to rebuild those cities. However, some materials needed can only be produced in certain places. So we n原创 2016-08-17 21:44:55 · 434 阅读 · 0 评论 -
HDU 2818 && POJ1988 带权并查集
DescriptionJohn are playing with blocks. There are N blocks (1 M X Y : Put the whole pile containing block X up to the pile containing Y. If X and Y are in the same pile, just ignore this comman原创 2016-08-16 19:57:15 · 356 阅读 · 0 评论 -
HDU 2853 Assignment 建图的巧妙性
DescriptionLast year a terrible earthquake attacked Sichuan province. About 300,000 PLA soldiers attended the rescue, also ALPCs. Our mission is to solve difficulty problems to optimization the assi原创 2016-08-12 15:38:04 · 343 阅读 · 0 评论 -
hdu4634 状压bfs
Description“Swipe Bo” is a puzzle game that requires foresight and skill.The main character of this game is a square blue tofu called Bo. We can swipe up / down / left / right to move Bo up /原创 2016-08-10 15:13:03 · 352 阅读 · 0 评论 -
算法学习—— tarjan算法求强连通分量 (附带 hdu1827
tarjan算法的第三个应用 求强连通分量强连通分量我就不具体介绍了这次的关键数组含义仍然没变 low[u] 仍然还是 u 能到达的最小的 low[v] ( low[v] 又由它最小的 low[v'] 决定 这里有个很关键的点 low[u] == dfn[u] 若以 求割点与桥的tarjan理解 表示 u 的子树的结点中最早能返回到 u,不能访问到u的祖先,原创 2016-11-18 23:55:57 · 360 阅读 · 0 评论