摘要: "传送门" 最小割,割点,模板。。。 代码: c++ include include include include include using namespace std; void read(int &x) { char ch; bool ok; for(ok=0,ch=getchar(); ! 阅读全文
posted @ 2019-03-03 20:11 蒟蒻--lichenxi 阅读(162) 评论(0) 推荐(0)
摘要: "传送门" AC自动机也可以写的啊,就是判断多了点,思路和KMP的挺像的 "具体的可以参考一下这一篇" 然后贴一个代码: c++ include include include include include include using namespace std; void read(int &x 阅读全文
posted @ 2019-03-03 18:30 蒟蒻--lichenxi 阅读(306) 评论(2) 推荐(0)
摘要: "传送门1449" "传送门2895" 平方很难处理,考虑剩下的比赛所有队全输(只能全输,全赢保证不了费用流的正确性),考虑计算每个队多赢一次的贡献 拆开: $c_i (x+1)^2+d_i (y 1)^2 c_i x^2 d_i y^2$ $=2 c_i x+c_i 2 d_i y+d_i$ 然后 阅读全文
posted @ 2019-03-03 13:07 蒟蒻--lichenxi 阅读(141) 评论(0) 推荐(0)