随笔分类 -  2-SAT

ZOJ 3656 Bit Magic 第37届ACM/ICPC长春赛区现场赛B题 (2-SAT)
摘要:Bit MagicTime Limit: 8 Seconds Memory Limit: 32768 KBYesterday, my teacher taught me about bit operators: and (&), or (|), xor (^). I generated a number table a[N], and wrote a program to calculate the matrix table b[N][N] using three kinds of bit operator. I thought my achievement would get tea 阅读全文

posted @ 2012-10-16 10:50 kuangbin 阅读(1706) 评论(7) 推荐(0)

HDU 4115 Eliminate the Conflict (2-SAT)
摘要:Eliminate the ConflictTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 740Accepted Submission(s): 301Problem DescriptionConflicts are everywhere in the world, from the young to the elderly, from families to countries. Conflicts cause quarrels, fight 阅读全文

posted @ 2012-10-07 13:46 kuangbin 阅读(1354) 评论(1) 推荐(0)

POJ 3678 Katu Puzzle (2-SAT)
摘要:Katu PuzzleTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5749Accepted: 2077DescriptionKatu 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 (0 ≤ c ≤ 1). One Katu is solvable if one can find each 阅读全文

posted @ 2012-10-07 10:54 kuangbin 阅读(379) 评论(0) 推荐(0)

POJ 3648 Wedding(2-SAT)
摘要:WeddingTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5880Accepted: 1802Special JudgeDescriptionUp 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, opposite each other, and the bride wears an ela 阅读全文

posted @ 2012-10-07 10:23 kuangbin 阅读(2411) 评论(0) 推荐(0)

POJ 2296 Map Labeler(二分+2SAT可行性判断)
摘要:Map LabelerTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 1023Accepted: 337DescriptionMap generation is a difficult task in cartography. A vital part of such task is automatic labeling of the cities in a map; where for each city there is text label to be attached to its location, so that n 阅读全文

posted @ 2012-10-06 10:55 kuangbin 阅读(1114) 评论(0) 推荐(0)

POJ 3207 Ikki's Story IV - Panda's Trick(2-SAT)
摘要:Ikki's Story IV - Panda's TrickTime Limit: 1000MSMemory Limit: 131072KTotal Submissions: 6065Accepted: 2234Descriptionliympanda, 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 easy games and wants to play 阅读全文

posted @ 2012-10-06 10:09 kuangbin 阅读(1283) 评论(0) 推荐(0)

HDU 1814 Peaceful Commission(2-SAT)
摘要:Peaceful CommissionTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 802Accepted Submission(s): 158Problem DescriptionThe Public Peace Commission should be legislated in Parliament of The Democratic Republic of Byteland according to The Very Importa 阅读全文

posted @ 2012-10-05 22:46 kuangbin 阅读(2161) 评论(0) 推荐(0)

2-SAT总结
摘要:【2-SAT问题】现有一个由N个布尔值组成的序列A,给出一些限制关系,比如A[x]AND A[y]=0、A[x]OR A[y]OR A[z]=1等,要确定A[0..N-1]的值,使得其满足所有限制关系。这个称为SAT问题,特别的,若每种限制关系中最多只对两个元素进行限制,则称为2-SAT问题。由于在2-SAT问题中,最多只对两个元素进行限制,所以可能的限制关系共有11种:A[x]NOT A[x]A[x] AND A[y]A[x] AND NOT A[y]A[x] OR A[y]A[x] OR NOT A[y]NOT (A[x] AND A[y])NOT (A[x] OR A[y])A[x] X 阅读全文

posted @ 2012-10-05 18:56 kuangbin 阅读(20756) 评论(2) 推荐(10)

HDU 3622 Bomb Game(二分+2-SAT)
摘要:Bomb GameTime Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2294Accepted Submission(s): 769Problem DescriptionRobbie is playing an interesting computer game. The game field is an unbounded 2-dimensional region. There are N rounds in the game. At each 阅读全文

posted @ 2012-10-05 18:52 kuangbin 阅读(1960) 评论(2) 推荐(0)

导航

JAVASCRIPT: