关闭
当前搜索:

UVa247电话圈(强联通分量--传递闭包+并查集 or tarjan算法)

If you’ve seen television commercials for long-distance phone companies lately, you’ve noticed thatmany companies have been spending a lot of money trying to convince people that they provide thebest ......
阅读(50) 评论(0)

UVA 12219(公共表达式消除---模拟二叉树)紫书

Let the set Σ consist of all words composed of 1-4 lower case letters, such as the words “a”, “b”, “f”,“aa”, “fun” and “kvqf”. Consider expressions according to the grammar with the two rulesE → fE → ......
阅读(70) 评论(0)

codeforces Connected Components(寻找补图的连通块)

http://codeforces.com/contest/920/problem/E E. Connected Components? time limit per test 2 seconds memory limit per test 256 megabytes input standard input outp...
阅读(103) 评论(0)

ZOJ 3206 (tarjan缩点+DAG带权最长路)

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3206 Disaster Area Reconstruction Time Limit: 10 Seconds      Memory Limit: 32768 KB There was a large earthquake in Sichuan ...
阅读(80) 评论(0)

D. Robot Rapping Results Report(拓扑排序)

http://codeforces.com/contest/645/problem/D D. Robot Rapping Results Report time limit per test 2 seconds memory limit per test 256 megabytes input standard input output ...
阅读(100) 评论(0)

codeforces Round 36 D. Almost Acyclic Graph(dfs+拓扑排序判环)

http://codeforces.com/contest/915/problem/D D. Almost Acyclic Graph time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a directed graph consisting of n vertices and m edges (each edge is d...
阅读(95) 评论(1)

最小费用流 uva10806

You are a political prisoner in jail. Things are looking grim, but fortunately, your jailmate has come up with an escape plan. He has found a way for both of you to get out of the cell and run through the city to the train station, where you will leave the...
阅读(467) 评论(0)

HDU 5934 强连通分量

There are NN bombs needing exploding. Each bomb has three attributes: exploding radius riri, position (xi,yi)(xi,yi) and lighting-cost cici which means you need to pay cici cost making it explode. If a un-lighting bomb is in or on the border the explod...
阅读(531) 评论(0)

tarjan算法的学习 uva12167,uva315,uva796

图的强连通&tarjan算法 强连通图:如果有向图G中的任意两个点u,v是互相可到达的,则称图G为强连通图。否则G为非强连通图。 强连通分量:若有向图G为非强连通图,它的子图G' 是强连通图,则称G' 为G的强连通分量。(极大强连通子图) 返图:将有向图G中的所有边的方向逆置,即u->v变为v->u 定理:对于一个有向图G,按照dfs的后序遍历到的点...
阅读(193) 评论(0)

floyd求图的最小环路 HDU1599

find the mincost route Time Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5879 Accepted Submission(s): 2346 Problem Description 杭州有N个景区,景区之间有一些双向的路来连接,现在8600想找一条旅游路线,这个路线从A点出发并且最后回到A点,假设经过的路线为V1,...
阅读(363) 评论(0)

树的最小支配集poj3659、最小点覆盖、最大独立集

Cell Phone Network Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7002 Accepted: 2509 Description Farmer John has decided to give each of his cows a cell phone in hopes to encourage their social interaction. This, however, requires him to se...
阅读(412) 评论(0)

HDU 6090 Rikka with Graph (图论规律题)

Rikka with Graph Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1009 Accepted Submission(s): 583 Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, ...
阅读(343) 评论(0)

ICPC2015(沈阳)HDU5521 建图技巧+最短路

Meeting Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 3533 Accepted Submission(s): 1136 Problem Description Bessie and her friend Elsie decide to have a meeting. However, after Farmer Joh...
阅读(593) 评论(0)

树上两点最近公共祖先LCA的倍增算法 poj1986

Distance Queries Time Limit: 2000MS Memory Limit: 30000K Total Submissions: 14755 Accepted: 5187 Case Time Limit: 1000MS Description Farmer John's cows refused to run in his marathon since he chose a path much too long for their leisurely lifestyle. He ...
阅读(509) 评论(0)

ICPC2017网络赛(北京)Territorial Dispute(凸包分割)

#1582 : Territorial Dispute 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 In 2333, the C++ Empire and the Java Republic become the most powerful country in the world. They compete with each other in the colonizing the Mars. There are n colonies on the Mars, numbe...
阅读(595) 评论(0)

二分匹配 4579: 多米诺骨牌II(中石油)

4579: 多米诺骨牌II 时间限制: 1 Sec 内存限制: 128 MB 提交: 42 解决: 11 [提交][状态][讨论版] 题目描述 一个矩形可以划分成M*N个小正方形,其中有一些小正方形不能使用。一个多米诺骨牌占用两个相邻的小正方形。试问整个区域内最多可以不重叠地放多少个多米诺骨牌且不占用任何一个被标记为无法使用的小正方形。 输入 第一行有两个用空格隔开的正整数M和N(M<=50,N<=50)。 第二行有一个正整数K,表示共有K个小正方形不能使用。输入数据保证K<=M*N。 以下K行每...
阅读(307) 评论(0)

最小树形图--有向图的最小生成树 poj 3164 Command Network

【最小树形图】: 就是给有向带权图中指定一个特殊的点root,求一棵以root为根的有向生成树T,并且T中所有边的总权值最小。 最小树形图必须有一个根,而且选择不同的点作为根,也是不一样的结果。 最小树形图必须包含图中的每一个节点,并且均可通过有向边到达根节点root 最小树形图的第一个算法是 1965年朱永津和刘振宏提出的复杂度为O(VE)的算法。 Command Network Time Limit: 1000MS Memory Limit: 131072K Total Submissions: ...
阅读(401) 评论(0)

次小生成树的学习 POJ1679 The Unique MST

The Unique MST Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 32145 Accepted: 11631 Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected ...
阅读(274) 评论(0)

欧拉图的学习hdu1878(欧拉回路)

欧拉回路 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 15658 Accepted Submission(s): 5987 Problem Description 欧拉回路是指不令笔离开纸面,可画过图中每条边仅一次,且可以回到起点的一条回路。现给定一个图,问是否存在欧拉回路? Input 测试输入包含若干测试用例。每个...
阅读(354) 评论(0)

差分约束系统的学习 poj1364(bellman和spfa)

King Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 13843 Accepted: 4920 Description Once, in one kingdom, there was a queen and that queen was expecting a baby. The queen prayed: ``If my child was a son and if only he was a sound king.'' Af...
阅读(1759) 评论(2)
43条 共3页1 2 3 下一页 尾页
    个人资料
    • 访问:103702次
    • 积分:3019
    • 等级:
    • 排名:第13770名
    • 原创:197篇
    • 转载:9篇
    • 译文:0篇
    • 评论:33条
    博客专栏
    最新评论