![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
2-SAT
心悦灵溪
这个作者很懒,什么都没留下…
展开
-
JSOI2010 满汉全席 【2-SAT】
传送门:题目链接满汉全席题目描述满汉全席是中国最丰盛的宴客菜肴,有许多种不同的材料透过满族或是汉族的料理方式,呈现在數量繁多的菜色之中。由于菜色众多而繁杂,只有极少數博学多闻技艺高超的厨师能够做出满汉全席,而能够烹饪出经过专家认证的满汉全席,也是中国厨师最大的荣誉之一。世界满汉全席协会是由能够料理满汉全席的专家厨师们所组成,而他们之间还细分为许多不同等级的厨师。为了招收新进的厨师进...原创 2019-10-30 09:34:16 · 136 阅读 · 0 评论 -
HDU 3715 Go Deeper 【二分+2-SAT】
传送门:HDU 3715Go DeeperTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionHere is a procedure’s pseudocode:go(int dep, int n, int m)beginout...原创 2019-08-10 10:10:23 · 135 阅读 · 0 评论 -
POJ 3207 Ikki's Story IV - Panda's Trick 【经典2-SAT】
传送门:POJ 3207Ikki's Story IV - Panda's TrickTime Limit: 1000MS Memory Limit: 131072KProblem Descriptionliympanda, one of Ikki’s friend, likes playing games with Ikki. Today after minesweeping ...原创 2019-08-07 18:00:22 · 138 阅读 · 0 评论 -
HDU 3622 Bomb Game 【二分+2-SAT】
传送门:HDU 3622Bomb GameTime Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionRobbie is playing an interesting computer game. The game field is an...原创 2019-08-09 21:05:25 · 408 阅读 · 0 评论 -
POJ 2749 Building roads 【经典2-SAT+二分枚举】
传送门:POJ 2749Building roadsTime Limit: 2000MS Memory Limit: 65536KProblem DescriptionFarmer John’s farm has N barns, and there are some cows that live in each barn. The cows like to drop aroun...原创 2019-08-09 17:30:22 · 248 阅读 · 0 评论 -
POJ 2723 Get Luffy Out 【经典2-SAT】
传送门:POJ 2723Get Luffy OutTime Limit: 2000MS Memory Limit: 65536KProblem DescriptionRatish is a young man who always dreams of being a hero. One day his friend Luffy was caught by Pirate Arlon...原创 2019-08-09 14:33:56 · 163 阅读 · 0 评论 -
HDU 4115 Eliminate the Conflict 【2-SAT】
传送门:HDU 4115Eliminate the ConflictTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionConflicts are everywhere in the world, from the young to...原创 2019-08-07 11:17:25 · 214 阅读 · 0 评论 -
2-SAT讲解+模板
一、定义要知道2-sat是什么我们先要知道什么是适定性问题(Satisfiability)。适定性问题通俗的来说就是确定是否可以满足所有条件,或者说就是确定一个满足所有条件的方案。取英文的前三个字母,简称sat问题。通俗的sat问题表述一般是这样的:有很多个集合,每个集合里面有若干元素,现给出一些取元素的规则,要你判断是否可行,可行则给出一个可行方案。如果所有集合中,元素个数最多的集合有k个,...原创 2019-08-06 21:19:02 · 354 阅读 · 0 评论 -
POJ 3678 Katu Puzzle 【经典2-SAT】
传送门:POJ 3678Katu PuzzleTime Limit: 1000MS Memory Limit: 65536KProblem DescriptionKatu Puzzle is presented as a directed graph G(V, E) with each edge e(a, b) labeled by a boolean operator op (...原创 2019-08-08 20:23:16 · 158 阅读 · 0 评论 -
HDU 3026 和 HDU 1814 【2-SAT模板题】
HDU 3062PartyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description有n对夫妻被邀请参加一个聚会,因为场地的问题,每对夫妻中只有1人可以列席。在2n 个人中,某些人之间有着很大的矛盾(当然夫妻之间是没有矛盾的),有矛盾的2个人是...原创 2019-08-06 18:17:13 · 182 阅读 · 0 评论 -
Gym - 101398I Idol 【2-SAT】
传送门:Gym - 101398I题解:2-SAT的模板题,问你在保证每个评委至少有一个选择成立的情况下,1(karl)能不能被选中。既然每个评委至少有一个选择得成立,那么我们建边时就保证一旦选择1没选,就一定选选择2;选择2没选,就一定选选择1。还有要强制选择karl,判断可行性即可。AC代码:#include<iostream>#include<alg...原创 2019-08-06 17:55:33 · 136 阅读 · 0 评论 -
POJ 3683 Priest John's Busiest Day 【经典2-SAT】
传送门:POJ 3683Priest John's Busiest DayTime Limit: 2000MS Memory Limit: 65536KProblem DescriptionJohn is the only priest in his town. September 1st is the John’s busiest day in a year because t...原创 2019-08-08 15:54:03 · 164 阅读 · 0 评论