摘要:
ZOJ3543 Number String状态f[i][j]表示长度为I的全排列,符合字符串的要求,最后一位数字是j的方案数。重点在要始终保持是f算的排列的数量,然后转移时用这些推出来新的情况。就是j#include #include using namespace std;const long l... 阅读全文
摘要:
poj2749 Building roadshttp://poj.org/problem?id=2749二分答案,以后构造布尔表达式。 相互讨厌是!((a and b)or(!a and !b) 化简得 (!a or !b)and(a or b) 相互喜欢是!(a and !b)or(!a an... 阅读全文