I am a slow walker,but I never walk backwards. Abraham Lincoln

GeekZRF

03 2017 档案

UVA-1364.Knights of the Round Table 无向图BCC
摘要:题目链接:https://vjudge.net/problem/UVA-1364 题意:有n个人参加会议,互相憎恨的人不能坐在相邻的位置,并且每个会议参加的人数必须是奇数,求有多少个人不能参加任何一个会议。 思路:如果两个人可以坐在一起,则在他们之间建立一条无向边。求不在任何一个简单奇圈上面的点的个 阅读全文

posted @ 2017-03-29 16:06 GeekZRF 阅读(146) 评论(0) 推荐(0)

大白书中无向图的点双联通分量(BCC)模板的分析与理解
摘要:对于一个无向图,如果任意两点至少存在两条点不重复(除起点和终点外无公共点)的路径,则这个图就是点双联通。 这个要求等价于任意两条边都存在于一个简单环(即同一个点不能在圈中出现两次)中,即内部无割点。 那么算法首先要求出割点。 从代码中可以看出:只要求出割点,就开始组一个bcc中。 如果割点两侧都不存 阅读全文

posted @ 2017-03-29 15:29 GeekZRF 阅读(352) 评论(0) 推荐(0)

HDU 4455.Substrings
摘要:Substrings Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3240 Accepted Submission(s): 990 Prob 阅读全文

posted @ 2017-03-27 17:22 GeekZRF 阅读(189) 评论(0) 推荐(0)

Codeforces 787D. Legacy 线段树建模+最短路
摘要:D. Legacy time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Rick and his co-workers have m 阅读全文

posted @ 2017-03-26 16:54 GeekZRF 阅读(760) 评论(0) 推荐(0)

UVA 11324.The Largest Clique tarjan缩点+拓扑dp
摘要:题目链接:https://vjudge.net/problem/UVA-11324 题意:求一个有向图中结点数最大的结点集,使得该结点集中任意两个结点u和v满足:要目u可以到达v,要么v可以到达u(相互可达也可以)。 思路:同一个强联通分量的结点集中任意两个结点u和v满足题的要求足:要么u可以到达v 阅读全文

posted @ 2017-03-23 20:45 GeekZRF 阅读(179) 评论(0) 推荐(0)

Codeforces 791C. Bear and Different Names 模拟构造
摘要:C. Bear and Different Names time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output In the army, 阅读全文

posted @ 2017-03-19 13:35 GeekZRF 阅读(313) 评论(0) 推荐(0)

Codeforces 791B. Bear and Friendship Condition 联通快 完全图
摘要:B. Bear and Friendship Condition time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Bear Lim 阅读全文

posted @ 2017-03-19 13:18 GeekZRF 阅读(287) 评论(0) 推荐(0)

Codeforces 782B. The Meeting Place Cannot Be Changed 三分
摘要:B. The Meeting Place Cannot Be Changed time limit per test:5 seconds memory limit per test:256 megabytes input:standard input output:standard output T 阅读全文

posted @ 2017-03-13 21:48 GeekZRF 阅读(250) 评论(0) 推荐(0)

Codeforces 782C. Andryusha and Colored Balloons 搜索
摘要:C. Andryusha and Colored Balloons time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Andryu 阅读全文

posted @ 2017-03-06 18:37 GeekZRF 阅读(270) 评论(0) 推荐(0)

Codeforces 799D. String Game 二分
摘要:D. String Game time limit per test:2 seconds memory limit per test:512 megabytes input:standard input output:standard output Little Nastya has a hobby 阅读全文

posted @ 2017-03-04 17:47 GeekZRF 阅读(261) 评论(0) 推荐(0)

导航