10 2013 档案
摘要:poj 1716 Integer Intervals 因为没提无解,就当是保证有解吧。为了方便,先把点的标号都加一。约束条件有三个。 (1)题目对区间的要求用前缀和表示 S[b+1]-s[a]>=2 (2)前缀和本身隐含一个约束条件 S[i]-S[i-1]>=0 (3)一个数字只取一次 S[i]-S[i-1]#include #include #include #include usin...
阅读全文
摘要:灰书例题,用染色判断二分图在点双联通分量找奇圈。 写错了几次,返祖边不能入栈。====== 题目建模利用补图,因为是圆桌,所以人在奇环上。 其实返祖边可以入栈,我自己没判(DFN[i]DFN[u]>Low[u])。 想想应该还是把那个判断(DFN[i]#include #include #inc...
阅读全文
摘要:A B warm up 无向图有重边求桥树上DFS遍历找最长路模板。。。 Code#pragma comment(linker,"/STACK:102400000,102400000")#include #include #include #include #define PII make_pair#define edge vector >#define fill(x,y) memset(x,...
阅读全文

浙公网安备 33010602011771号