2012年10月5日

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 阅读 (1932) 评论 (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 阅读 (17715) 评论 (2) 编辑

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 阅读 (1540) 评论 (2) 编辑

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

ZOJ 3460 Missile(二分+二分匹配)

摘要:MissileTime Limit: 2 Seconds Memory Limit: 65536 KBYou control N missile launching towers. Every tower has enough missiles, but for each tower only one missile can be launch at the same time. Before the launching, every missile need T1 seconds to leave the tower. Assume that all the missiles have t. 阅读全文

posted @ 2012-10-05 00:00 kuangbin 阅读 (301) 评论 (0) 编辑

导航

统计

JAVASCRIPT: