上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 94 下一页

2012年10月7日

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 阅读(2397) 评论(0) 推荐(0) 编辑

2012年10月6日

HDU 4418 Time travel(高斯消元法求解概率DP)

摘要: Time travelTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 517Accepted Submission(s): 80Problem DescriptionAgent K is one of the greatest agents in a secret organization called Men in Black. Once he needs to finish a mission by traveling through ti 阅读全文

posted @ 2012-10-06 23:09 kuangbin 阅读(2279) 评论(0) 推荐(2) 编辑

HDU 4336 Card Collector(概率DP,状态压缩)

摘要: Card CollectorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1405Accepted Submission(s): 624Special JudgeProblem DescriptionIn your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you colle 阅读全文

posted @ 2012-10-06 16:50 kuangbin 阅读(2860) 评论(5) 推荐(2) 编辑

ZOJ 3604 Help Me Escape(期望DP)

摘要: Help Me EscapeTime Limit: 2 Seconds Memory Limit: 32768 KBBackgroundIf thou doest well, shalt thou not be accepted? and if thou doest not well, sin lieth at the door. And unto thee shall be his desire, and thou shalt rule over him. And Cain talked with Abel his brother: and it came to pass, when th. 阅读全文

posted @ 2012-10-06 15:49 kuangbin 阅读(1630) 评论(0) 推荐(0) 编辑

ZOJ 3380 Patchouli's Spell Cards(概率DP)

摘要: Patchouli's Spell CardsTime Limit: 7 Seconds Memory Limit: 65536 KBPatchouli Knowledge, the unmoving great library, is a magician who has settled down in the Scarlet Devil Mansion (紅魔館). Her specialty is elemental magic employing the seven elements fire, water, wood, metal, earth, sun, and moon. 阅读全文

posted @ 2012-10-06 14:57 kuangbin 阅读(1596) 评论(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 阅读(1080) 评论(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 阅读(1266) 评论(0) 推荐(0) 编辑

2012年10月5日

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 阅读(20602) 评论(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 阅读(1938) 评论(2) 推荐(0) 编辑

HDU 4118 Holiday's Accommodation(树形DP)

摘要: /*#pragma comment(linker, "/STACK:10240000000000,10240000000000")*/#include<stdio.h>#include<algorithm>#include<iostream>#include<string.h>using namespace std;const int MAXN=200010;struct Node{ int to,next; int len;}edge[MAXN*2];int head[MAXN];int tol;int num[MAXN]; 阅读全文

posted @ 2012-10-05 15:04 kuangbin 阅读(1241) 评论(0) 推荐(1) 编辑

上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 94 下一页

导航

JAVASCRIPT: