随笔分类 - 图论-2-sat
摘要:题目链接 "BZOJ1997" 题解 显然相交的两条边不能同时在圆的一侧,判一下就好了 但这样边数是的,无法通过此题 但是很小,平面图 边数上界为,所以过大的可以判掉 C++ include include include include inc
阅读全文
摘要:题目链接 "BZOJ3495" 题解 每个城市都有选和不选两种情况,很容易考虑到2 sat 边的限制就很好设置了,主要是每个郡只有一个首都的限制 我们不可能两两之间连边,这样复杂度就爆炸了 于是乎就有了一个非常厉害的方法: 前缀后缀和 我们令表示选,表示不选,维护一个郡的前缀和、后缀和
阅读全文
摘要:题目 题目背景 狂野飙车是小 L 最喜欢的游戏。与其他业余玩家不同的是,小 L 在玩游戏之余,还精于研究游戏的设计,因此他有着与众不同的游戏策略。 题目描述 小 L 计划进行nn 场游戏,每场游戏使用一张地图,小 L 会选择一辆车在该地图上完成游戏。 小 L 的赛车有三辆,分别用大写字母A、B、C表
阅读全文
摘要:题目 Farmer John's farm has N barns, and there are some cows that live in each barn. The cows like to drop around, so John wants to build some roads to
阅读全文
摘要:题目 Ratish is a young man who always dreams of being a hero. One day his friend Luffy was caught by Pirate Arlong. Ratish set off at once to Arlong's i
阅读全文
摘要:题目 Up to thirty couples will attend a wedding feast, at which they will be seated on either side of a long table. The bride and groom sit at one end,
阅读全文
摘要:题目 Katu Puzzle is presented as a directed graph G(V, E) with each edge e(a, b) labeled by a boolean operator op (one of AND, OR, XOR) and an integer c
阅读全文
摘要:题目 John is the only priest in his town. September 1st is the John's busiest day in a year because there is an old legend in the town that the couple w
阅读全文
摘要:题目 liympanda, one of Ikki’s friend, likes playing games with Ikki. Today after minesweeping with Ikki and winning so many times, he is tired of such e
阅读全文
摘要:题目 满汉全席是中国最丰盛的宴客菜肴,有许多种不同的材料透过满族或是汉族的料理方式,呈现在數量繁多的菜色之中。由于菜色众多而繁杂,只有极少數博学多闻技艺高超的厨师能够做出满汉全席,而能够烹饪出经过专家认证的满汉全席,也是中国厨师最大的荣誉之一。 世界满汉全席协会是由能够料理满汉全席的专家厨师们所组成
阅读全文