摘要:
2 SAT 可以把每一次仪式看成变量,0/1的取值分别为开头举行和结尾举行。 转换为2 SAT接受的命题,就是看某一次仪式中有没有重合的时间段,有的话,就按照不冲突的形式连有向边。 然后跑tarjan就行啦,我们把时间全部转成分钟方便处理。。 include include include incl 阅读全文
摘要:
支配树 其实还是一道支配树板子题。。 最后在树上dfs统计一下点到根的信息就行啦~ include define INF 0x3f3f3f3f define full(a, b) memset(a, b, sizeof a) using namespace std; typedef long lon 阅读全文
摘要:
支配树 get了新技能。。名字真酷啊(逃 贴个板子 include define INF 0x3f3f3f3f define full(a, b) memset(a, b, sizeof a) using namespace std; typedef long long ll; inline int 阅读全文