摘要:
【概述】 LexBFS 是字典序广度优先搜索(Lexicographic BFS),其常用于弦图的判定。 每次按从 n 到 1 的顺序依次给点编号,每个点维护一个 list,用于记录与其相邻的已标号点的标号,每次选择 list 中字典序最大的未标号点标号。 L... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(109)
评论(0)
推荐(0)
摘要:
【本文思路】 整理自 CDQ 巨佬的弦图与区间图,具体内容:点击这里 【概述】 1.基本概念 设有图 G=(V,E),则: 当 V'∈V,E'∈E 时,图 G'=(V',E') 是图 G 的子图当 V'∈V,E'={∀x∈V',∀y∈V',(x,y)∈E'} ... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(318)
评论(0)
推荐(0)
摘要:
题目描述 小 N 最近在研究 NP 完全问题,小 O 看小 N 研究得热火朝天,便给他出了一道这样的题目: 有 n 个球,用整数 1 到 n 编号。还有 m 个筐子,用整数 1 到 m 编号。每个筐子最多能装 3 个球。 每个球只能放进特定的筐子中。... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(28)
评论(0)
推荐(0)
摘要:
Problem Description Piglet has got a birthday today. His friend Winnie the Pooh wants to make the best present for him — a hone... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(0)
评论(0)
推荐(0)
摘要:
Problem Description It's a beautiful April day and Wallace is playing football with his friends. But his friends do not know th... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(23)
评论(0)
推荐(0)
摘要:
Problem Description For he knew every Who down in Whoville beneath, Was busy now, hanging a mistletoe wreath. "And they're hang... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(24)
评论(0)
推荐(0)
摘要:
Problem Description One foggy Stockholm morning, Karlsson decided to snack on some jam in his friend Lillebror Svantenson's hou... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(210)
评论(0)
推荐(0)
摘要:
Problem Description Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(54)
评论(0)
推荐(0)
摘要:
【概述】 MCS 算法是最大势算法(Maximum Cardinality Search),其常用于弦图的判定、求弦图的最大团、最小着色、最大独立集、最小团覆盖等。 一个无向图的弦图当且仅当其有一个完美消除序列,MCS 算法能够在 O(n+m) 内求出一个完美... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(139)
评论(0)
推荐(0)
摘要:
题目描述 幼儿园里有N个小朋友,老师要从中选出来一部分做丢手绢的游戏,可是老师没有想到这么小的孩子里面有些人之间还有矛盾。老师想找出尽量多的小朋友去玩游戏,但是又很头疼,他不想看到找出来玩游戏的小朋友里面还有任何两个人之间存在着矛盾。如果告诉你小朋友之间... 阅读全文
posted @ 2022-09-20 22:52
老程序员111
阅读(32)
评论(0)
推荐(0)

浙公网安备 33010602011771号